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

Host and Port information are missing #76

Open
vfrride opened this issue Jun 19, 2015 · 4 comments
Open

Host and Port information are missing #76

vfrride opened this issue Jun 19, 2015 · 4 comments

Comments

@vfrride
Copy link

vfrride commented Jun 19, 2015

For some reason dokku seems to have forgotten my Host and Port information.

When I execute

dokku postgresql:info

I get:


docker: "inspect" requires a minimum of 1 argument.
See 'docker inspect --help'.

Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container or image
json: cannot unmarshal array into Go value of type struct { NetworkSettings struct { Ports nat.PortMap } }

       Host:
       Port:
       User: 'root'
       Password: '<redacted>'
       Database: 'db'

       Url: 'postgres://root:<redacted>@:/db'

When I try to start up my rails app I get:

URI::InvalidURIError: the scheme postgres does not accept registry part: root:<redacted>@<redacted>:32769: (or bad hostname?)

This all worked yesterday, and I can connect to the database using the credentials above, but when I tried to update my dokku version this started happening.

Dokku v0.3.18-80-gc0f8764
dokku-pg-plugin 35edfeb

Any help would be greatly appreciated!

@dzmitrys-dev
Copy link

dokku postgresql:link zappo zappo
docker: "inspect" requires a minimum of 1 argument.
See 'docker inspect --help'.

Usage: docker inspect [OPTIONS] CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container or image
json: cannot unmarshal array into Go value of type struct { NetworkSettings struct { Ports nat.PortMap } }

@dianseptiana
Copy link

Same for me, it seems that generated DATABASE_URL doesn't include host and port information, so the result DATABASE_URL is only like this "postgres://root:UQkWgxCP6S7v8Ptp@:/db", and it will cause error when deploying application with error message "the scheme postgres does not accept registry part: root:UQkWgxCP6S7v8Ptp@: (or bad hostname?) (URI::InvalidURIError)". Looking for solution of this issue

@masodev
Copy link

masodev commented Jul 24, 2015

Resolved after upgrading dokku to v0.3.22-30-g3525f69
If you have installed dokku from source, you may run the following commands to upgrade:

cd ~/dokku
git pull --tags origin master

# continue to install from source
sudo DOKKU_BRANCH=master make install

# upgrade to debian package-based installation
sudo make install

In case you experience errors while fetching docker use the following commands and repeat the last command which resulted to the error message:
$ rm -rf /var/lib/apt/lists/*
$ apt-get update

The upgrading guide can be found at http://progrium.viewdocs.io/dokku/upgrading/

@lastmjs
Copy link

lastmjs commented Sep 16, 2015

I am using dokku version 0.3.26, and when I run

dokku postgresql:link

I get

docker: "inspect" requires a minimum of 1 argument. See 'docker inspect --help'.
time="2015-09-16T11:51:32-06:00" level=fatal msg="json: cannot unmarshal array into Go value of   type map[string]interface {}"

And so my DATABASE_URL is similarly messed up with no domain or port:

DATABASE_URL: postgres://root:[password]@:/db

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

5 participants