Giter Club home page Giter Club logo

Comments (11)

matejkramny avatar matejkramny commented on May 21, 2024

Are the containers properly linked?
The other thing is if the semaphore config uses the correct hostname as the container link defines them.

Eg if you do docker inspect <id>, it should show that the containers link and share ports

from semaphore.

mickengland avatar mickengland commented on May 21, 2024

This is what inspect shows me for links. Only the semaphore container has links defined, as per the instructions.

$ sudo docker inspect -f "{{ .HostConfig.Links }}" semaphore
[/mongodb:/semaphore/mongo /redisio:/semaphore/redis]

sudo docker inspect -f "{{ .HostConfig.Links }}" mongodb
[]

[mick@mick-fedora semaphore]$ sudo docker inspect -f "{{ .HostConfig.Links }}" redisio
[]

For the Mongo container I see this:

"PortBindings": {
"27017/tcp": [
{
"HostIp": "127.0.0.1",
"HostPort": "27017"
}

Which is making me think it is only listening on localhost but I don't know how to fix that. Do I need to add another link at run time and if so where?

from semaphore.

matejkramny avatar matejkramny commented on May 21, 2024

Hmm no i think docker does port forwarding.

Have you got a config file for semaphore?

from semaphore.

mickengland avatar mickengland commented on May 21, 2024

I am using whatever configs are within the repos. I simply cloned the repo and went through the Docker Quickstart without making any changes to configs. Not sure what you are looking for but it will be identical to what is in this repository.

from semaphore.

mickengland avatar mickengland commented on May 21, 2024

@matejkramny Thanks for looking into this. This log from semaphore shows that it is trying to connect to the IP address of the Mongo container:
$ sudo docker logs semaphore
app.js:110 Semaphore listening on port 80
Mongodb Connection Error: { [MongoError: connect EHOSTUNREACH 172.17.0.25:27017]
name: 'MongoError',
message: 'connect EHOSTUNREACH 172.17.0.25:27017' }

and a docker inspect of mongodb shows that the IP address is correct.

"Gateway": "172.17.42.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"HairpinMode": false,
"IPAddress": "172.17.0.25",

I don't know enough about nodejs/mongo to troubleshoot this even if I attach a shell to the containers.

from semaphore.

matejkramny avatar matejkramny commented on May 21, 2024

I'll try the tutorial and let you know.

from semaphore.

matejkramny avatar matejkramny commented on May 21, 2024

Hey, Sorry I was a little busy yesterday. I'll have time today after work

Thanks

from semaphore.

mickengland avatar mickengland commented on May 21, 2024

Thanks @matejkramny I will check back later to see how it works out for you.

from semaphore.

matejkramny avatar matejkramny commented on May 21, 2024

I setup a brand new box (ubuntu 15.04 with docker) and copy-pasted all the steps in the "Docker quickstart" section and seems to work well.

Can you try:
docker run -it --rm --link mongodb:mongo castawaylabs/semaphore /bin/bash

Inside, you can ping mongo hostname, and prod it for open ports. If that doesn't work, then its a fault in docker or your firewall because I think docker sets up iptables to do port forwarding

from semaphore.

mickengland avatar mickengland commented on May 21, 2024

Thanks @matejkramny I think this is a bug in docker on Fedora 22. I found some posts on this elsewhere. You can close this issue now. I will get this running on a Ubuntu system.

from semaphore.

Echobob avatar Echobob commented on May 21, 2024

Closing upon request

from semaphore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.