The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

500 Internal Server Errors all of a sudden

Discussion in 'General Discussion' started by fishfreek, Mar 30, 2009.

  1. fishfreek

    fishfreek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    238
    Likes Received:
    0
    Trophy Points:
    16
    I havent changed any settings on the server in a very long time. Today I get reports that some of the domains hosted on the server are now giving 500 errors when visiting. Indeed a domain that worked yesterday for me no longer comes up. All I get is the standard 500 error page.

    The domain error log just reports "Premature end of script headers:" as the error. I don't understand why all of a sudden today out of the blue this would stop working.
     
  2. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    1.Directory permissions: your cgi-bin directory should be chmodded as 0755

    2.File permissions: your CGI script itself must also be 0755

    3.Transfer modes:

    If you are using FTP to transfer the CGI script to your server, then your FTP client is probably set to AUTO transfer mode. that is, it will try to figure out whether to use BINARY or ASCII mode without asking you. But depending on whether your CGI script came from a Windows or UNIX system, and whether it's going to a Windows or UNIX system, you may need to manually set your FTP client to use either ASCII or BINARY mode before transferring your CGI script.

    4.Also make sure that the first line of a CGI script must contain the path to the Perl binary on the server.

    5.In addition, a configuration problem in suEXEC, mod_perl, or another third party module can often interfere with the execution of your CGI and cause the "premature end of script headers" message.

    Hope this helps... :)
     
  3. jfoc

    jfoc Well-Known Member

    Joined:
    Sep 17, 2004
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    happend here too..

    Internal Server Error

    Could not fetch uid or gid for : root
     
  4. thobarn

    thobarn Well-Known Member

    Joined:
    Apr 25, 2008
    Messages:
    153
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    sanctum sanctorum
    For what it is worth, I experienced this too. Suddenly most WHM functions were returning 500 Internal server error with "Premature end of script headers..." for most UI reachable functionality. Seems to be resolved now, though Perl seems to have regressed to an earlier version. I had to update manually.

    I also received tye following email from cpaddons_report.pl

    Code:
    "Can't locate YAML/Syck.pm in @INC (@INC contains: /usr/local/cpanel /usr/local/cpanel/cpaddons /usr/local/cpanel /usr/local/cpanel/whostmgr/docroot/cgi /usr/local/cpanel/cpaddons /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.4/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.2/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.1/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.4/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.2/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /usr/local/cpanel/Cpanel/DataStore.pm line 10.
    BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/DataStore.pm line 10.
    Compilation failed in require at /usr/local/cpanel/Cpanel/cPAddons.pm line 11.
    BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/cPAddons.pm line 11.
    Compilation failed in require at /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl line 10.
    BEGIN failed--compilation aborted at /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl line 10."
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Please see this upgrade checklist.

    http://forums.cpanel.net/showthread.php?t=66166&highlight=upgrade+checklist

    The newest cPanel needs Perl 5.8.8 anything older than that, YMMV.
     
  6. thobarn

    thobarn Well-Known Member

    Joined:
    Apr 25, 2008
    Messages:
    153
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    sanctum sanctorum
    The thing is, I have been running cPanel 11.24.4-S33345 for a while now with no problem. Updates are set to manual and I did not update anything or made any configuration changes.

    500 errors just happened for a period of a couple of hours yesterday, then stopped happening by itself. At this point Perl was still not 5.8.8.

    A while later I received the email, which may or may not be related to the 500 incidents at which point updated to 5.8.8, but by that time 500 errors were gone anyways.
     
  7. BianchiDude

    BianchiDude Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2005
    Messages:
    619
    Likes Received:
    0
    Trophy Points:
    16
    Happened here too, the 1st on one server, and this morning on another.

    :confused:
     
  8. scottc

    scottc Well-Known Member

    Joined:
    Apr 21, 2002
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    This started a few minutes ago on a cPanel 11.24.4-C34960. Perl is v5.8.8. As far as I know nothing changed on the server.
     
  9. BubbaGum

    BubbaGum Active Member

    Joined:
    Nov 10, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Western US
    I've been fighting this snce yesterday. anyone have a solution?

    iver tried reinstalling perl (it was 5.8.8 prior) from thread:
    http://forums.cpanel.net/showthread.php?t=112633

    i've tried the yum updates at same thread.

    done the services restarts, server reboots, etc.

    I turned off suexec and that worked for simple scripts as long as you chmod dirs to 0755. but agoracart will not work because it needs the suexec enabled.

    we have current release and centos 4.7. It hit us without any intervention on our behalf as well so it had to be an auto update somewhere, possibly centos. Cannot find any resolution elsewhere, so wondering if possible to rool back centos or if there is something else that th cpanel community is aware of that might work as our servers are now useless for cgi and cpanel (perl)


    UPDATE:

    SOLVED!!!!

    for our problem, it seems the /usr/local/apache/logs/suexec_log hit 2G in size renaming solved the problem. There is a 2GB limit on the file and this was a long running server. So check the size of your logs if other things do not seem to work (or check them first). kudos to cpanel support staff (Ken F) for seeing this problem in mere minutes.
     
    #9 BubbaGum, Apr 5, 2009
    Last edited: Apr 6, 2009
  10. PbG

    PbG Well-Known Member

    Joined:
    Mar 11, 2003
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    16
    Thanks. This was the problem here too.

     
  11. dwykofka

    dwykofka Well-Known Member

    Joined:
    Aug 6, 2003
    Messages:
    394
    Likes Received:
    3
    Trophy Points:
    18
    The 2gb limit was my issue as well.

    Can we get a long term fix?
     
  12. Vision

    Vision Active Member

    Joined:
    Mar 18, 2002
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    You can choose from WHM to log rotate this file. Go to Apache Configuration -> Log Rotation and check suexec_log and suphp_log (if you use suphp).
     
Loading...

Share This Page