WebApp cannot be reached

I have a weird problem and I don’t know at this point if it’s a Linux/Ubuntu problem or a Xojo problem.

The situation is this: I have a Linux server, Ubuntu 20.04, and two Xojo WebApps running on different ports. I have set up services for both as explained in @Jeannot_Muller 's blog post Building your own Linux Server for Deploying a Xojo Web 2 App

Everything has worked fine since January, the Web Apps were running and I did not notice any disruption. Both apps serve as API services, so I have mobile apps which send GETs and POSTs to the Web Apps and receive their results. Since yesterday though one of the Web Apps quits and doesn’t restart (which it should due to the service).

When I do sudo systemctl status WebAppName.service, the server shows me it’s active and running but when I type the URL in the browser it says page not found. When I stop the service and restart (sudo systemctl start WebAppName.service), the WebApp loads for a few seconds and then quits again.

What I find odd is that the other Web App is still running without any disruption.

Does anybody have any clue what I should be looking at? Should I try a different port? I am no server expert, I just followed the steps in the above mentioned tutorial, that’s why I have no more ideas.

Perhaps there are some unhandled exceptions. I have seen this in one of my web apps. Mine is running in windows. The process is there but not responding. Once you restart it works again.

1 Like

Run this:
journalctl -b -a -f -n 500

see if you have an excdeption, make sure your UnhandledException returns the stack using
System.Log System.LoglevelCritical, "your stack line"

you’ll have less hassle debugging these errors/exceptions.

It can be:

  • And exception it will try to restart forever and ever.
  • The port is already in use
  • The system blocks something cause it’s not root (say your app uses port < 1024)
  • Something else happened?
1 Like

Thank you, that was a good idea because I did not have any code in the UnhandledException method previously. I now have but unfortunately there does not seem to be an unhandled exception.

Actually, when I do ps -aux it shows the app is still running so I believe I was wrong when I said it quit.

Thank your for your reply, I sent you a private message about this.