dokku-pg-plugin icon indicating copy to clipboard operation
dokku-pg-plugin copied to clipboard

Host and Port information are missing

Open vfrride opened this issue 9 years ago • 4 comments

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 35edfebd9bc4eafcdf9f3ecfc32cef3404853b9b

Any help would be greatly appreciated!

vfrride avatar Jun 19 '15 03:06 vfrride

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 } }

dzmitrys-dev avatar Jun 21 '15 17:06 dzmitrys-dev

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

dianseptiana avatar Jun 26 '15 12:06 dianseptiana

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/

masodev avatar Jul 24 '15 20:07 masodev

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

lastmjs avatar Sep 16 '15 17:09 lastmjs