NrgXnat / xnat-docker-compose

Build an XNAT server configuration with Docker Compose
Other
82 stars 85 forks source link

Port 22 bind: address already in use. #32

Closed EthicsGradient closed 4 years ago

EthicsGradient commented 4 years ago

Hi, Just trying to run this on a linux machine, specifically debian. Here's the errors I get. I don't think SSH should be enabled at all on this docker container.

ERROR: for xnat-docker-compose_xnat-web_1 Cannot start service xnat-web: b'driver failed programming external connectivity on endpoint xnat-docker-compose_xnat-web_1 (b12996d0ea4772e90917e6a9d03b804b686a0c14f6eedde33fc1ea01258f24e3): Error starting userland proxy: listen tcp 0.0.0.0:22: bind: address already in use'

ERROR: for xnat-web Cannot start service xnat-web: b'driver failed programming external connectivity on endpoint xnat-docker-compose_xnat-web_1 (b12996d0ea4772e90917e6a9d03b804b686a0c14f6eedde33fc1ea01258f24e3): Error starting userland proxy: listen tcp 0.0.0.0:22: bind: address already in use' ERROR: Encountered errors while bringing up the project.

Thanks James

rherrick commented 4 years ago

What branch of the repo are you running on? I don't see anywhere in any of the configurations where port 22 is exposed or published for the xnat-web container.

What version of Debian is this? I can run this successfully on Ubuntu, but haven't tried extensively with Debian.

EthicsGradient commented 4 years ago

Hi Rick, I just checked out the default (master) branch with a git clone. The systems I'm running it on are Debian Buster 10.3 and 10.4.

As I test I shut down the sshd server on my 10.4 host, and ran docker-compose up -d, which resulted in;  9:49:14 am BST  james  xnat-docker-compose  G:  master    ❱ docker-compose up -d Creating network "xnat-docker-compose_default" with the default driver Creating xnat-docker-compose_xnat-db_1 ... done Creating xnat-docker-compose_xnat-web_1 ... done Creating xnat-docker-compose_xnat-nginx_1 ... error

ERROR: for xnat-docker-compose_xnat-nginx_1 Cannot start service xnat-nginx: b'driver failed programming external connectivity on endpoint xnat-docker-compose_xnat-nginx_1 (26d631686348099cf1238071a6fa03ae2f726a8dd2ded533a716dad9a383447b): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use'

ERROR: for xnat-nginx Cannot start service xnat-nginx: b'driver failed programming external connectivity on endpoint xnat-docker-compose_xnat-nginx_1 (26d631686348099cf1238071a6fa03ae2f726a8dd2ded533a716dad9a383447b): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use' ERROR: Encountered errors while bringing up the project.

So one step further. I expect that you've got a cached image leading up to the ones you build which doesn't set SSH to --net=host, but something's changed upstream, so when I pulled in the whole thing.... I tend to think there's absolutely no point setting up SSH on a docker container for maintenance, so I'm a bit confused about it too.

All the best, and thanks for the excellent support James

On Thu, 4 Jun 2020 at 18:52, Rick Herrick notifications@github.com wrote:

What branch of the repo are you running on? I don't see anywhere in any of the configurations where port 22 is exposed or published for the xnat-web container.

What version of Debian is this? I can run this successfully on Ubuntu, but haven't tried extensively with Debian.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NrgXnat/xnat-docker-compose/issues/32#issuecomment-639008886, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3P4NKEFYLZQS4766HUEOLRU7NMBANCNFSM4NS22VSQ .

tamaramueller commented 4 years ago

Hi,

I'm having exactly the same issues. I get the same error message (bind: address already in use). I also cloned the master branch and I am working on ubuntu 18.04.

I tried changing the port specification 22:22 in the docker_compose.yml file to 23:23 (or 23:22 in another try). Both resulted in the docker container running without an error message, but when I tried to access it via 'localhost' I got

502 Bad Gateway
nginx/1.12.2

as an error message in the browser.

Thanks a lot for your support!

All the best, Tamara

kelseym commented 4 years ago

You can safely remove the line:

EthicsGradient commented 4 years ago

I'm not sure what purpose having an open SSH port on this container serves? If it's not critically important, would it be worth removing this in the repo?

On Tue, 16 Jun 2020 at 13:58, kelseym notifications@github.com wrote:

You can safely remove the line:

  • "22:22" from your docker-compose file if that port is in use on your host machine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NrgXnat/xnat-docker-compose/issues/32#issuecomment-644746339, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3P4NJKQXN6XV4ZKCKKCPLRW5UA7ANCNFSM4NS22VSQ .

rherrick commented 4 years ago

Yes, it should be removed. If you need shell access to that container, it’s easier to do through Docker itself:

$ docker exec --interactive --tty xnat-web bash bash-4.4#

If you need to copy files to and from the container (e.g. log files), you can do that through Docker as well:

$ docker cp xnat-web:/data/xnat/home/logs/application.log .

-- Rick Herrick Sr. Programmer/Analyst Neuroinformatics Research Group Washington University School of Medicine Phone: +1 (314) 273-1645

From: James notifications@github.com Reply-To: NrgXnat/xnat-docker-compose reply@reply.github.com Date: Tuesday, June 16, 2020 at 8:26 AM To: NrgXnat/xnat-docker-compose xnat-docker-compose@noreply.github.com Cc: "Herrick, Rick" jrherrick@wustl.edu, Comment comment@noreply.github.com Subject: Re: [NrgXnat/xnat-docker-compose] Port 22 bind: address already in use. (#32)

On Tue, 16 Jun 2020 at 13:58, kelseym notifications@github.com wrote:

You can safely remove the line:

  • "22:22" from your docker-compose file if that port is in use on your host machine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NrgXnat/xnat-docker-compose/issues/32#issuecomment-644746339, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3P4NJKQXN6XV4ZKCKKCPLRW5UA7ANCNFSM4NS22VSQ .

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/NrgXnat/xnat-docker-compose/issues/32#issuecomment-644763686, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAC2ZUL7VE4PYOWU6IUMS73RW5XHNANCNFSM4NS22VSQ.


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.