Tag Archives: p2p

[Solved] error when starting dev server:Error: listen EACCES: permission denied 0.0.0.0:80 at Server.set

error when starting dev server:Error: listen EACCES: permission denied 0.0.0.0:80 at Server.set

error when starting dev server:
Error: listen EACCES: permission denied 0.0.0.0:80
at Server.setupListenHandle [as _listen2] (node:net:1313:21)
at listenInCluster (node:net:1378:12)
at Server.listen (node:net:1465:7)Using cnpm install works

mac to 8090.

mac terminal port view command
View Port thread lsof -i:4700
$ lsof -i:4700
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 12159 yyyyyy 23u IPv4 0x76b4f5051c4983f3 0t0 TCP *:netxms-agent (LISTEN)

The PID here is the process number that occupies port 4700
kill 4700
Solution:
View mac terminal port command netstat -AaLlnW
Method 1
// Check if port 80 is occupied
sudo lsof -i :80

Method 2
netstat -anp tcp | grep 80
The following command can directly end all processes that are occupying the port.
lsof -P | grep ‘:80’ | awk ‘{print $2}’ | xargs kill -9

Ps -ef|grep program name

 

[Solved] Swagger Error: Whitelabel Error Page status=405

The swagger link is accessed with the following error

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Mar 17 20:14:30 CST 2022
There was an unexpected error (type=Method Not Allowed, status=405).
Request method ‘GET’ not supported

The reason is that @PostMapping does not have a configured path

   @PostMapping
    public UserInfoResponse queryUserNameById(@RequestBody UserInfoRequest request){
        log.info("Query user name request parameters",request);
        UserInfoResponse response = userService.selectUserNameById(request);
        log.info("Query user name return parameters",request);
        return response;
    }

[Solved] SQLite Error: SQLite error near “@table“: syntax error

In my previous post on c# operation SQLite, I found that sometimes the following errors occur when running:

SQLite error near “@table”: syntax error

The error code is as follows:

public static Tuple<bool, DataSet, string> GetBarcode(string barcode)
{
    if (string.IsNullOrEmpty(barcode))
    {
        return new Tuple<bool, DataSet, string>(false, null, "The passed parameter cannot be empty");
    }

    string sql = "SELECT * FROM @table WHERE Barcode = @barcode";
    SQLiteParameter[] parameter = new SQLiteParameter[]
    {
        new SQLiteParameter("table", "Database Table Name"),
        new SQLiteParameter("barcode", barcode)
    };
    return SQLiteHelpers.ExecuteDataSet(sql, parameter);
}

 

Solution:

I found that the database table name cannot be added to the SQLiteParameter parameter list, the other column names are fine, and the SQL statement will not report an error if you change to the string connection method, as follows.

public static Tuple<bool, DataSet, string> GetBarcode(string barcode)
{
    if (string.IsNullOrEmpty(barcode))
    {
        return new Tuple<bool, DataSet, string>(false, null, "The passed parameter cannot be empty");
    }

    string sql = string.Format("SELECT * FROM {0} WHERE Barcode = @barcode", "Database Table Name");
    SQLiteParameter[] parameter = new SQLiteParameter[]
    {
        new SQLiteParameter("barcode", barcode)
    };
    return SQLiteHelpers.ExecuteDataSet(sql, parameter);
}

[Solved] RuntimeError: An attempt has been made to start a new process before the current process…

When running the Pytorch expression recognition code during hands-on training, the following error occurred:

RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.
 
        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:
 
            if __name__ == '__main__':
                freeze_support()
                ...
 
        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

 

Here is to take multi-threaded tasks, using a single thread to complete, the solution is also very simple, there are the following two.
1. remove the num_workers parameter

 

train_dataloader = torch.utils.data.DataLoader(train_dataset,batch_size=batchsize,shuffle=True,num_workers=0)
val_dataloader = torch.utils.data.DataLoader(val_dataset,batch_size=100,shuffle=False,num_workers=0)

2. Add if __name__=='__main__' before epoch :

if __name__ == '__main__':
    for epoch in range(epochs):
        loss = 0.0
        acc = 0.0
        n = 0
        for image,label in train_dataloader:

Then it can run normally.

[Solved] org.thymeleaf.exceptions.TemplateInputException: Error resolving template

This problem occurs when spring boot} integrates thymeleaf

By querying other people’s blogs. I understand that there are several possible errors

1 when the method corresponding to your controller layer returns the HTML path and name, add an additional /.

For example, return “/index”. If this ‘/’ causes an error, the solution is to remove the ‘/’ in front of the return, such as return “/index”

2. Introduction package problem (I solved it this way)

Add dependency in porn

<dependency> 
<groupId>net.sourceforge.nekohtml</groupId> 
<artifactId>nekohtml</artifactId> 
<version>1.9.22</version> 
</dependency>

DingDing Error: missing mainframe dll [How to Solve]

Repair steps:
1. Press “windows logo key + X”, Start Windows PowerShell (administrator) Enter the command “auto repair system
2. Dism/online/cleanup image/scanhealth” to scan all system files and compare them with the official system files to scan for inconsistencies in the computer
3. The command dism/online/cleanup image/checkhealth must be used when the system file is found to be damaged after the previous command is executed
4. Dism/online/cleanup image/restorehealth this command restores those different system files into official system source files
5. Restart after completion. No matter whether the above is successful or not, type the following command: SFC/scannow

No module named ‘google.rpc‘ [How to Solve]

The occurrence of this error is also inexplicable. The error is reported when importing the KFP module after installing the KFP module, but there is no error in its own installation process.

Open KFP to locate the error position:

According to the past experience, after all the troubleshooting, I still can’t find the cause of the error. At this time, I have to open the local Google installation directory. The screenshot is as follows:

It was found that there was no RPC directory. The reason was found. Because I really didn’t want to study more, I created a new virtual environment and installed it. After that, I copied all the modules in Google and copied them to my current Google directory, as shown below:

Re import, solve the problem.