无法在端口80 CentOS v7.9.2009 kvm [ns]上启动Varnish-错误:-a参数localhost:8443和localhost:8443具有相同的地址

s8vozzvw  于 2022-11-07  发布在  其他
关注(0)|答案(1)|浏览(161)

请你们帮忙。我安装清漆之前&工作如下:https://computingforgeeks.com/install-varnish-cache-for-apache-nginx-on-centos/.最近不工作了.不知道为什么.

[root@ns ~]# systemctl status varnish.service
● varnish.service - Varnish Cache, a high-performance HTTP accelerator
   Loaded: loaded (/usr/lib/systemd/system/varnish.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2022-03-02 08:41:43 UTC; 10s ago
  Process: 22134 ExecStart=/usr/sbin/varnishd -a :80 -a localhost:8443,PROXY -p feature=+http2 -f /etc/varnish/default.vcl -s malloc,256m (code=exited, status=255)

Mar 02 08:41:42 [nameserver url] systemd[1]: Starting Varnish Cache, a high-performance HTTP accelerator...
Mar 02 08:41:42 [nameserver url] varnishd[22134]: Error: -a arguments localhost:8443 and localhost:8443 have same address
Mar 02 08:41:42 [nameserver url] varnishd[22134]: (-? gives usage)
Mar 02 08:41:43 [nameserver url] systemd[1]: varnish.service: control process exited, code=exited status=255
Mar 02 08:41:43 [nameserver url] systemd[1]: Failed to start Varnish Cache, a high-performance HTTP accelerator.
Mar 02 08:41:43 [nameserver url] systemd[1]: Unit varnish.service entered failed state.
Mar 02 08:41:43 [nameserver url] systemd[1]: varnish.service failed.

我猜问题是:

Mar 02 08:41:42 [nameserver url] varnishd[22134]: Error: -a arguments localhost:8443 and localhost:8443 have same address

已运行netstat -ltnp以检查端口:8443

[root@ns ~]# netstat -ltnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      1461/dovecot        
tcp        0      0 0.0.0.0:2095            0.0.0.0:*               LISTEN      1741/cpsrvd (SSL) - 
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN      1866/perl           
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1461/dovecot        
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      612/rpcbind         
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      21294/httpd         
tcp        0      0 0.0.0.0:2096            0.0.0.0:*               LISTEN      1741/cpsrvd (SSL) - 
tcp        0      0 0.0.0.0:465             0.0.0.0:*               LISTEN      822/exim            
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      1720/pdns_server    
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      1444/pure-ftpd (SER 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1750/sshd           
tcp        0      0 0.0.0.0:8088            0.0.0.0:*               LISTEN      9669/openlitespeed  
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1720/pdns_server    
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      822/exim            
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      21294/httpd         
tcp        0      0 0.0.0.0:2077            0.0.0.0:*               LISTEN      2029/cpdavd - accep 
tcp        0      0 0.0.0.0:2078            0.0.0.0:*               LISTEN      2029/cpdavd - accep 
tcp        0      0 127.0.0.1:446           0.0.0.0:*               LISTEN      1488/docstore       
tcp        0      0 0.0.0.0:52223           0.0.0.0:*               LISTEN      2190/im360: master  
tcp        0      0 0.0.0.0:2079            0.0.0.0:*               LISTEN      2029/cpdavd - accep 
tcp        0      0 0.0.0.0:52224           0.0.0.0:*               LISTEN      2190/im360: master  
tcp        0      0 0.0.0.0:2080            0.0.0.0:*               LISTEN      2029/cpdavd - accep 
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1461/dovecot        
tcp        0      0 0.0.0.0:2082            0.0.0.0:*               LISTEN      1741/cpsrvd (SSL) - 
tcp        0      0 0.0.0.0:52227           0.0.0.0:*               LISTEN      2190/im360: master  
tcp        0      0 0.0.0.0:2083            0.0.0.0:*               LISTEN      1741/cpsrvd (SSL) - 
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      1461/dovecot        
tcp        0      0 0.0.0.0:52228           0.0.0.0:*               LISTEN      2190/im360: master  
tcp        0      0 0.0.0.0:52229           0.0.0.0:*               LISTEN      2190/im360: master  
tcp        0      0 0.0.0.0:52230           0.0.0.0:*               LISTEN      2190/im360: master  
tcp        0      0 0.0.0.0:2086            0.0.0.0:*               LISTEN      1741/cpsrvd (SSL) - 
tcp        0      0 0.0.0.0:52231           0.0.0.0:*               LISTEN      2190/im360: master  
tcp        0      0 0.0.0.0:2087            0.0.0.0:*               LISTEN      1741/cpsrvd (SSL) - 
tcp        0      0 0.0.0.0:7080            0.0.0.0:*               LISTEN      9669/openlitespeed  
tcp        0      0 0.0.0.0:52232           0.0.0.0:*               LISTEN      2190/im360: master  
tcp        0      0 0.0.0.0:2090            0.0.0.0:*               LISTEN      2029/cpdavd - accep 
tcp        0      0 0.0.0.0:2091            0.0.0.0:*               LISTEN      2029/cpdavd - accep 
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      1718/redis-server 1 
tcp        0      0 0.0.0.0:11211           0.0.0.0:*               LISTEN      1443/memcached      
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      822/exim            
tcp6       0      0 :::110                  :::*                    LISTEN      1461/dovecot        
tcp6       0      0 ::1:783                 :::*                    LISTEN      1866/perl           
tcp6       0      0 :::143                  :::*                    LISTEN      1461/dovecot        
tcp6       0      0 :::111                  :::*                    LISTEN      612/rpcbind         
tcp6       0      0 :::8080                 :::*                    LISTEN      21294/httpd         
tcp6       0      0 :::465                  :::*                    LISTEN      822/exim            
tcp6       0      0 :::53                   :::*                    LISTEN      1720/pdns_server    
tcp6       0      0 :::21                   :::*                    LISTEN      1444/pure-ftpd (SER 
tcp6       0      0 :::4949                 :::*                    LISTEN      847/perl            
tcp6       0      0 :::22                   :::*                    LISTEN      1750/sshd           
tcp6       0      0 :::25                   :::*                    LISTEN      822/exim            
tcp6       0      0 :::443                  :::*                    LISTEN      21294/httpd         
tcp6       0      0 :::52223                :::*                    LISTEN      2190/im360: master  
tcp6       0      0 :::52224                :::*                    LISTEN      2190/im360: master  
tcp6       0      0 :::993                  :::*                    LISTEN      1461/dovecot        
tcp6       0      0 :::52227                :::*                    LISTEN      2190/im360: master  
tcp6       0      0 :::995                  :::*                    LISTEN      1461/dovecot        
tcp6       0      0 :::52228                :::*                    LISTEN      2190/im360: master  
tcp6       0      0 :::52229                :::*                    LISTEN      2190/im360: master  
tcp6       0      0 :::52230                :::*                    LISTEN      2190/im360: master  
tcp6       0      0 :::52231                :::*                    LISTEN      2190/im360: master  
tcp6       0      0 :::52232                :::*                    LISTEN      2190/im360: master  
tcp6       0      0 :::3306                 :::*                    LISTEN      2008/mysqld         
tcp6       0      0 :::11211                :::*                    LISTEN      1443/memcached      
tcp6       0      0 :::587                  :::*                    LISTEN      822/exim

但是我没有找到这个端口,我试过重启Apache,重启服务器和varnish,没有任何帮助,你们有没有遇到过类似的问题?我该怎么解决这个问题?谢谢

noj0wjuj

noj0wjuj1#

我 使用 以下 命令 运行 默认 的 清漆 服务 配置 文件 :

$ sudo vi /etc/systemd/system/multi-user.target.wants/varnish.service

ExecStart=/usr/sbin/varnishd \
                  -a :80 \
                  -a localhost:8443,PROXY \
                  -p feature=+http2 \
                  -f /etc/varnish/default.vcl \
                  -s malloc,256m
        ExecReload=/usr/sbin/varnishreload

中 的 每 一 个
我 想 问题 是 这个 。 去掉 清漆 又 能 用 了 。 但 我 不 确定 它 是否 会 在 其他 地方 引起 麻烦 。

-a localhost:8443,PROXY \

格式

相关问题