Tag Archives: Network

[Solved] ERROR OGG-01232 Receive TCP params error: TCP/IP error 104 (Connection reset by peer), endpoint:

Solution 1:
due to the inconsistency between the ports of the source end and the destination end,
the error message of the source end is error ogg-01232 receive TCP params error: TCP/IP error 104 (connection reset by peer), endpoint: 10.238.83.44:7847

Edit the process and view the configured ports

edit params 42P3  42P3 is the port number

The information configured in the discovery process is rmthost 10.238.83.44 mgrport 7839, compress

It is inconsistent with the port reporting an error. Modify the port Edit params 42p3 to prompt port 7847. Then restart the process start 42p3

Solution 2:
after modifying the port or starting the process, it indicates that the previous port is normal (the port of the destination end is the same as that of the source end)

Just delete the line of port and write it again Edit params 42p3 , and restart start 42p3 after writing

Solution 3:
roll forward the source side delivery process to a file and generate a new file point

alter extract 42P3, etrollover

[vite] http proxy error: Error: self signed certificate in certificate chain vite

In order to prevent cross domain problems when requesting interfaces, vite proxy is used for configuration.

For example, the address of the request interface is https://172.1.1.0:8080 , the vite configuration information is as follows:

...

server: {
        host: '0.0.0.0',
        port: 12000,
        proxy: {
            '/local/': {
                target: 'https://172.1.1.0:8080',
                changeOrigin: true,
                rewrite: (path) => path.replace(/^\/local\//, ''),
            },
        },
},

...

Local requests are all interfaces. You only need to add a prefix -/local /. For example, the login interface is’/local/Login ‘.

So I went to request and found that the error was reported directly. The error information is as follows:

[vite] http proxy error: Error: self signed certificate

The certificate is wrong.

Solution: add a configuration – secure: false The overall configuration code is as follows:

proxy: {
            '/local/': {
                target: '',
                

                // Add
                secure: false,
                // End




                changeOrigin: true,
                rewrite: (path) => path.replace(/^\/local\//, ''),
            },
        },

Then try again. Sure enough, there’s no problem.

[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;
    }

SpringBoot :Error parsing HTTP request header [How to Solve]

Most of these problems are container problems. There are two solutions:

1. Maybe the header cache in Tomcat is not enough

  tomcat:
    # URI encoding of tomcat
     uri-encoding: UTF-8
     # tomcat maximum number of threads, the default is 200
     max-threads: 800
     # Tomcat starts the number of threads to initialize, the default value is 25
    min-spare-threads: 30
    max-http-form-post-size: 2MB
    max-http-header-size: 8096

2. If it hasn’t been solved

@Configuration
public class TomcatConfigurer {

    @Bean
    public TomcatServletWebServerFactory webServerFactory() {
        TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
        factory.addConnectorCustomizers((Connector connector) -> {
            connector.setProperty("relaxedPathChars", "\"<>[\\]^`{|}");
            connector.setProperty("relaxedQueryChars", "\"<>[\\]^`{|}");
        });
        return factory;
    }

}

[Solved] Error during WebSocket handshake Unexpected response code 404

Problem Description: the websocket project was well deployed before. When it was transplanted to the domain name specified by the government cloud SLB, an error occurred:
error during websocket handshake unexpected response code 404

Solution

1. Configure nginx

In any case, configure nginx:
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;

location /xxx{
    proxy_pass http://127.0.0.1:7071/xxx;
    proxy_redirect    off;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_http_version 1.1;
    proxy_set_header Connection "upgrade";
    proxy_set_header Upgrade $http_upgrade;
    
    proxy_connect_timeout 60s;
    proxy_read_timeout 7200s;
    proxy_send_timeout 600s;
    
    # 再不行的话就把下面的设置试一下
    #proxy_set_header Upgrade websocket;
    #proxy_pass_request_headers on;
    #access_log off;
    #proxy_buffering off;
    
}

2. Websocket configuration

We use springboot, and all configurations cannot be less

import com.fh.websocket.session.MySpringConfigurator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * enable WebSocket support
 */
@Configuration
public class WebSocketConfig {

	@Bean
	public ServerEndpointExporter serverEndpointExporter() {
		return new ServerEndpointExporter();
	}

	@Bean
	public MySpringConfigurator mySpringConfigurator() {
		return new MySpringConfigurator();
	}
}

3. Websocketserver needs to add a parameterless constructor

This is a pit, and it is normal to deploy to another
transplanting will not work in the past.

[Solved] ./configure: error: the HTTP rewrite module requires the PCRE library

report errors

./configure: error: the HTTP rewrite module requires the PCRE library.

Solution:

Install prce
official website: https://ftp.pcre.org/pub/pcre/

sudo wget https://udomain.dl.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.gz
sudo tar -zxvf pcre-8.45.tar.gz
cd pcre-8.45
sudo ./configure
sudo make && make install

Error:
configure: error: Invalid C++ compiler or C++ compiler flags

yum install -y gcc-c++

[Solved] harbor Error: because it doesn‘t contain any IP SANs

Bloggers encounter an interesting error when using Harbor:

Error response from daemon: Get https://192.168.2.250:443/v2/: x509:

cannot validate certificate for 192.168.2.250 because it doesn’t contain any IP SANs

Error reporting means: error response from the daemon: G ethttps://192.168.2.250:443/v2/: X509: unable to validate 192.168 2.250 because it does not contain any IP SAN

Blogger Harbor Address 192.168.2.250, using 443 as the secure port.

[reason]:

Docker was unable to validate the certificate for the private repository.

[solution]:

Don’t panic when you encounter a problem. Just hit the king and you’ll know how to solve it. I solved it this way:

1. Edit the docker configuration file (/etc/docker/daemon.JSON)

2. Add “secure registers”: [“192.168.2.250:443”], and specify the address and port of the harbor image warehouse.

3. Restart the docker service and the problem can be solved.

If it still cannot be solved, leave a message in the comment area.

YANG Model: How to Solve

1.grouping errors Codes

grouping errors {

       description
         "A grouping that contains a YANG container
          representing the syntax and semantics of a
          YANG Patch errors report within a response message.";

       container errors {
         config false;  // needed so list error does not need a key
         description
           "Represents an error report returned by the server if
            a request results in an error.";

         list error {
           description
             "An entry containing information about one
              specific error that occurred while processing
              a RESTCONF request.";
           reference "RFC 6241, Section 4.3";

           leaf error-type {
             type enumeration {
               enum transport {
                 description "The transport layer";
               }
               enum rpc {
                 description "The rpc or notification layer";
               }
               enum protocol {
                 description "The protocol operation layer";
               }
               enum application {
                 description "The server application layer";
               }
             }
             mandatory true;
             description
               "The protocol layer where the error occurred.";
           }

           leaf error-tag {
             type string;
             mandatory true;
             description
               "The enumerated error tag.";
           }

           leaf error-app-tag {
             type string;
             description
               "The application-specific error tag.";
           }

           leaf error-path {
             type data-resource-identifier;
             description
               "The target data resource identifier associated
                with the error, if any.";
           }
           leaf error-message {
             type string;
             description
               "A message describing the error.";
           }

           container error-info {
              description
                "A container allowing additional information
                 to be included in the error report.";
              // arbitrary anyxml content here
           }
         }
       }
     } 

2. Interpretation of defined nodes

Meaning of each field in the message:
(1) error type: defines that the error occurs at the protocol level. There are four values: transport transport layer, RPC remote process call, protocol layer and application layer.
(2) error tag: identifies the content of error information.
(3) Error app tag: identifies a specific error condition. For a special error condition, this element will not appear if there is no appropriate association with it.
(4) error path: identifies the location and specific file name of the error.
(5) error message: describes the error content.
(6) Error Info: contains protocol or data model specific error content. For a special error situation, this element will not appear if appropriate information is not provided.

3. Examples

<?xml version="1.0" encoding="utf-8"?>
 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3">
  <rpc-error>
   <error-type>application</error-type>
   <error-tag>bad-element</error-tag>
   <error-severity>error</error-severity>
   <error-app-tag>43</error-app-tag>
   <error-path xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
	  xmlns:acl="http://xxxxx">xxxxxxxx</error-path>
   <error-message xml:lang="en">xxxxxx</error-message>
   <error-info>
    <bad-element>xxxxxxx</bad-element>
  </error-info>
 </rpc-error>
</rpc-reply>

[Solved] KeyError: ‘Transformer/encoderblock_0/MultiHeadDotProductAttention_1/query\\kernel is

Recently, I've been working on the application of Transformer to fine-grained images.
Solving the problem with the vit source code
 
KeyError: 'Transformer/encoderblock_0/MultiHeadDotProductAttention_1/query\kernel is not a file in the archive'
 
This is a problem when merging paths with os.path.join
 
Solution.
 
1. In the modeling.py file
 
Add '/' to the following paths:
ATTENTION_Q = "MultiHeadDotProductAttention_1/query/"
ATTENTION_K = "MultiHeadDotProductAttention_1/key/"
ATTENTION_V = "MultiHeadDotProductAttention_1/value/"
ATTENTION_OUT = "MultiHeadDotProductAttention_1/out/"
FC_0 = "MlpBlock_3/Dense_0/"
FC_1 = "MlpBlock_3/Dense_1/"
ATTENTION_NORM = "LayerNorm_0/"
MLP_NORM = "LayerNorm_2/"
 
2. In the vit_modeling_resnet.py file
 
ResNetV2 class Add '/' after each 'block' and 'unit'
 
self.body = nn.Sequential(OrderedDict([
    ('block1/', nn.Sequential(OrderedDict(
        [('unit1/', PreActBottleneck(cin=width, cout=width*4, cmid=width))] +
        [(f'unit{i:d}/', PreActBottleneck(cin=width*4, cout=width*4, cmid=width)) for i in range(2, block_units[0] + 1)],
        ))),
    ('block2/', nn.Sequential(OrderedDict(
        [('unit1/', PreActBottleneck(cin=width*4, cout=width*8, cmid=width*2, stride=2))] +
        [(f'unit{i:d}/', PreActBottleneck(cin=width*8, cout=width*8, cmid=width*2)) for i in range(2, block_units[1] + 1)],
        ))),
    ('block3/', nn.Sequential(OrderedDict(
        [('unit1/', PreActBottleneck(cin=width*8, cout=width*16, cmid=width*4, stride=2))] +
        [(f'unit{i:d}/', PreActBottleneck(cin=width*16, cout=width*16, cmid=width*4)) for i in range(2, block_units[2] + 1)],
        ))),
]))

[Solved] cURL error 60: SSL certificate problem: unable to get local issuer certificate

When the PHP server curl is based on the HTTPS protocol API, this problem will be reported if the environment does not handle it:

cURL error 60: SSL certificate problem: unable to get local issuer certificate

Solution:
(1) download the file used to support HTTPS

(2) Place the file in a location, such as “C:\env\cacert.PEM”

(3) Modify php.ini and add support for cacert.pem