Site: MacOS NodeJS
Database Manager correctly reads the database with direct connection
I have a fairly simple entry page with a few fields
With local target it works perfectly
With remote target (after deploy) it causes error and does not complete the insertion.
Analyzing with Chrome the error is the following:
I looked a little here and a little there, but I couldn’t find the solution
If I use the remote target everything works fine, while if I use the Remote target (after the deployment) the page crashes and gives an error
I didn’t understand if I have to find the solution in Wappler, In Hetzner or ???
Reasoning on the fact that it works locally and not remotely, it is likely, at this point, that I am making a mistake
I need to go through the procedure and find out where I’m wrong
I am thinking of an error in using session variables
Thanks for the help anyway
The database works perfectly, but I think I understand my mistake
The action that blocks the procedure is the one used to insert a new record
Having created a Session variable in Global, in the action after the Query Insert I added a Session set to store the identity value in the Session variable
This is to be able to go to another page by providing the id value of the newly created record and without displaying values
Probably this is wrong, even if using with local target everything works fine (The record is registered in the database correctly and the data is passed to Stripe)
Among other things, the database is always the remote one
Correct, because it's failing to connect to your database "db". Your app's logic doesn't matter here, that's not the cause of the problem
The error message is "getaddrinfo EAI_AGAIN db"
This is a DNS failure trying to resolve the domain name "db". This "db" name is used only on Docker deployments, Docker resolves this "db" to the IP address of the container running the database
At this point, your remote app is trying to assume the database can be reached at the domain name "db" instead of something 127.0.0.1 (localhost), so we need to know how have you deployed your database - did you manually install it on your VPS?
I tried to create a simple query list of records
1)
With local target the records are inserted and displayed without problems on the remote database (the same used by the remote target)
2) The Wappler data manager views and modifies the database without problems
3) With Navicat the database is perfectly accessible, functional and modifiable
4) So the problem is necessarily the connection of Wappler to the database with remote target
5) It’s weird because I have other NodeJS sites on Hetzner that don’t have any problems
6) I no longer know what to do to solve this problem, maybe it is some file that is corrupt and that the deploy cannot solve?
I have checked several times and the configurations have always been identical, but surely something difficult to identify has happened
Since the project had recently started, I chose a drastic solution, I deleted everything and I reconfigured the project from the beginning (among other things using Wappler 5 Beta) recovering the pages
Now everything also works with remote target