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

Error: failed to refresh connections: pq: server "steampipe" does not exist #319

Closed
darrenlewisexperian opened this issue Mar 20, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@darrenlewisexperian
Copy link

Describe the bug
I've just installled Steampipe but I can't run any queries because it returns an error.

$ steampipe -v
steampipe version 0.3.0
$ steampipe plugin install steampipe
Installed plugin: steampipe v0.1.2
Documentation:    https://hub.steampipe.io/plugins/turbot/steampipe
$ steampipe query "select name from steampipe_registry_plugin;"
Error: failed to refresh connections: pq: server "steampipe" does not exist

Steampipe version (steampipe -v)
steampipe version 0.3.0

To reproduce
See above.

Expected behavior
Data should be returned.

Additional context
WSL is disabled on my company machine so I am running the latest Ubuntu docker image from Docker Hub and installing Steampipe on that and running it.

@darrenlewisexperian darrenlewisexperian added the bug Something isn't working label Mar 20, 2021
@e-gineer
Copy link
Contributor

@darrenlewisexperian Thanks for reporting this and sorry for the inconvenience.

I've been able to reproduce, and we're currently investigating for a workaround / fix.

e-gineer added a commit that referenced this issue Mar 20, 2021
@e-gineer
Copy link
Contributor

e-gineer commented Mar 20, 2021

I believe we've nailed this one down! Beyond the gross-ness of crash on first install (sorry, ugh) ... the root cause is interesting.

We do a number of Postgres options when running to optimize performance, memory etc for our embedded foreign data wrapper. (We're pretty much running an in-memory Postgres DB.)

One setting, synchronous_commit=off was affecting the install process. Basically, we're installing the Postgres foreign data wrapper extension and then starting the foreign server. But, because we shut down the DB immediately after doing that in some cases it would not finish committing those changes. Then, the foreign server (called steampipe) was not installed the next time we'd run, so you'd get the error above.

We're running through the test & release process now, so hope to have v0.3.2 fixing this available soon. I'll follow up here once it's published and we've done a final install test.

@e-gineer
Copy link
Contributor

@darrenlewisexperian @vielmetti

v0.3.2 is now available, and should work if you are doing a clean install. It does in my testing.

If you are having trouble from a previous install and still seeing the error above, then please delete your ~/.steampipe directory and try again with something like:

# Kill any left over steampipe processes
pkill -f steampipe
# Delete the corrupted / bad install database
rm -rf ~/.steampipe

Please let us know if this works / does not work / etc. Sorry for the hassle and thanks for the help tracking down this tricky timing issue!

e-gineer added a commit that referenced this issue Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants