chatgpt-ui icon indicating copy to clipboard operation
chatgpt-ui copied to clipboard

Registration problem

Open bing-10 opened this issue 2 years ago • 20 comments
trafficstars

image After deploying through docker compose, I start test the client by register a new account. However, here comes the problem (400 bad request), is it due to my wrong configuration?

bing-10 avatar Jun 28 '23 09:06 bing-10

show the compos file you are using and the platform you are deploying it .....

Suleman-Elahi avatar Jul 03 '23 10:07 Suleman-Elahi

I just modified the SERVER_DOMAIN and APP_DOMAIN: image image

bing-10 avatar Jul 03 '23 11:07 bing-10

If you are using Google Cloud or AWS then have you allowed those ports through the firewall?

Suleman-Elahi avatar Jul 03 '23 13:07 Suleman-Elahi

I am using AWS and I can get access to the admin page like this: image but the problem occurs in the client

bing-10 avatar Jul 03 '23 14:07 bing-10

Try using the default SQLite database. You are using Postgres. If SQLite works, then you need to change localhost to internal IP address of the host machine.

Or, you can also use host.docker.internal instead of localhost.

postgres://postgres:[email protected]:49153/chatgpt

ilovefreesw avatar Jul 03 '23 16:07 ilovefreesw

I have left the postgres configuration commented to take the SQLite as default. Should I configure it explicitly? image

bing-10 avatar Jul 04 '23 02:07 bing-10

Is it working now ?

The problem with your setup is that you are using the localhost. That will not work.

Set DB_URL to what @ilovefreesw mentioned above.

Suleman-Elahi avatar Jul 04 '23 04:07 Suleman-Elahi

I set this but still got the error: image

image

bing-10 avatar Jul 04 '23 05:07 bing-10

That's strange .. post the log of docker-compose up command.

Suleman-Elahi avatar Jul 04 '23 06:07 Suleman-Elahi

image image image image image image

bing-10 avatar Jul 04 '23 08:07 bing-10

Yes, it is the problem with the Postgres srever name. I think you are using older version of Docker. Whatever the OS is this, find its IP address.

Tell me the output of ip addr show command.

Suleman-Elahi avatar Jul 04 '23 09:07 Suleman-Elahi

image

bing-10 avatar Jul 04 '23 10:07 bing-10

Then use this as the DB_URL = postgres://postgres:[email protected]:49153/chatgpt

And if it still doesn't work then create a new EC2 instance with Ubuntu 22.04 or Ubuntu 20.04 image.

Suleman-Elahi avatar Jul 04 '23 11:07 Suleman-Elahi

I tried this, but the problem remains unresolved.

bing-10 avatar Jul 04 '23 11:07 bing-10

Did it work when you used the default SQLite database?

Suleman-Elahi avatar Jul 04 '23 11:07 Suleman-Elahi

As for creating a new EC2 instance, I have not tried. Could you please give me some more detailed instructions? Thank you.

bing-10 avatar Jul 04 '23 11:07 bing-10

Where are you using it right now ? on Which cloud provider and operating system?

Suleman-Elahi avatar Jul 04 '23 11:07 Suleman-Elahi

Follow this tutorial: I think this is the same. https://www.youtube.com/watch?v=VKDU10gbYVQ

But it uses DigitalOcean ..so chnage that for yourself..of if you can afford DO then follow this tutorial.

Suleman-Elahi avatar Jul 04 '23 11:07 Suleman-Elahi

AWS, Ubuntu-22.04.1

bing-10 avatar Jul 04 '23 11:07 bing-10

Follow this tutorial: I think this is the same. https://www.youtube.com/watch?v=VKDU10gbYVQ

But it uses DigitalOcean ..so chnage that for yourself..of if you can afford DO then follow this tutorial.

Thank you, I'll take it as a reference.

bing-10 avatar Jul 04 '23 11:07 bing-10