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

Docker Link host - Error: double colon in host identifier #96

Closed
Css-IanM opened this issue Aug 27, 2017 · 7 comments
Closed

Docker Link host - Error: double colon in host identifier #96

Css-IanM opened this issue Aug 27, 2017 · 7 comments

Comments

@Css-IanM
Copy link

I'm trying to run my server in a docker container. I'm setting the host as the container link and im seeing this error
Error: double colon in host identifier

export const mongoUser = new UserDatabase({ host: 'mongodb', port: 27017, database: 'test_db'});

Here is the link alias as mongodb as shown in the host property above.

version: '3'
services:
  api:
    image: central_server
    build: .
    ports:
     [ "5001:5001"]
    links:
     - "mongodb"
  mongodb:
    image: "mongo:latest"
    ports: 
     ["27017:27017"]

is there some quirk in the connection string builder i'm not seeing that's causing a malformed URI?

@notheotherben
Copy link
Member

Hi Ian,

Let me look into this for you quick and get back to you, there shouldn't be any issues with it, but as with all things...

@notheotherben
Copy link
Member

Hi Ian,

I've added a reproduction case to our test suite for this and, for the life of me, can't see any issues. The only thing I can think of is that maybe the underlying MongoDB client library is reading environment variables and doing something funky from that, but I'm not sure how easily you could test that.

@Css-IanM
Copy link
Author

I think you're on the right track with the environment variables. I'm looking into it a bit more this evening.

@notheotherben
Copy link
Member

Okay, let me know if you make any progress on that front, otherwise I'll try to out together a mockup environment and see if I can reproduce this in it.

@Css-IanM
Copy link
Author

Css-IanM commented Aug 29, 2017 via email

@Kaffiend
Copy link

Kaffiend commented Sep 15, 2017

This is related to environment variables for the Mongo Image. I didnt set them correctly. This can be closed.
derp Wrong account, I am @Css-IanM, my work organization account

@notheotherben
Copy link
Member

Awesome stuff, thanks for the heads up 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants