Jump to content

[Solved] Python script not working


mth5

Recommended Posts

I tried to run a python script using CGI in the below link:

https://loadbox.helioho.st/services/simplytranslate/main.py

But what I got is a 500 internal server error. I already added the content-type header and set the permissions to rwx r-x r-x as instructed in the wiki. Here is the error log message “End of script output before headers: main.py, referer: https://www.helionet.org.

If this cannot be solved due to a long-term problem of plesk, can it be run at the backend via SSH? I’m trying only to host a service instance. Thank you.

Link to comment
Share on other sites

Krydos is the Python expert here. 

That said, I looked at the code, and based on the last few lines of code (which are supposed to make it listen on 0.0.0.0 port 5000), it looks like this is a custom daemon (standalone server that listens on its own port and doesn't serve through Apache/Nginx), which is not supported on the shared hosting. If that's how this is supposed to work, you'd need to buy a VPS.

Edited by wolstech
Typo
Link to comment
Share on other sites

Correct, inbound port 5000 is not open, nor do we allow inbound ports like this on shared hosting -- Johnny, Ricky, Tommy, Lily, and Morty plans. You are able to run this sort of script on our VPS plans however, where you get root SSH access, control over the firewall including all inbound and outbound ports, and you have the whole server to yourself. You can see the VPS plans at https://heliohost.org/vps/

Link to comment
Share on other sites

  • Krydos changed the title to [Solved] Python script not working
  • Krydos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...