gpt4 book ai didi

apache - 无法在端口 80 Ubuntu 16.04 上启动 Varnish 缓存

转载 作者:行者123 更新时间:2023-12-03 17:46:00 26 4
gpt4 key购买 nike

帮我,请使用我的 Ubuntu 16.04 apache2 网络服务器结交 friend !
安装之后,Varnish缓存正常启动。但是,将放在端口80上后, Varnish 无法启动:
创建/etc/systemd/system/varnish.service.d/customexec.conf:

[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s default,256m
然后
systemctl daemon-reload
service varnish start
Varnish 不启动:
varnish.service - Varnish Cache, a high-performance HTTP accelerator
Loaded: loaded (/lib/systemd/system/varnish.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/varnish.service.d
└─customexec.conf
Active: failed (Result: exit-code) since Thu 2020-07-23 09:41:12 MSK; 21s ago
Process: 5886 ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s default,256m (code=exited,
Main PID: 20786 (code=exited, status=0/SUCCESS)

Jul 23 09:41:12 mj33 systemd[1]: Starting Varnish Cache, a high-performance HTTP accelerator...
Jul 23 09:41:12 mj33 varnishd[5886]: Error: Cannot open -S file (/etc/varnish/secret): No such file or directory
Jul 23 09:41:12 mj33 varnishd[5886]: (-? gives usage)
Jul 23 09:41:12 mj33 systemd[1]: varnish.service: Control process exited, code=exited status=255
Jul 23 09:41:12 mj33 systemd[1]: Failed to start Varnish Cache, a high-performance HTTP accelerator.
Jul 23 09:41:12 mj33 systemd[1]: varnish.service: Unit entered failed state.
Jul 23 09:41:12 mj33 systemd[1]: varnish.service: Failed with result 'exit-code'.
试图创建安全文件并编辑 /etc/systemd/system/varnish.service.d/customexec.conf:
[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
Varnish 是第一次启动,但是在停止/启动后不会再次启动:
● varnish.service - Varnish Cache, a high-performance HTTP accelerator
Loaded: loaded (/lib/systemd/system/varnish.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/varnish.service.d
└─customexec.conf
Active: failed (Result: exit-code) since Fri 2020-07-24 10:52:41 MSK; 8s ago
Process: 9974 ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m (code=exited, status=2
Main PID: 8395 (code=exited, status=0/SUCCESS)

Jul 24 10:52:40 mj33 systemd[1]: Starting Varnish Cache, a high-performance HTTP accelerator...
Jul 24 10:52:41 mj33 varnishd[9974]: Debug: Version: varnish-6.0.6 revision 29a1a8243dbef3d973aec28dc90403188c1dc8e7
Jul 24 10:52:41 mj33 varnishd[9974]: Debug: Platform: Linux,4.4.0-135-generic,x86_64,-junix,-smalloc,-sdefault,-hcritbit
Jul 24 10:52:41 mj33 varnishd[9974]: Empty secret-file "/etc/varnish/secret"
Jul 24 10:52:41 mj33 varnishd[9976]: Version: varnish-6.0.6 revision 29a1a8243dbef3d973aec28dc90403188c1dc8e7
Jul 24 10:52:41 mj33 varnishd[9976]: Platform: Linux,4.4.0-135-generic,x86_64,-junix,-smalloc,-sdefault,-hcritbit
Jul 24 10:52:41 mj33 systemd[1]: varnish.service: Control process exited, code=exited status=255
Jul 24 10:52:41 mj33 systemd[1]: Failed to start Varnish Cache, a high-performance HTTP accelerator.
Jul 24 10:52:41 mj33 systemd[1]: varnish.service: Unit entered failed state.
Jul 24 10:52:41 mj33 systemd[1]: varnish.service: Failed with result 'exit-code'.

最佳答案

问题是:

Debug: Child (20551) Started
Error: Child (20551) Acceptor start failed:
Listen failed on socket ':80': Address already in use
Debug: Stopping Child
Info: Child (20551) ended

关于apache - 无法在端口 80 Ubuntu 16.04 上启动 Varnish 缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63049223/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com