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

Rewritten link command generates invalid host #28

Closed
wingrunr21 opened this issue Sep 29, 2015 · 8 comments
Closed

Rewritten link command generates invalid host #28

wingrunr21 opened this issue Sep 29, 2015 · 8 comments

Comments

@wingrunr21
Copy link

Hey,

It looks like the revamped link commands that were introduced in 6304729 are not functioning correctly. The host name that is generated for DATABASE_URL does not appear to be able to be resolved. This causes deploys to fail. Rolling back to the prior implementations resolves the issue (as that seems to inject the IP address vs a hostname).

@wingrunr21 wingrunr21 changed the title Rewritten link command generate invalid host Rewritten link command generates invalid host Sep 29, 2015
@wingrunr21
Copy link
Author

For a bit more info, it looks like the generated hostname (for my case) is being set to: dokku-postgres-program_pushfitnesscolorado_com. The actual docker container is named dokku.postgres.program_pushfitnesscolorado_com.

The hostname of the actual VPS is program.pushfitnesscolorado.com. The postgres container is named program_pushfitnesscolorado_com.

The rest of dokku is working correctly (vhost generation and such).

@josegonzalez
Copy link
Member

Can you do docker inspect CID on that container?

@wingrunr21
Copy link
Author

Truncated obviously:

...
"Config": {
        "Hostname": "6c56bf3c44b6",
        "Domainname": "",
}
...

@Flink
Copy link
Contributor

Flink commented Sep 29, 2015

I need to test this, but I think the problem might be the underscores in the hostname.

@Flink
Copy link
Contributor

Flink commented Sep 29, 2015

Ok, so underscores seems to be accepted in a hostname (ping works correctly) but when testing with a rails app, I have the following error:

Message from application: the scheme postgres does not accept registry part: postgres:e8ece2babb9a2d5afc4df3ba695c2e39@dokku-postgres-program_pushfitnesscolorado_com:5432 (or bad hostname?)

Renaming the docker link to dokku-postgres-program-pushfitnesscolorado-com instead seems to work as expected. I’ll make a patch ;)

@Flink
Copy link
Contributor

Flink commented Sep 29, 2015

@wingrunr21 fixed in latest master, thank you for reporting!

@josegonzalez
Copy link
Member

@Flink you think this is ready to port elsewhere?

@Flink
Copy link
Contributor

Flink commented Sep 29, 2015

I’ll port it at the same time I’m porting the revamped link/unlink commands (since otherwise we still use IP instead of hostnames)

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

No branches or pull requests

3 participants