Jump to content

Recommended Posts

Posted

Hi,

im trying to run a python script via cgi folder but getting a 500 error but the error logs dont show any information. All i can see in the error logs is below:

 

[Thu Feb 06 21:51:25.494273 2025] [cgid:error] [pid 104352:tid 104376] [client 146.90.205.82:0] AH01215: stderr from /home/razwanrazaq.helioho.st/httpdocs/cgi-bin/tradingTheCloseTrades2.cgi: failed to open log file /var/log/httpd/suexec_log, referer: https://tommy.heliohost.org/
[Thu Feb 06 21:51:25.494339 2025] [cgid:error] [pid 104352:tid 104376] [client 146.90.205.82:0] AH01215: stderr from /home/razwanrazaq.helioho.st/httpdocs/cgi-bin/tradingTheCloseTrades2.cgi: fopen: Permission denied, referer: https://tommy.heliohost.org/
[Thu Feb 06 21:51:25.494569 2025] [cgid:error] [pid 104352:tid 104376] [client 146.90.205.82:0] End of script output before headers: tradingTheCloseTrades2.cgi, referer: https://tommy.heliohost.org/
[Thu Feb 06 21:51:42.818643 2025] [cgid:error] [pid 104149:tid 104193] [client 146.90.205.82:0] AH01215: stderr from /home/razwanrazaq.helioho.st/httpdocs/cgi-bin/tradingTheCloseTrades2.cgi: failed to open log file /var/log/httpd/suexec_log, referer: https://tommy.heliohost.org/
[Thu Feb 06 21:51:42.818721 2025] [cgid:error] [pid 104149:tid 104193] [client 146.90.205.82:0] AH01215: stderr from /home/razwanrazaq.helioho.st/httpdocs/cgi-bin/tradingTheCloseTrades2.cgi: fopen: Permission denied, referer: https://tommy.heliohost.org/
[Thu Feb 06 21:51:42.819101 2025] [cgid:error] [pid 104149:tid 104193] [client 146.90.205.82:0] End of script output before headers: tradingTheCloseTrades2.cgi, referer: https://tommy.heliohost.org/

Please can you advise.

thanks

Razwan

Posted
stderr from /home/razwanrazaq.helioho.st/httpdocs/cgi-bin/tradingTheCloseTrades2.cgi: fopen: Permission denied

It's trying to open a file that it doesn't have permission to open, and failing. What file are you trying to open?

Posted
34 minutes ago, razwanrazaq said:

is there a better way to see the errors?

Here's our documentation for how to access the logs. https://wiki.helionet.org/View_Error_Logs But the fact that you posted the error log yourself means you already know how to view the error logs.

34 minutes ago, razwanrazaq said:

I'm not opening any files in my code

What is this then?

# ======= LOAD CHECKED VIDEOS =======
def load_checked_videos():
    if os.path.exists(CHECKED_VIDEOS_FILE):
        with open(CHECKED_VIDEOS_FILE, "r") as file:

Do you even know what your code is doing?

Posted

Your script had DOS line endings \r\n. Our servers run Linux (not Windows) so you need to use Linux line endings \n. Does it work now that I converted your line endings?

Posted

so yes, that has kind of worked but now i'm getting a different error.

2025-02-08 11:19:04 Error 146.90.205.82 504 GET /cgi-bin/tradingTheCloseTrades2.cgi HTTP/1.0 https://tommy.heliohost.org/ Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 967 Apache SSL/TLS access
2025-02-08 11:20:04 Warning 146.90.205.82   AH01220: Timeout waiting for output from CGI script /home/razwanrazaq.helioho.st/httpdocs/cgi-bin/tradingTheCloseTrades2.cgi, referer: https://tommy.heliohost.org/       Apache error
2025-02-08 11:20:04 Error 146.90.205.82   Script timed out before returning headers: tradingTheCloseTrades2.cgi, referer: https://tommy.heliohost.org/       Apache error
2025-02-08 11:20:04 Error 146.90.205.82   3204009#0: *843175 upstream timed out (110: Connection timed out) while reading response header from upstream       nginx error

I created my own debug/log file and it gets a timeout on the below are there any restrictions on external urls/api's?

2025-02-11 09:23:44,238 - DEBUG - URL being requested: GET https://youtube.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=PL6iyqX0myJ2H-0gSt6qMmA5ztI1jdnRZV&maxResults=1&key=<removed>&alt=json

Posted

so takes around a minute in total, below are some bits of the local log where the server script fails:

2025-02-11 21:39:49,432 - INFO - Start of script
2025-02-11 21:39:49,432 - INFO - main script start
2025-02-11 21:39:49,441 - INFO - file_cache is only supported with oauth2client<4.0.0
2025-02-11 21:39:49,451 - DEBUG - URL being requested: GET https://youtube.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=PL6iyqX0myJ2H-0gSt6qMmA5ztI1jdnRZV&maxResults=1&key=AIzaSyDt7H2TpNiCYPwbTMnm_zHVovDnhjQX8PA&alt=json
2025-02-11 21:39:49,815 - INFO - got video
2025-02-11 21:39:49,815 - INFO - foud video
2025-02-11 21:39:49,819 - DEBUG - Starting new HTTPS connection (1): notegpt.io:443
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...