connect to external server (not localhost) then client.get_status() = 1 and i cant get a connection! #31
-
When I try to connect to an external psql server (not localhost) I always get client.get_status () = 1 and I can't connect! |
Beta Was this translation helpful? Give feedback.
Replies: 22 comments 9 replies
-
Your server may not be accessible from the outside. try to connect to your server using another postgres client to make sure the server is accessible. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
do you use ssl when logging in? |
Beta Was this translation helpful? Give feedback.
-
in the ssl parameter of the connect_to_host() method. |
Beta Was this translation helpful? Give feedback.
-
exactly the same problem |
Beta Was this translation helpful? Give feedback.
-
It's strange to me it works. I am using the new version of PostgreSQLClient for godot 3.4. Maybe you should test it. In the meantime I will investigate the problem. |
Beta Was this translation helpful? Give feedback.
-
no doubt a problem with the tcp socket. |
Beta Was this translation helpful? Give feedback.
-
The version for godot 3.4 has not yet been released in the assetLib. You need to download the main branch of this reference. |
Beta Was this translation helpful? Give feedback.
-
Please report debug errors and notices related to PostgreSQLClient to me. Thank you for reporting your issue. I will write here if there is anything new about the problem. |
Beta Was this translation helpful? Give feedback.
-
Feel free to use breakpoints in the code to see which line exactly is blocking. |
Beta Was this translation helpful? Give feedback.
-
the problem seems to be in the function: the client.get_status() value is always 1 (connecting) when i try to connect to a external psql-server, but the value has to be 2 (connected) |
Beta Was this translation helpful? Give feedback.
-
That's good I see where the problem comes from! It depends on the connection time to the server. In fact I am not checking that the connection has been established in an infinite loop. The problem occurs when the server takes a long time to establish the connection. This also explains why it works with "localhost". My server was quick to establish the connection, so I didn't see the problem. |
Beta Was this translation helpful? Give feedback.
-
I updated the main branch. Download it and test it. The problem should be resolved. Note that the main branch is not finished so I will invite you to re-download it when I publish the version to the assetLib. |
Beta Was this translation helpful? Give feedback.
-
Now i am using godot v3.4 beta1 and it works! Thanks very much! (In the function connect_to_host (): client.get_status () is still 1, I don't know why now, shouldn't the value be 2? But hey, it works! ;-) |
Beta Was this translation helpful? Give feedback.
-
The state is 2 when the connection established signal () is output. |
Beta Was this translation helpful? Give feedback.
-
Now I have found that with the current PostgreSQLClient.gd version I can access an external server, but no longer a localhost, which would also be important for the test environment for developing my software. |
Beta Was this translation helpful? Give feedback.
-
Hello, I will investigate this problem right away. Anyway all the tests done before release worked .... Note that I'm only 18 and started programming in GDScript 3 years ago so I'm sorry if you encounter problems in my projects. 😭 |
Beta Was this translation helpful? Give feedback.
-
I changed the following and now the connection to the local host works. var counter := 0 |
Beta Was this translation helpful? Give feedback.
-
You don't have to apologize. On the contrary, you help the project to become better. I updated, please test PostgreSQLClient locally and remotely. 😄 |
Beta Was this translation helpful? Give feedback.
-
Please feel free to report any bugs you may encounter. 👍 |
Beta Was this translation helpful? Give feedback.
I updated the main branch. Download it and test it. The problem should be resolved. Note that the main branch is not finished so I will invite you to re-download it when I publish the version to the assetLib.