Web project works local not on server

Not sure what category to use on this one…

My web app connects to a MariaDB. The app has a log in screen that verifies the user and then connects that user to the correct databases.

I acquired a used Dell R630 server; so I upgraded from my 8 core I7 PC I was using as my server. It runs linux, so I cloned my OS drive, and installed all the drives into the server (R630 only has 2.5 drives, old server had 3.5)

Now my web app allows the user to log in, but the second screen does not show the list of allowed companies that user can work on. The app works fine on my development machine (it connects to the web server on my internal network) and it worked fine before I changed servers.

The R630 has 2 Xeon processors, so I ‘assume’ that is part of the issue??

The issue can be observed with a limited access user account here:

https://vimcor.com:9000
Username: tester
PW: testit

I guess my other choice is to downgrade to my old hardware and move the drives back, but I would really like to keep the new (to me) system…

I’d first test what happens if you just put a simple button on the login page that lets you bypass the call to the MariaDB and jumps to the 2nd screen (maybe have that button load any needed user-logged-in values to the session too if needed).

I’m just curious if it’s an untrapped database error that’s leaving the app hanging.

I don’t know mariadb, but in postgres you have to allow a remote client to connect to the database
by default only the server can connect to itself
may be it’s the same kind of restriction that you have ?

Maria can be very particular about logins and permissions. A change of IP or hostname can cause a Maria login to lose permissions to a database or table.

The way I would go about fault finding would be to ssh into the Linux server and run mysql directly on the console. Verify you can login to Maria with the username, run the query at the command line and take it from there.

Ok, however;

  1. it worked before I changed servers (I did clone the the OS drive)
  2. I gave the server an assigned IP address, same as the old server
  3. The user logs into the web app, the web app then logs into the database… so does that not mean that the user’s login ip would be the apache server?
  4. The program runs fine when run from my development machine, not on the server, but using the Xojo IDE to run it and it does connect to the databases on the server to run…

I did try to change database permissions to any host for the user account that access the databases, but there was no change.

To be honest I have never tried ‘cloning’ a Linux system disk to different hardware. There are serval directories (/proc /boot /dev /sys) that do not travel well. Whenever I have moved to new hardware I have reinstalled and restored the configuration files (/opt /etc /home and so on) over the top.

That tells you the app can work on some other system. The problem is you need it to work on the system it is not working on (!)

There are many things that could be preventing your web app from working. Generally fault finding server issues entails working logically and methodically from one end to the other. Maria appears to be the source of the missing data, so that is where I would start. ssh into the server and run the query that populates the company drop down directly on the server console. Once you know maria is working as it should, you can move on to the connection between maria and your Xojo app. The maria log file is your friend but you may need to increase the verbosity (to 2) to see login events.

Found it! Thank you everyone for the suggestions… I was able to track down the issue…

It was a DNS / router issue… after the first connection to the database, the second connection used a url that the router seems to have forgotten… it no longer flowed to the second database address.

1 Like