Closed vanastassiou closed 5 years ago
Workaround: create missing /var/lib/dokku/services/postgres/pgtest/ID
file containing the local ID
value from the trace.
I was able to duplicate the issue as follows:
testone
postgres:list
"Command '['/usr/bin/dokku', 'postgres:create', 'testone']' returned non-zero exit status 1."
postgres:list
in container; the service will still be listed, but missing
statusAlso this way:
testthree
testthree
testthree
to get error "Command '['/usr/bin/dokku', 'postgres:create', 'three']' returned non-zero exit status 1."
postgres:list
in container; the service will still be listed, but perpetually restarting
statusSo this does look intermittent after all.
I also ran into something else that's interesting:
testone
and testonetwo
)testone
postgres:list
in container; the service will still be listed, but missing
statuspostgres:destroy testone
and confirmpostgres:list
in container; both testone
and testonetwo
will be missingThe Postgres containers also don't seem to be persistent between container rebuilds; nothing shows up when I postgres:list
, but if I try to re-add a service, I get the same error messages as in steps 5-6 in my first above section (no problems with the Redis services). I haven't yet investigated enough to be sure whether this is a plugin issue or my app's issue.
I tested this with raw service calls:
# dokku postgres:create testone
Waiting for container to be ready
Creating container database
Securing connection to database
=====> Postgres container created: testone
=====> Container Information
Config dir: /var/lib/dokku/services/postgres/testone/config
Data dir: /var/lib/dokku/services/postgres/testone/data
Dsn: postgres://postgres:bca5c4e6f60f44c6f9ee163e04a5b6ba@dokku-postgres-testone:5432/testone
Exposed ports: -
Id: b3d5bae7f7d8de3ea32ca48acd272d03a8f40dcd4f36a14913ce7c290f64405c
Internal ip: 172.17.0.33
Links: -
Service root: /var/lib/dokku/services/postgres/testone
Status: running
Version: postgres:11.2
root@www-1:/var/lib/dokku/plugins/enabled/postgres# dokku --force postgres:destroy testone
=====> Deleting testone
=====> Stopping container
Container stopped
Removing container
Removing data
=====> Postgres container deleted: testone
root@www-1:/var/lib/dokku/plugins/enabled/postgres# dokku postgres:create testone
Waiting for container to be ready
Creating container database
Securing connection to database
=====> Postgres container created: testone
=====> Container Information
Config dir: /var/lib/dokku/services/postgres/testone/config
Data dir: /var/lib/dokku/services/postgres/testone/data
Dsn: postgres://postgres:6d80c473d4d0b4056a424aac1d71b7e2@dokku-postgres-testone:5432/testone
Exposed ports: -
Id: 6dd9eb55b0f39213157dbbc25b9d9c6d459198ed15c62b7ec78817bed5721d45
Internal ip: 172.17.0.33
Links: -
Service root: /var/lib/dokku/services/postgres/testone
Status: running
Version: postgres:11.2
root@www-1:/var/lib/dokku/plugins/enabled/postgres# dokku postgres:list
NAME VERSION STATUS EXPOSED PORTS LINKS
gene postgres:10.2 running - -
roddenberry postgres:10.1 running - -
service_with_dashes postgres:11.2 running - -
testone postgres:11.2 running - -
Might be something in the app that is causing the service creation/destruction to bail in a weird way...
We definitely still have an issue where postgres:start
should correctly start the service even if it's "missing" though.
The 1.8.1 release of all the plugins now properly handles :start
calls. Any other issues regarding containers missing etc. is something that probably is in your app code, and can't be fixed in this plugin.
I used a GraphQL mutation in a locally installed GraphiQL UI to create
pgtest
, but got an error (that I didn't log and cannot duplicate) when using a mutation topostgres:link
the new service to an existing app. Here is some troubleshooting I attempted:For comparison purposes, I created a service directly in the container:
To test the mutation again, I created
pgtestagain
and it did not duplicate the error:Here's a trace of the
start
command for the defective container: