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

EADDRNOTAVAIL when setting host with docker #465

Closed
bufke opened this Issue May 28, 2015 · 8 comments

Comments

Projects
None yet
3 participants
@bufke

bufke commented May 28, 2015

I'm trying to set the host so that I can use xmpp (based on #302). When set to 0.0.0.0 the web interface works fine while xmpp does not. When I set to the correct domain I get

app_1 | 
app_1 | events.js:72
app_1 |         throw er; // Unhandled 'error' event
app_1 |               ^
app_1 | Error: listen EADDRNOTAVAIL
app_1 |     at errnoException (net.js:905:11)
app_1 |     at Server._listen2 (net.js:1024:19)
app_1 |     at listen (net.js:1065:10)
app_1 |     at net.js:1147:9
app_1 |     at asyncCallback (dns.js:68:16)
app_1 |     at Object.onanswer [as oncomplete] (dns.js:121:9)

I'm using docker-compose with the provided fig.yml file.

@bufke

This comment has been minimized.

Show comment
Hide comment
@bufke

bufke May 29, 2015

As a workaround I was able to run without docker - just running node and mongo locally.

bufke commented May 29, 2015

As a workaround I was able to run without docker - just running node and mongo locally.

@bufke bufke changed the title from EADDRNOTAVAIL when setting host to EADDRNOTAVAIL when setting host with docker May 29, 2015

@hhaidar

This comment has been minimized.

Show comment
Hide comment
@hhaidar

hhaidar Jun 10, 2015

Member

Is this still an issue?

Member

hhaidar commented Jun 10, 2015

Is this still an issue?

@bufke

This comment has been minimized.

Show comment
Hide comment
@bufke

bufke Jun 10, 2015

I updated to 0.4.0 and tried again. Same settings as a known working instance (without docker). Instead of getting an error I get no output now.

app_1 |
app_1 | > lets-chat@0.4.0 prestart /usr/src/app
app_1 | > migroose
app_1 |

I will play around with it more latter. Settings file http://pastebin.com/VGAVxVDq

bufke commented Jun 10, 2015

I updated to 0.4.0 and tried again. Same settings as a known working instance (without docker). Instead of getting an error I get no output now.

app_1 |
app_1 | > lets-chat@0.4.0 prestart /usr/src/app
app_1 | > migroose
app_1 |

I will play around with it more latter. Settings file http://pastebin.com/VGAVxVDq

@sibartlett

This comment has been minimized.

Show comment
Hide comment
@sibartlett

sibartlett Jun 11, 2015

Contributor

Hi @bufke,

Could you try our new official Docker image? It's available on Docker Hub here: https://registry.hub.docker.com/u/sdelements/lets-chat/

Thanks

Contributor

sibartlett commented Jun 11, 2015

Hi @bufke,

Could you try our new official Docker image? It's available on Docker Hub here: https://registry.hub.docker.com/u/sdelements/lets-chat/

Thanks

@bufke

This comment has been minimized.

Show comment
Hide comment
@bufke

bufke Jul 1, 2015

I tried the new one. Sorry it took so long. If this only affect me feel free to close since I'm happy with not using docker. But in the interest of making this easier for others:

app_1   | Release 0.4.0
app_1   | 
app_1   | events.js:85
app_1   |       throw er; // Unhandled 'error' event
app_1   |             ^
app_1   | Error: listen EADDRNOTAVAIL
app_1   |     at exports._errnoException (util.js:746:11)
app_1   |     at Server._listen2 (net.js:1139:19)
app_1   |     at listen (net.js:1182:10)
app_1   |     at net.js:1280:9
app_1   |     at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:81:16)
app_1   |     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:99:10)

docker-compose.yml

app:
  image: sdelements/lets-chat
  links:
    - mongo
  volumes:
    - ./certs:/opt/certs
  ports:
    - 5000:5000
    - 5001:5001
    - 5222:5222
  environment:
    LCB_HTTP_ENABLE: true
    LCB_HTTP_HOST: 'chat.mydomain.com'
    LCB_HTTP_PORT: 5000
    LCB_HTTPS_ENABLE: false
    LCB_HTTPS_PORT: 5001
    LCB_HTTPS_KEY: key.pem
    LCB_HTTPS_CERT: certificate.pem
    LCB_XMPP_ENABLE: true
    LCB_XMPP_ROOM_CREATION: false
    LCB_XMPP_PORT: 5222
    LCB_XMPP_HOST: 'chat.mydomain.com'
    LCB_XMPP_TLS_ENABLE: true
    LCB_XMPP_TLS_KEY: /opt/certs/server.key
    LCB_XMPP_TLS_CERT: /opt/certs/server.crt
    LCB_ROOMS_PRIVATE: true


mongo:
  image: mongo:latest

When I remove the environment variables it works in the web interface as expected.

bufke commented Jul 1, 2015

I tried the new one. Sorry it took so long. If this only affect me feel free to close since I'm happy with not using docker. But in the interest of making this easier for others:

app_1   | Release 0.4.0
app_1   | 
app_1   | events.js:85
app_1   |       throw er; // Unhandled 'error' event
app_1   |             ^
app_1   | Error: listen EADDRNOTAVAIL
app_1   |     at exports._errnoException (util.js:746:11)
app_1   |     at Server._listen2 (net.js:1139:19)
app_1   |     at listen (net.js:1182:10)
app_1   |     at net.js:1280:9
app_1   |     at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:81:16)
app_1   |     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:99:10)

docker-compose.yml

app:
  image: sdelements/lets-chat
  links:
    - mongo
  volumes:
    - ./certs:/opt/certs
  ports:
    - 5000:5000
    - 5001:5001
    - 5222:5222
  environment:
    LCB_HTTP_ENABLE: true
    LCB_HTTP_HOST: 'chat.mydomain.com'
    LCB_HTTP_PORT: 5000
    LCB_HTTPS_ENABLE: false
    LCB_HTTPS_PORT: 5001
    LCB_HTTPS_KEY: key.pem
    LCB_HTTPS_CERT: certificate.pem
    LCB_XMPP_ENABLE: true
    LCB_XMPP_ROOM_CREATION: false
    LCB_XMPP_PORT: 5222
    LCB_XMPP_HOST: 'chat.mydomain.com'
    LCB_XMPP_TLS_ENABLE: true
    LCB_XMPP_TLS_KEY: /opt/certs/server.key
    LCB_XMPP_TLS_CERT: /opt/certs/server.crt
    LCB_ROOMS_PRIVATE: true


mongo:
  image: mongo:latest

When I remove the environment variables it works in the web interface as expected.

@sibartlett

This comment has been minimized.

Show comment
Hide comment
@sibartlett

sibartlett Jul 1, 2015

Contributor

@bufke there is no need to overrideLCB_HTTP_PORT.

This setting relates to the host of the network interface you wish the app to bind to - which is 0.0.0.0 when using Docker.

Contributor

sibartlett commented Jul 1, 2015

@bufke there is no need to overrideLCB_HTTP_PORT.

This setting relates to the host of the network interface you wish the app to bind to - which is 0.0.0.0 when using Docker.

@bufke

This comment has been minimized.

Show comment
Hide comment
@bufke

bufke Jul 3, 2015

Removing port didn't change anything. Removing the LCB_HTTP_HOST setting makes it start. I kept LCB_XMPP_HOST set and xmpp seems to work.

Is there anything we could do to make this easier to run? I makes sense to me now but I could see it hard to know which settings need set to ensure XMPP works. If XMPP host setting is required perhaps having XMPP enabled without a host should error out. On the wiki page it doesn't mention the XMPP HOST setting - only domain.

bufke commented Jul 3, 2015

Removing port didn't change anything. Removing the LCB_HTTP_HOST setting makes it start. I kept LCB_XMPP_HOST set and xmpp seems to work.

Is there anything we could do to make this easier to run? I makes sense to me now but I could see it hard to know which settings need set to ensure XMPP works. If XMPP host setting is required perhaps having XMPP enabled without a host should error out. On the wiki page it doesn't mention the XMPP HOST setting - only domain.

@bufke bufke closed this Jul 3, 2015

@sibartlett

This comment has been minimized.

Show comment
Hide comment
@sibartlett

sibartlett Jul 3, 2015

Contributor

@bufke woops, that was a typo - I meant LCB_HTTP_HOST.

XMPP_HOST was confusing, so it was renamed to XMPP_DOMAIN. This setting currently only affects what is displayed in the XMPP modal in the web interface.

Contributor

sibartlett commented Jul 3, 2015

@bufke woops, that was a typo - I meant LCB_HTTP_HOST.

XMPP_HOST was confusing, so it was renamed to XMPP_DOMAIN. This setting currently only affects what is displayed in the XMPP modal in the web interface.

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