Error connecting: Etimedout (Working fine before 6.5.0)

I have a problem that I can’t solve here…
After upgrading to 6.5.0 Wappler doesn’t allow me to connect to a remote db using direct database connection (other software like heidisql can)

The db is mysql hosted on a droplet (DigitalOcean)

When I open the project I can see the previous state (because it was working fine until now):

image

And the settings are there:

But:

image

I know there’s an option now:

image

But that doesn’t work either.

Has anything else changed for regular use of direct database connection?
I’m using DO without ssh key for now, so I think it must be easy to connect.

Thanks in advance

@franse, quick question, are you using the resource manager in Wappler at all?

Hello @scott thanks for the reply.

Not really, just using remote connection for db and sftp for upload, like a regular hosting.
Global database works without issues using localhost and same credentials, so I’m confused

Mysql is installed inside the droplet, not using cloud database for the moment.

Ok, that was the only thing I could think of. I had a few issues there but was able to resolve them by resetting the password in the resource manager.

But if you are not using it then that would not work.

I am sure that you tried this, but are you able to connect to the database from an outside program (workbench, navicat, etc)?

Yes, using HeidiSQL without issues

Hey @franse,
Try logging in to Digital Ocean and going to your database cluster, click Secure This Database Cluster and adding your I.P by clicking on ‘Search For Sources’ (which should automatically fill in your I.P address, if not add it manually). Then click ‘Allow These Inbound Sources Only’.

Hello @Cheese

I’m not using database cluster, just a regular mysql under lamp
I know it’s not the best, but it’s just and old vps for some work, and everything was working fine, absolutelly fine some weeks ago.
I deleted all restrictions under mysqld.cnf restarted and still not working on Wappler
(but it does on heidisql)

Silly question but have you tried to add a new connection in the Database Manager and see if that allows for a connection? Or maybe even restart the Droplet/server?

Yes, tried everything before posting here :frowning_face:
I also have on github all related json under .wappler folder and seems nothing has changed
Last commit was about 2 months, I guess I was using Wappler 6.3 so I’m going to take a big coffee and do some more test
Thanks everyone

Ok! Found the issue, but, really an issue or what’s going on here?
I’m starting to get confused here on how this works.
And I think this is what @Marzio means here (sorry if not, but seems similar):

Please follow me, I hope my lack of english don’t confuse anyone:

First, I’m going to use Wappler Beta 6.0.0-b10:

In a development target, I have a database under Globals

On output:

Start upload for dmxConnections/dmxDatabase.php
cd ok, cwd=/var/www/html
14283 bytes transferred
Uploaded /dmxConnections/dmxDatabase.php successfully

Now if I go to direct database connection:

But I can connect on a query with databasetest:

Clicking this: image

Loads the db:

The exact same procedure on Wappler 6.5.0 doesn’t do anything when clicking on image:


and the wappler.log file has this:
[2024-04-20 22:21:04.168] load all tables and views....
[2024-04-20 22:21:04.168] run listTables...
[2024-04-20 22:21:04.168] got listTables error:  Error: Error calling getConnectionTables. invalid connection object given
    at file:///C:/Users/Fran/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/Databases/dmxDatabaseCommon_lib.js:125:21
    at e._execute (file:///C:/Users/Fran/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/jQuery/bluebird.min.js:29:19922)
    at i._resolveFromExecutor (file:///C:/Users/Fran/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/jQuery/bluebird.min.js:30:15342)
    at new i (file:///C:/Users/Fran/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/jQuery/bluebird.min.js:30:7039)
    at getConnectionTables (file:///C:/Users/Fran/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/Databases/dmxDatabaseCommon_lib.js:122:10)
    at Object.listTables (file:///C:/Users/Fran/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/databaseManager.js:1:132997)
    at f (file:///C:/Users/Fran/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/databaseManager.js:1:137059)
    at file:///C:/Users/Fran/AppData/Local/Wappler/resources/app/Shared/DMXzone/dmxAppCreator/UI/databaseManager.js:1:136448

So this confuse me a little, it seems I never used direct database connection on this project (inspected heidisql and seems I use a ssh tunnel that didn’t remember)

Now:
Wappler has an option that connects to the site and retrieves data? It’s like a bypass? Been using direct connection for all other projects, so didn’t noticed.
If so, is this a bug that we cannot connect on v6.5.0 but we are able on previous versions?

:exploding_head:

PS: In case you wonder: .wappler\targets\DO Production\databases\databasetest.json is trully empty
PS2: Yes, it’s called DO Production, but it is a development target.
It’s a very old project and my beginning on Wappler was that
PS3: MySQL8 is the new Old MySQL (deprecated) option?

@Teodor can I kindly ask, if you can explain me if this is a normal behavior?

@George please I need some clarification here.

1.- Create a database and restrict access to only localhost.
2.- Try to connect to database via direct database = no possible.
3.- Create a global database with “localhost” as host = possible
4.- Set target to development and:

  • Wappler loads schema only on versions minor than 6.5.0

So two questions:
1.- This is a normal behavior and always has been that way? (I always thought that schema comes from direct database only)
2.- Should I open a bug report as now that behavior is no longer available?

Thanks…

Note that using a non-direct database connection to access a database scheme in Wappler, seriously limits all the possibilities of database manager, turning it pretty much to a read only tool.

So we are more and more dropping the support for non-direct database connections.

This because direct connections gives you all the database power in Wappler and even on host that doesn’t allow direct connections you can use ssh tunneling for a secure direct access.

And that’s a great feature, but why can we have both?
There’s any counterpart to maintaining this?

All sounds perfect when we have all the control of the server.
But there are some cases where the control is very limited, and there’s not too much work we can do to solve that. So why can’t we have both ways?

1 Like

Fixed in Wappler 6.5.2

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