按照论坛里aiming大佬的帖子装的ws+tls+caddy,最后xshell卡在下面这样不动了
Activating privacy features… done.
Serving HTTP on port 2015
http://:2015
WARNING: File descriptor limit 1024 is too low for production servers. At least 8192 is recommended. Fix with `ulimit -n 8192`.
aiming大佬还没上线,请教其他大佬如何处理?拜谢
广西网友:ctrl+c,退出,然后运行
./caddy
再运行
caddy -service status 看看状态
安徽网友:ctrl c退出,这应该启动成功了
陕西网友:./caddy显示
Activating privacy features… done.
Listen: listen tcp :2015: bind: address already in use
status显示
Caddy service is not running.
大佬咋个办
贵州网友:没啊
[email protected]:/usr/local/bin# caddy -service status
Caddy service is not running.
[email protected]:/usr/local/bin# caddy -service restart
[email protected]:/usr/local/bin# caddy -service status
Caddy service is not installed.
[email protected]:/usr/local/bin#
求指点
江西网友:caddy -service restart
看看什么情况呢?
江西网友:重启了这样的
[email protected]:/usr/local/bin# caddy -service status
Caddy service is not running.
[email protected]:/usr/local/bin# caddy -service restart
[email protected]:/usr/local/bin# caddy -service status
Caddy service is not installed.
[email protected]:/usr/local/bin#
咋办
宁夏网友:呵呵,哪有那么简单的事情,用别人的一键脚本吧,自启动都加了。你这个已经是安装成功了(go本来就不用安装),但离用还差的远,还有自启动,配置文件等细节。
用233的吧,毕竟多人验证可行。
澳门网友:
- systemctl status caddy -l
复制代码看看caddy状态,有个active,你出现的提示就是安装成功提示,这玩意就是一键安装的
天津网友:配置文件都写好了,这是最后结果,不知道问题在哪
浙江网友:配置文件都写好了,这是最后结果,不知道问题在哪
香港网友:你先netstat -apn 看看端口被什么占用了,然后结束掉
ulimit -n 50000
把限制改大点,再启动caddy
天津网友:
恭喜你,caddy已经安装了,剩下就是你自己配置文件问题,你的状态是激活中,Fix with `ulimit -n 8192`.
辽宁网友:
caddyfile我这么写的
z {
tls lum
proxy / 127.0.0.1:18274 {
websocket
header_upstream -Origin
}
}
18274是v2ray装完之后给的端口,这么写有啥问题吗
黑龙江网友:大佬,我看不大明白哪个端口被占用了,你帮忙看看吧
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 366/sshd
tcp 0 212 75.75.239.238:22 192.3.249.122:12510 ESTABLISHED 29082/sshd: [email protected]
tcp6 0 0 :::22 :::* LISTEN 366/sshd
tcp6 0 0 :::2015 :::* LISTEN 28979/./caddy
tcp6 0 0 :::18274 :::* LISTEN 14516/v2ray
河南网友:kill -9 28979 && ulimit -n 50000
然后再启动caddy
浙江网友:
运行完了好像还是不行,
运行完了我再systemctl status caddy -l
结果是这样[email protected]:/usr/local/bin# kill -9 28979 && ulimit -n 50000
[email protected]:/usr/local/bin# ./caddy
Activating privacy features… done.
Serving HTTP on port 2015
http://:2015
^Cpanic: close of closed channel
goroutine 1 [running]:
github.com/mholt/certmagic.(*Cache).Stop(…)
/tmp/buildenv_11-16-0801.767218802/main/vendor/github.com/mholt/certmagic/cache.go:122
github.com/caddyserver/caddy/caddytls.NewConfig.func3(0xc0001a2058, 0xc000000180)
/tmp/buildenv_11-16-0801.767218802/main/vendor/github.com/caddyserver/caddy/caddytls/config.go:138 +0x41
github.com/caddyserver/caddy.(*Instance).ShutdownCallbacks(0xc0001a8100, 0xe077c8, 0xe269c0, 0x130d4b0)
/tmp/buildenv_11-16-0801.767218802/main/vendor/github.com/caddyserver/caddy/caddy.go:167 +0xaf
github.com/hacdias/caddy-service.(*program).Stop(0x138c870, 0xe381c0, 0xc00016edb0, 0x7, 0x138dda0)
/tmp/buildenv_11-16-0801.767218802/main/vendor/github.com/hacdias/caddy-service/service.go:44 +0x2d
github.com/kardianos/service.(*systemd).Run(0xc00016edb0, 0x138c870, 0xc00018a0b0)
/tmp/buildenv_11-16-0801.767218802/main/vendor/github.com/kardianos/service/service_systemd_linux.go:195 +0xe5
github.com/hacdias/caddy-service.hook(0xd018ea, 0x7, 0x0, 0x0, 0xc00016e6f0, 0xc000180638)
/tmp/buildenv_11-16-0801.767218802/main/vendor/github.com/hacdias/caddy-service/service.go:85 +0x1c6
github.com/caddyserver/caddy.EmitEvent.func1(0xbc7780, 0xc000178370, 0xc09b60, 0xd3ac00, 0xb4391f)
/tmp/buildenv_11-16-0801.767218802/main/vendor/github.com/caddyserver/caddy/plugins.go:299 +0x69
sync.(*Map).Range(0x136ed00, 0xc000141d20)
/usr/local/go/src/sync/map.go:333 +0x1c3
github.com/caddyserver/caddy.EmitEvent(0xd018ea, 0x7, 0x0, 0x0)
/tmp/buildenv_11-16-0801.767218802/main/vendor/github.com/caddyserver/caddy/plugins.go:298 +0x81
github.com/caddyserver/caddy/caddy/caddymain.Run()
/tmp/buildenv_11-16-0801.767218802/main/vendor/github.com/caddyserver/caddy/caddy/caddymain/run.go:180 +0x5dd
main.main()
main/main.go:12 +0x27
[email protected]:/usr/local/bin# caddy -service status
Caddy service is not installed.
[email protected]:/usr/local/bin# caddy -service restart
[email protected]:/usr/local/bin# caddy -service status
Caddy service is not installed.
[email protected]:/usr/local/bin# systemctl status caddy -l
● caddy.service – Caddy’s service
Loaded: loaded (/etc/systemd/system/caddy.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2019-11-23 10:28:18 CST; 1min 4s ago
Process: 29360 ExecStart=/usr/local/bin/caddy -agree=true -conf=/usr/local/bin/Caddyfile -email=
Main PID: 29360 (code=exited, status=1/FAILURE)
Nov 23 10:28:18 CCphoenix systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Nov 23 10:28:18 CCphoenix systemd[1]: caddy.service: Unit entered failed state.
Nov 23 10:28:18 CCphoenix systemd[1]: caddy.service: Failed with result ‘exit-code’.
lines 1-9/9 (END)
河北网友:解决方法是这样的,caddy.service service段落写入一行:LimitNOFILE=8192
西藏网友:是在caddyfile里写入LimitNOFILE=8192吗?
[email protected]:/usr/local/bin# caddy.service service
-bash: caddy.service: command not found
[email protected]:/usr/local/bin# caddy.service
-bash: caddy.service: command not found
黑龙江网友:你这是已经运行成功了啊,只是没后台而已。。
你自己按ctrl+c退出了。
我不知道你用的啥脚本,直接service caddy start
启动不了就用nohup后台运行。
上海网友:你这是已经运行成功了啊,只是没后台而已。。
你自己按ctrl+c退出了。
我不知道你用的啥脚本,直接service caddy start
启动不了就用nohup后台运行。
海南网友:多谢回复,已经解决了
上海网友:
别这样说
根本不需要熟悉,当然有点基础更好理解而已。
我发现好多人还是把Linux当成怪兽来看,其实吧,最大的障碍是英文,而不是Linux本身
青海网友:这用的是什么版本? 所谓教育版?
免费版差点意思,没有集成 SFTP
云南网友:已经弄好了,我是想多掌握一点,免得以后233大佬迫于压力删库了,到时自己也能动手搭建。