Can't run a stand alone web app

I am attempting to run a stand alone web application on a Linux server.
I followed all the instructions given in various documents, but with no success (I get a timeout error by the server)
My question is: to run a stand alone web application you need to do something on the server about the port used (must it be opened manually or not needed?)

Thank you all.

[image]

if you replace an exeutable make sure it not runs and the port is not already in use.
have you start it manually from shell for a test?
usually it is registerd and runs as daemon.
try List Services using systemctl list-units --type=service
if you like to access a port from www you have to forward it in router in case
you will access this single xojo web application direct.
other option is to have your web app behind a web server so traffic goes from
www to web server like apache and this is configured to connect to your intern xojo web app.
if you like to access xojo web app via ssl direct from www you need a certificate beside exe which in mentioned in xojo docs.

Linux server

what kind of “Linux”?

Here’s a shout out to @Tim_Parnell’s excellent -Lifeboat tool that simplifies a lot of this.

5 Likes

Simplifies ALL of what has been asked tbf

In the information page I only can see that the OS is Linux and the version of Apache is 2.4.51

Since I am not a web apps guru, nor a Linux server expert, I followed the Xojo documentation in order to create and deploy stand alone web apps on Linux Server.
So:
a) I compile my app as Stand alone and assign the port 36000
b) I deploy folders and application that come from the compiler
c) I run the control panel of my web provider and open the Terminal window
d) I go to the folder where I deployed my app
e) I type the command "./MyWebApp --port=36000
f) I type the command “ps -Af” and I can see my app running

But when I open the browser and type the URL “www.mywebsite.it:36000” nothing starts, and after a while I get the error that the site takes too much time to respond.

Someone told me that the port 36000 must be manually opened on the server, but I am not convinced of that.

Someone told me that the port 36000 must be manually opened on the server, but I am not convinced of that.
that is possible. you can google it if you know what linux is installed.

test it local with browser http://127.0.0.1:36000/
see that you have an output
check firewall port is allowed
make sure incomming port can access this pc.
be sure your browser use http:// if you not setup ssl.

Neither any documentation, nor the Javier Rodriguez video tell me that the Port of the standalone app is to be opened.

I have absolutely zero knowledge of servers and even less of Linux OS, so I followed these instructions from @Jeannot_Muller step by step and it’s worked ever since: https://xojo.jeannot-muller.com/how-to-build-a-linux-server-for-xojo-web-2-ad9e54ae8b9a

@Nedi_Freguglia Yep, Linux can be a monster, if you are not used to it (yet).

I second the hint to use a tool like @Tim_Parnell 's LifeBoat which can a huge time safer, plus you can be sure that what you are trying to do is solid and safe.

But overall it doesn’t look too bad, if you are able to start your app. I’m a bit suprised by the port number, and would suggest a 4-digit range, for instance 4050. Be sure that you are using the same port in your compiled app, it is actually that port where you app is listening for visitors. Now, a full bunch of things can avoid your app being able to listen to the outside world: firewalls for instance, closed ports, etc.

Your best friend will probably be telnet to find out what the response of your server is. You can open as well an ssh tunnel to check if the side is then available under //localhost:. Perhaps you have a browser installed, which is already listening to your port, but not forwarding it to your app, etc.

Crossing my fingers. On linux you can type:

sudo lsof -i :<yourPort>

to see what might be listening already to this port. Though I think your app would not start if the port is occupied already. I can’t remember how Xojo Web is behaving on such a scenario.

If your data are sensitive I suggest Xojo Cloud or Tim’s Lifeboat. Again, it is not only about wasting time, but making your solution safe and secure.

1 Like

That is because it all depends on the server configuration. If the server is more secure and the ports are closed, then you need to open the port that you want to use. If the server doesn’t block the ports and you start your application that listens to port 36000, then it should work.

Also, most server installations leave open the web ports. In your case you have Apache running there. If you stop Apache and run your web app with the default ports, then your application should receive connections without problems.

Maybe Javier can add a note saying: “if your server firewall has all ports closed and you want to run your web app using a non-standard port, then you need to consult your server administration on how you can open the required port”.

1 Like

You also need to find out if SE Linux is running
If it is enforcing then that might need configuration

1 Like

I meant of course: a webserver (Apache, Nginx, etc.) installed :wink:

Thank you @MarkusR, @GarryPettet , @SteveP , @Christoph_Emrich , @Jeannot_Muller , @AlbertoD and @brian_franco , thank you a lot for your suggestions and for the time you have dedicated to me.
But my lack of knowledge both of the deep problems of web programming and of Linux servers force me to abandon (for now) the idea of stand alone applications, considering that the server is not mine, but of a provider, and I can’t do whatever I want.

Thanks again to all of you!

i guess you have only a web space contract with some other features.

1 Like