Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server setup stuck at "starting watchtower" #22

Closed
zl1775 opened this issue Mar 21, 2018 · 9 comments
Closed

Server setup stuck at "starting watchtower" #22

zl1775 opened this issue Mar 21, 2018 · 9 comments
Labels
server/advanced install Issues with manual/advanced server installation

Comments

@zl1775
Copy link

zl1775 commented Mar 21, 2018

Hi,

On my Ubuntu 17.10, when I run the install_server.sh script, I would get stuck at "> Starting Watchtower ......................... OK". Combing through the script, it seems the line "until curl --cacert "${SB_CERTIFICATE_FILE}" -s "${SB_API_URL}/access-keys" >/dev/null; do sleep 1; done" is giving me trouble because I tried to run this line only but the command seems to be stuck due to the get-out-of-loop condition not met. Let me know if anyone knows how to solve this.

@7sDream
Copy link

7sDream commented Mar 22, 2018

I think this step is try to confirm that other client can connect to server via your public IP address.

If you don't provide SB_PUBLIC_IP as a env var, it will be the response of curl https://ipinfo.io/ip.

So, if you know your public address you can try

export SB_PUBLIC_IP="12.34.56.78"

and run install script again.

@zl1775
Copy link
Author

zl1775 commented Mar 22, 2018 via email

@fortuna fortuna added the server/advanced install Issues with manual/advanced server installation label Mar 22, 2018
@fortuna
Copy link
Collaborator

fortuna commented Mar 22, 2018

The installation process waits for the server to be up and running. It does so by querying with

curl --cacert "${SB_CERTIFICATE_FILE}" -s "${SB_API_URL}/access-keys"

One theory is that the server is running fine, but ${SB_API_URL} is being blocked by the firewall. Maybe we should use localhost in the test instead, but it's unclear to me if it would solve the problem. Needs further investigation

@zl1775
Copy link
Author

zl1775 commented Mar 22, 2018

I suspect it has something to do with the ports being blocked too. I'm not sure but I was wondering if it'd be possible to have UPnP baked in the script, or have the user input in the port and open it up manually?

@zl1775
Copy link
Author

zl1775 commented Mar 22, 2018

Ok, I think I figured out the problem. It indeed has to do with the port being blocked behind firewall. I manually set SB_API_PORT to something like "34567" in the script, and opened up this specific port on both my router and ufw. Things are working now.

Suggestion: allow users to choose which port to use or bake UPnP in the script.

@ieaster1
Copy link

I ran into this as well on Ubuntu 16.04 and needed to add a port forwarding rule on the network switch to allow incoming traffic on a specific port.

I set the port with export SB_API_PORT="<port>" and then added the rule on my switch to allow TCP/UDP incoming traffic. Ran the install script and was good to go. Setting SB_PUBLIC_IP="127.0.0.1" would have also solved the issue since it would have prevented the need for the network switch to manage the traffic.

I would theorize that there are two possible issues with the current process.

  1. Someone's Network doesn't allow for NAT Loopback, or NAT Reflection, than it won't properly route the traffic
  2. Most Networks will be configured to block incoming traffic on the port range being randomly generated

@4044ever
Copy link

Doh! I made an error with:

export SB_PUBLIC_IP="12.34.56.78"

How I can display what I set? Or how can I clear the settings?

@ghost
Copy link

ghost commented Mar 26, 2018 via email

@fortuna
Copy link
Collaborator

fortuna commented Mar 27, 2018

The original issue was likely due to a firewall. #38 should have clarified what's going on in the installation and provide the information needed for you to unblock the ports.

I'm marking this as closed. Feel free to open a new issue for things that were not resolved with the change.

@fortuna fortuna closed this as completed Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server/advanced install Issues with manual/advanced server installation
Projects
None yet
Development

No branches or pull requests

5 participants