EAI_AGAIN Error 500

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:

What can it be?

What hosting are you using?
Here’s explanation about this error:

This error means DNS resolution of a domain name failed

This happens on a API Action step, either you mistyped the domain name of the URL you’re calling or the DNS resolution is failing for some reason

I had this happen in one of my servers, I had to change the DNS resolver from my provider’s to another (e.g.: Google’s DNS

Hetzner Cloud Ubuntu

I have read and tried to update npm install npm @ latest but nothing has changed

@Teodor @George

MacOS NodeJS / Hetzner Cloud

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 ???

Is you docker project deployed successfully to the remote target? Is the web and database running there?

Seems like database is not running.

1 Like

Oh, right, seems the DNS resolution for “db” is failing - are you using Wappler’s Docker deployment?

This is not a Hetzner’s issue, rather a deployment one

1 Like

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 on the remote server doesn’t seem to be deployed

@George @Apple

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 (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
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?

Go to another Wappler project that’s functional, switch to Remote target, and show the database configuration you have there:

Compare the “host” with the new project you have problems, it’ll certainly be different

It’s important to note in Wappler projects, database configuration is done in 2 places: Globals/db and Wappler Database manager

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

Thanks for the help anyway

Found the solution to the problem. It is described in:

and will be solved in the next update

1 Like

Fixed in Wappler 5.5.2

1 Like

This topic was automatically closed after 26 hours. New replies are no longer allowed.