Kloadut / dokku-pg-plugin

PostgreSQL plugin for Dokku
201 stars 75 forks source link

Host and Port information are missing #76

Open vfrride opened 9 years ago

vfrride commented 9 years ago

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!

dzmitrys-dev commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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