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

Cannot connect <ip_server>:3000 #14

Closed
tuanphpvn opened this Issue Nov 6, 2017 · 19 comments

Comments

Projects
None yet
5 participants
@tuanphpvn
Copy link

tuanphpvn commented Nov 6, 2017

Run captainduckduck with normal user and cannot connect to <ip_server>:3000.

Env:

Ubuntu 16.04 (64)
docker: 17.09-ce

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Nov 6, 2017

Are you accessing a remote server? Or a VM on your local machine? Do you have firewall setup?

I assume you started off by running the following line?

 mkdir /captain && docker run -v /var/run/docker.sock:/var/run/docker.sock dockersaturn/captainduckduck

if so, you can run the following line to see the logs:

docker service logs captain-captain --follow

Please post the logs here to debug.

@tuanphpvn

This comment has been minimized.

Copy link
Author

tuanphpvn commented Nov 6, 2017

Thank you for your hard work.
But I got another problem. I remove container, docker, even remove docker and install again.
Why docker keep download captainduckduck docker images?

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Nov 6, 2017

Please see #12

@tuanphpvn

This comment has been minimized.

Copy link
Author

tuanphpvn commented Nov 6, 2017

Thank your. U r awesome.

@tuanphpvn

This comment has been minimized.

Copy link
Author

tuanphpvn commented Nov 6, 2017

Can you reopen it.

I use this:

  1. sudo ufw allow 3000
  2. Access: http://139.162.125.94:3000/
  3. docker service logs captain-captain --follow

And it show nothing. any idea?

Also, I left the swarm with:

docker service rm $(docker service ls -q)
docker swarm leave --force

How can I join it again ? Thanks

@githubsaturn githubsaturn reopened this Nov 6, 2017

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Nov 6, 2017

If docker service logs captain-captain --follow doesn't output anything, it means your docker hasn't started Captain yet. But you were saying it automatically reappeared after you stopped it - which means it was running. Did you run the exact installtion line from readme?

mkdir /captain && docker run -v /var/run/docker.sock:/var/run/docker.sock dockersaturn/captainduckduck

When you ran this, did it output anything?

run the following commands:
docker service ls and docker service ps captain-captain to see if there is a running instance of Captain.

PS: answer to your second question: when you run the Captain installation line, it automatically starts a swarm and joins it. It does not work if there is an existing swarm (to avoid accidential double installation due to human error)

@tuanphpvn

This comment has been minimized.

Copy link
Author

tuanphpvn commented Nov 6, 2017

Here is the output. Please review

error

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Nov 6, 2017

It means CaptainDuckDuck is failing to start. Maybe a not clean captain directory? If you need more help, let's chat over Slack

@sadeden

This comment has been minimized.

Copy link

sadeden commented Nov 18, 2017

Hi,
I have exactly the same issue here. Any command that we could issue to help debug this ?

@sadeden

This comment has been minimized.

Copy link

sadeden commented Nov 18, 2017

Actually I found the --no-trunc option of docker service ps and I have another clue :
starting container failed: subnet sandbox join failed for "10.255.0.0/16": error creating vxlan interface: operation not supported This is the error I get. Will investigate this and come back with a solution... I hope.

@sadeden

This comment has been minimized.

Copy link

sadeden commented Nov 18, 2017

@tuanphpvn maybe you have the same issue as me. My dedicated server came with an "optimised" version of linux Kernel missing the CONFIG_VXLAN option. You should install/compile a proper one.
Hope it helps.

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Nov 18, 2017

@sadeden thanks for the info. Mind sharing what server provider you use?

@sadeden

This comment has been minimized.

Copy link

sadeden commented Nov 18, 2017

I'm using OVH services.

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Nov 18, 2017

Thanks. It might be worth letting them know about this issue. It means that they do not support docker swarm networking with their default config which is a problem considering how docker is growing. Anyways, I have added some notes to readme for troubleshooting.

@CoreyTrombley

This comment has been minimized.

Copy link

CoreyTrombley commented Dec 11, 2017

Even after I disabled the firewall ufw disable, I still was unable to connect to external_ip:3000. I checked the logs, everything seemed fine. docker service ps captain-captain did not contain any errors. I really don't know where to go from here.

Any ides or assistance would be greatly appreciated!

edit
I was using a digital ocean $5 one-click docker instance.

@iszlai

This comment has been minimized.

Copy link

iszlai commented Dec 11, 2017

Have the same issue on linode :

leheli@localhost:/captain$ docker run -v /var/run/docker.sock:/var/run/docker.sock dockersaturn/captainduckduck
npm info it worked if it ends with ok
npm info using npm@5.4.2
npm info using node@v8.7.0
npm info lifecycle captain-duckduck@0.0.0~prestart: captain-duckduck@0.0.0
npm info lifecycle captain-duckduck@0.0.0~start: captain-duckduck@0.0.0

> captain-duckduck@0.0.0 start /usr/src/app
> node ./bin/www

Captain Starting ...
Installing Captain Service ...
December 11th 2017, 9:56:07.951 pm    Starting swarm at 172.104.246.242:2377
Swarm started: 0wkozycr6ewfo9v12pnjpwn9i
npm info lifecycle captain-duckduck@0.0.0~poststart: captain-duckduck@0.0.0
npm info ok
leheli@localhost:/captain$ netstat -tunap
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
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      -
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      5852/python
tcp        0      0 172.104.246.242:22      80.99.202.213:52946     ESTABLISHED -
tcp        0      0 172.104.246.242:22      115.238.245.2:60187     TIME_WAIT   -
tcp        0    432 172.104.246.242:22      80.99.202.213:53029     ESTABLISHED -
tcp6       0      0 :::22                   :::*                    LISTEN      -
tcp6       0      0 :::2377                 :::*                    LISTEN      -
tcp6       0      0 :::7946                 :::*                    LISTEN      -
udp6       0      0 :::7946                 :::*                                -
leheli@localhost:/captain$ docker ps -a
CONTAINER ID        IMAGE                                COMMAND             CREATED              STATUS                          PORTS               NAMES
d98838d3b6a7        dockersaturn/captainduckduck:0.2.2   "npm start"         4 seconds ago        Created                                             captain-captain.1.qyeh6dpw8byuc38zt9e4uzvwe
fbf5b1ec70e8        dockersaturn/captainduckduck:0.2.2   "npm start"         25 seconds ago       Created                                             captain-captain.1.rm7chbuoaga3d54ht8mg5xahn
c2a766911101        dockersaturn/captainduckduck:0.2.2   "npm start"         51 seconds ago       Created                                             captain-captain.1.wzv7n84sy6z7hgylbmg0sddj1
c358847575ed        dockersaturn/captainduckduck:0.2.2   "npm start"         56 seconds ago       Created                                             captain-captain.1.r8t4hpwzg4mykt4sk0th1rxvb
ea517e2421d6        dockersaturn/captainduckduck:0.2.2   "npm start"         About a minute ago   Created                                             captain-captain.1.utz8rjgeiqu4bnha7nefgkqun
ccf1da83b1fc        dockersaturn/captainduckduck         "npm start"         About a minute ago   Exited (0) About a minute ago                       jovial_liskov
16f5a30aff46        dockersaturn/captainduckduck         "npm start"         2 minutes ago        Exited (0) 2 minutes ago                            gifted_shockley
f8df66d79065        dockersaturn/captainduckduck         "npm start"         17 minutes ago       Exited (0) 17 minutes ago                           laughing_hermann
leheli@localhost:/captain$ docker service logs captain-captain --follow

After checking

leheli@localhost:/captain$ docker service ps captain-captain --no-trunc
ID                          NAME                    IMAGE                                NODE                DESIRED STATE       CURRENT STATE                      ERROR                                                                                                                                  PORTS
vej8a3ks59gb008h3fmtvq5dv   captain-captain.1       dockersaturn/captainduckduck:0.2.2   localhost           Ready               Preparing less than a second ago
y30ncpz0gcn3dwzm7dv2k134y    \_ captain-captain.1   dockersaturn/captainduckduck:0.2.2   localhost           Shutdown            Failed about a minute ago          "starting container failed: subnet sandbox join failed for "10.255.0.0/16": error creating vxlan interface: operation not supported"
ypds5anzcszyoxklvksc10sam    \_ captain-captain.1   dockersaturn/captainduckduck:0.2.2   localhost           Shutdown            Failed 3 minutes ago               "starting container failed: subnet sandbox join failed for "10.255.0.0/16": error creating vxlan interface: operation not supported"
yvizbrcrfku1e5xungr15isx1    \_ captain-captain.1   dockersaturn/captainduckduck:0.2.2   localhost           Shutdown            Failed 3 minutes ago               "starting container failed: subnet sandbox join failed for "10.255.0.0/16": error creating vxlan interface: operation not supported"
xf957gkai44cj3f50iq4yuao9    \_ captain-captain.1   dockersaturn/captainduckduck:0.2.2   localhost           Shutdown            Failed 4 minutes ago               "starting container failed: subnet sandbox join failed for "10.255.0.0/16": error creating vxlan interface: operation not supported"
leheli@localhost:/captain$
@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Dec 12, 2017

@iszlai this is a typical issue with Docker and Linode. They are using a version of kernel with some limited functionalities. Someone needs to tell them they should default this options to enabled 😕 Anyways.... there is a discussion and possible solution with Linode here: docker/machine#2753 (comment)

@githubsaturn

This comment has been minimized.

Copy link
Collaborator

githubsaturn commented Dec 12, 2017

@CoreyTrombley

  • Can you please output the result of docker service ps captain-captain --no-trunc?
  • on your server please do curl localhost:3000
  • Did you use captainduckduck serversetup and after that you cannot connect to IP:3000? If that's the case, then there is no problem. After initial setup, HTTPS will be enforced and you can only access captain using the URL e.g. captain.something.domain.com
@CoreyTrombley

This comment has been minimized.

Copy link

CoreyTrombley commented Dec 12, 2017

@githubsaturn as of today, I followed the steps and everything seems to be working. It might have been that I was on a public wifi at the time that i needed to "accept" some terms. There may have been some router firewall that I could not control.

Thank you for your support in this matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment