Vmware rehel 8 ip_local_port_range 卡了 prefer different parity for start/end values
时间: 2024-02-27 19:57:08 浏览: 506
这个问题可能与内核参数有关。你可以尝试以下步骤:
1. 在启动时按下 ESC 键,进入 Grub 引导菜单。
2. 选中要启动的内核版本,按下 e 键进入编辑模式。
3. 在编辑模式下,找到以 "linux" 开头的行,并在行末尾添加以下内容:
```
net.ipv4.ip_local_port_range=1024 65535
```
4. 按下 Ctrl + X 或者 F10 键保存并启动内核。
如果以上步骤无法解决问题,你可以尝试修改系统内核参数。具体步骤如下:
1. 打开 /etc/sysctl.conf 文件。
2. 在文件末尾添加以下内容:
```
net.ipv4.ip_local_port_range = 1024 65535
```
3. 保存文件并执行以下命令使之生效:
```
sysctl -p
```
如果你还是无法解决问题,建议你查看启动日志,找到具体的错误信息,以便更好地定位问题。
相关问题
ip_local_port_range: prefer different parity for start/end values.
The `ip_local_port_range` is a kernel parameter that defines the range of local ports that are used for outgoing connections. The default range is usually 32768 to 60999, but it can be changed by modifying the `/proc/sys/net/ipv4/ip_local_port_range` file.
The warning "prefer different parity for start/end values" means that the start and end values of the port range should have different parity (i.e., one should be odd and the other should be even). This is because some applications may not work correctly if both the start and end values are either odd or even.
To fix this warning, you can modify the `ip_local_port_range` parameter to use an odd start value and an even end value (or vice versa). For example:
```
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
```
This will set the start value to 1024 (which is even) and the end value to 65535 (which is odd), avoiding the parity warning.
upstream fsapiBackend { server 10.20.1.72:8082; server 10.20.1.72:8082 max_fails=10 fail_timeout=30s backup; } upstream fsbulkapiBackend { server 10.20.1.72:8082; } upstream ssapiBackend { server 10.20.1.72:8084; } upstream csapiBackend { server 10.20.1.72:9095; } upstream activityBackend { server 10.20.1.72:8094; } server { listen 80; listen 443 ssl http2; server_name mxapi.hckcooler.com; ssl_certificate /usr/local/openresty/nginx/ssl/mxapi.hckcooler.com/mxapi.hckcooler.com_chain.crt; ssl_certificate_key /usr/local/openresty/nginx/ssl/mxapi.hckcooler.com/mxapi.hckcooler.com_key.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers EECDH+ECDSA+AES128:EECDH+aRSA+AES128:RSA+AES128:!aNULL:!MD5:!RC4; ssl_prefer_server_ciphers on; ssl_stapling on; ssl_stapling_verify on; ssl_trusted_certificate /usr/local/openresty/nginx/ssl/mxapi.hckcooler.com/mxapi.hckcooler.com_chain.crt; location /fs/ { proxy_pass http://fsapiBackend/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Connection ""; } location =/fs/v2/mails/deliver { proxy_pass http://fsapiBackend/v2/mails/deliver; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Connection ""; access_by_lua_file ./app/mailLimit.lua; } location /fsbulk/ { proxy_pass http://fsbulkapiBackend/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Connection ""; } location /ss/ { proxy_pass http://ssapiBackend/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Connection ""; } location /approval/ { proxy_pass http://approvalapiBackend/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Connection ""; } location /job/ { proxy_pass http://jobapiBackend/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Connection ""; } }中,mxapi.hckcooler.com代理的是哪个服务
在给出的 Nginx 配置中,`mxapi.hckcooler.com` 代理了 `fsapiBackend` 这个服务。可以看到以下配置:
```nginx
location /fs/ {
proxy_pass http://fsapiBackend/;
...
}
location =/fs/v2/mails/deliver {
proxy_pass http://fsapiBackend/v2/mails/deliver;
...
}
```
这些配置指定了请求路径以及对应的代理后端,都是指向 `fsapiBackend`。因此,`mxapi.hckcooler.com` 代理的是 `fsapiBackend` 服务。
阅读全文