HirbodBehnam / Shadowsocks-Cloak-Installer

A one-key script to setup Cloak plugin with Shadowsocks on your server
GNU General Public License v3.0
408 stars 85 forks source link

Not Working after Reboot on Vultr Server #34

Closed windstander closed 3 years ago

windstander commented 3 years ago

Install with this script on Vultr server, it works well. But if I reboot the server, it will not work.

无标题

HirbodBehnam commented 3 years ago

Can you give me the output of systemctl status cloak-server -l?

windstander commented 3 years ago

Can you give me the output of systemctl status cloak-server -l?

cloak-server.service - Cloak Server Service Loaded: loaded (/etc/systemd/system/cloak-server.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2020-11-18 07:19:58 UTC; 9s ago Process: 459 ExecStart=/usr/bin/ck-server -c ckserver.json (code=exited, status=1/FAILURE) Main PID: 459 (code=exited, status=1/FAILURE)

Nov 18 07:19:58 vultr.guest systemd[1]: Started Cloak Server Service. Nov 18 07:19:58 vultr.guest ck-server[459]: time="2020-11-18T07:19:58Z" level=info msg="Starting standalone Nov 18 07:19:58 vultr.guest ck-server[459]: time="2020-11-18T07:19:58Z" level=fatal msg="unable to initialis Nov 18 07:19:58 vultr.guest systemd[1]: cloak-server.service: Main process exited, code=exited, status=1/FAI Nov 18 07:19:58 vultr.guest systemd[1]: cloak-server.service: Failed with result 'exit-code'.

HirbodBehnam commented 3 years ago

Can you give the full line of time="2020-11-18T07:19:58Z" level=fatal msg="unable to initialis?

windstander commented 3 years ago

Can you give the full line of time="2020-11-18T07:19:58Z" level=fatal msg="unable to initialis?

Nov 18 07:23:22 vultr.guest ck-server[460]: time="2020-11-18T07:23:22Z" level=fatal msg="unable to initialise server state: unable to parse RedirAddr: unable to res Nov 18 07:23:22 vultr.guest systemd[1]: cloak-server.service: Main process exited, code=exited, status=1/FAILURE Nov 18 07:23:22 vultr.guest systemd[1]: cloak-server.service: Failed with result 'exit-code'. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ESCOC

t: enabled)

1/FAILURE)

msg="Starting standalone mode" l msg="unable to initialise server state: unable to parse RedirAddr: unable to resolve RedirAddr: lookup steampowered.com on [::1]:53: read udp [::1]:44666->[::1]:5 code=exited, status=1/FAILURE exit-code'. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ESCOC

olve RedirAddr: lookup steampowered.com on [::1]:53: read udp [::1]:44666->[::1]:53: read: connection refused. "

HirbodBehnam commented 3 years ago

I think that's an DNS problem. Can you check that /etc/resolv.conf file exists? If you try to reconfigure the DNS of your server. This error says that cloak cannot resolve the address of steampowered.com using system settings. I generally do not think this is an script issue so I'm closing this issue.

windstander commented 3 years ago

I think that's an DNS problem. Can you check that /etc/resolv.conf file exists? If you try to reconfigure the DNS of your server. This error says that cloak cannot resolve the address of steampowered.com using system settings. I generally do not think this is an script issue so I'm closing this issue.

/etc/resolv.conf: Permission denied

windstander commented 3 years ago

Why there will be an DNS problem after rebooting the server?

HirbodBehnam commented 3 years ago

I don't know why but there is a DNS problem. Golang falls back to localhost:53 if it cannot determine the default DNS server. Try to reconfigure the DNS server with root access.

windstander commented 3 years ago

I don't know why but there is a DNS problem. Golang falls back to localhost:53 if it cannot determine the default DNS server. Try to reconfigure the DNS server with root access.

I find this article: https://imlonghao.com/17.html

windstander commented 3 years ago

I don't know why but there is a DNS problem. Golang falls back to localhost:53 if it cannot determine the default DNS server. Try to reconfigure the DNS server with root access.

Operation not supported while reading flags on /etc/resolv.conf

There are reading flags on resolv.conf Then how to reconfigure it?

windstander commented 3 years ago

Find the problem: cloak server service cannot be auto-started after reboot on Vultr, I have to start it manuall to start it: systemctl start cloak-server

even if I set ti auto-start manually: systemctl enable cloak-server.service

After reboot, it still can not auto-start.