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

Cannot connect to Postgres database when deployed, but works on the local machine #3177

Open
transcendr opened this issue Sep 11, 2024 · 4 comments
Labels
bug Something isn't working question Further information is requested

Comments

@transcendr
Copy link

Describe the bug
Since upgrading to version 2.0.7 in order to get a fix for a bug related to credentials resetting, I've not been able to connect to my Postgres database when FlowWise is deployed to GCP. The environment variables are set. There's a .env file in both the docker folder and the server folder, just to be sure. This setup with these particular environment variables was working before when I had version 1.7.2 installed, deployed originally. But now after version 2.0.7, when I redeploy to GCP, there are no errors but my chat flows, credentials, etc. that are stored in the database are not retrieved (at least it appears so). They're not available and not visible in the UI.

Here are the variables that I have set associated with the database. Obviously, I've replaced the actual values with zeros. But you can see here what I actually have set:

image

Again, I want to stress that I don't see anything in the logs indicating that there's an error or issue establishing a connection with the database. So I'm not really sure what's going on. Also, if I run Flowise locally and access it on localhost, the connection appears to be established correctly because all of my chat flows and everything else that I've saved in Flow are available and can be edited. Could it be that GCP is for some reason not picking up the environment variables, or something else?

To Reproduce
Clone the latest version of Flowise version 2.0.7 and add the.env file with the above structured environment variables for the database. Follow the documentation for deploying to GCP on Kubernetes. Access the application via its external IP. Create a new chat flow, and you will see that the chat flow is indeed saved. I suspect it is saved to some local database or file system, Or do any other action that would typically update the database. You should see that the connection is not established.

Expected behavior
Flowise is connected to the Postgres database.

Screenshots
none

Flow
n/a

Setup
n/a

Additional context
none


@transcendr
Copy link
Author

I just confirmed by rolling back to 1.7.2 it is working again with the same config vars.

@HenryHengZJ
Copy link
Contributor

how are you installing Flowise? Docker, npx, or git?

@transcendr
Copy link
Author

transcendr commented Sep 12, 2024

git clone, checking out the version tag, but deployment to GCP is via Docker.

@HenryHengZJ
Copy link
Contributor

does it work when setting up locally? we havnet changed anything on the backend database side, so it should still be the same as before

@HenryHengZJ HenryHengZJ added bug Something isn't working question Further information is requested labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants