Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    LightSquid and 500 - Internal Server Error

    Scheduled Pinned Locked Moved pfSense Packages
    40 Posts 12 Posters 33.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • iorxI Offline
      iorx
      last edited by

      I'm going nuts on this one…

      Running:
      1.2.1-RC1
      built on Fri Sep 12 12:07:56 EDT 2008

      Having problem with:
      lightsquid-1.7.1

      Installed packages (pkg_info):
      bandwidthd-2.0.1_1 
      darkstat-3.0.708   
      gd-2.0.35,1       
      gettext-0.17_1     
      jpeg-6b_4         
      libiconv-1.11_1   
      lightsquid-1.7.1_1 
      mysql-client-5.0.51a
      openldap-client-2.4.10
      openldap-client-2.4.11
      p5-GD-2.39         
      perl-5.8.8_1       
      snort-2.8.2.1     
      squid-2.6.21       
      squid_radius_auth-1.10

      Config:
      Nothing out of the ordinary I think. Plain vanilla.

      Squid:
      logging to /var/squid/log with logrotate 30 days. (logfiles are present in that folder)
      transparent

      Lightsquid:
      Language: english
      Bar color: orange
      Report scheme: base
      Refresh: none

      Done:
      Uninstalled package through GUI and shell. Cleaned out all lightsquid things and reinstalled. No go!
      Tried the perl-lib exchange http://forum.pfsense.org/index.php?topic=7363.msg41918 . No go!

      What I think (I'm by no means a unix/perl/cgi guy): Perl and Lightsquid or some problem with the lightparser.pl

      Problem description:
      After installation of Lightsquid I push "Refresh now" and try to look at the report. Gives me "500 - Internal Server Error"

      To check the config:

      perl -w ./check-setup.pl

      Name "main::skipurl" used only once: possible typo at check-setup.pl line 38.
      Name "main::font" used only once: possible typo at check-setup.pl line 46.
      Name "main::graphreport" used only once: possible typo at check-setup.pl line 40.
      LightSquid Config Checker, © 2005 Sergey Erokhin GNU GPL

      LogPath  : /var/squid/log
      reportpath: /var/lightsquid/report
      Lang      : /usr/local/share/lightsquid/lang/eng
      Template  : /usr/local/www/lightsquid/tpl/base
      Ip2Name  : /usr/local/libexec/lightsquid/ip2name.dns
      Use of uninitialized value in string ne at check-setup.pl line 45.

      all check passed, now try access to cgi part in browser

      /lightsquid/index.cgi still gives me the "500".

      perl ./lightparser.pl

      Gives me nothing. But files gets created /var/lightsquid/report/
      drwxr-xr-x  2 root  wheel    512 Sep 18 02:05 .
      drwxr-xr-x  3 root  wheel    512 Sep 18 02:05 ..
      -rw-r--r--  1 root  wheel    90 Sep 18 02:05 .bigfiles
      -rw-r--r--  1 root  wheel    131 Sep 18 02:05 .features
      -rw-r--r--  1 root  wheel    171 Sep 18 02:05 .group
      -rw-r--r--  1 root  wheel    70 Sep 18 02:05 .realname
      -rw-r--r--  1 root  wheel    161 Sep 18 02:05 .total
      -rw-r--r--  1 root  wheel  18456 Sep 18 02:05 192.168.x.102
      -rw-r--r--  1 root  wheel    487 Sep 18 02:05 192.168.x.55

      perl -w ./lightparser.pl

      Name "main::lockpath" used only once: possible typo at lightparser.pl line 42.
      Name "main::MonthName" used only once: possible typo at lightparser.pl line 363.
      Name "main::bigfilelimit" used only once: possible typo at lightparser.pl line 264.
      Name "main::month" used only once: possible typo at lightparser.pl line 66.
      Name "main::perusertrafficlimit" used only once: possible typo at lightparser.pl line 336.
      Name "main::cfgpath" used only once: possible typo at lightparser.pl line 388.
      Name "main::hashhost" used only once: possible typo at lightparser.pl line 220.
      Name "main::sqlreq" used only once: possible typo at lightparser.pl line 225.
      Name "main::u3" used only once: possible typo at lightparser.pl line 162.
      Name "main::timereport" used only once: possible typo at lightparser.pl line 344.
      Name "main::u2" used only once: possible typo at lightparser.pl line 162.
      Name "main::hashname" used only once: possible typo at lightparser.pl line 220.
      Name "main::reportpath" used only once: possible typo at lightparser.pl line 319.
      Name "main::month2dec" used only once: possible typo at lightparser.pl line 165.
      Name "main::ip2name" used only once: possible typo at lightparser.pl line 39.
      Name "main::squidlogtype" used only once: possible typo at lightparser.pl line 117.
      Name "main::ip2namepath" used only once: possible typo at lightparser.pl line 39.
      Use of uninitialized value in string eq at lightparser.pl line 71.
      Use of uninitialized value in string eq at lightparser.pl line 72.
      Use of uninitialized value in string eq at lightparser.pl line 83.
      Use of uninitialized value in pattern match (m//) at lightparser.pl line 91.
      Use of uninitialized value in pattern match (m//) at lightparser.pl line 98.

      use file :: /var/squid/log/access.log
      Use of uninitialized value in string ne at lightparser.pl line 213, <ff>line 1.

      And allot of this:

      Use of uninitialized value in division (/) at ./lightparser.pl line 346, <ff>line 585.
      Use of uninitialized value in addition (+) at ./lightparser.pl line 346, <ff>line 585.
      Use of uninitialized value in division (/) at ./lightparser.pl line 346, <ff>line 585.
      Use of uninitialized value in addition (+) at ./lightparser.pl line 346, <ff>line 585.

      And end with: (debug on in .cfg)

      Make Report 20080918 (613 - log line parsed)
      run TIME: 1 sec
      LightSquid parser statistic report

      613 lines processed (average 613.00 lines per second)
                  613 lines parsed
                    0 lines recovered
                    0 lines notrecovered
                    0 lines skiped by bad year
                    0 lines skiped by date filter
                    0 lines skiped by Denied filter
                    0 lines skiped by skipURL filter

      Anyone got an Idea?

      Brgs,</ff></ff></ff></ff></ff>

      1 Reply Last reply Reply Quote 0
      • D Offline
        dvserg
        last edited by

        Running:
        1.2.1-RC1
        built on Fri Sep 12 12:07:56 EDT 2008
        
        Having problem with:
        lightsquid-1.7.1
        

        The first note: Now not need change Perl lib. You must return original lib to back!!
        This is http://forum.pfsense.org/index.php?topic=7363.msg41918 OLD non-actual information (lib.so now not be replaced).

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • iorxI Offline
          iorx
          last edited by

          Hello!

          Yes, I understood that changing the perl lib was not a good idea :) . I've returned everything to original versions. I only did the change of lib as a test.

          Could I provide any more info to help solve this "500" problem?

          1 Reply Last reply Reply Quote 0
          • D Offline
            dvserg
            last edited by

            @iorx:

            Hello!

            Yes, I understood that changing the perl lib was not a good idea :) . I've returned everything to original versions. I only did the change of lib as a test.

            Could I provide any more info to help solve this "500" problem?

            Im not sure. but pls look permissions /usr/local/www/lightsquid/index.cgi (i have /www)
            and content of file /usr/local/www/lightsquid/.htaccess

            Options FollowSymLinks ExecCGI
            DirectoryIndex index.cgi
            

            SquidGuardDoc EN  RU Tutorial
            Localization ru_PFSense

            1 Reply Last reply Reply Quote 0
            • iorxI Offline
              iorx
              last edited by

              Looks OK to me.

              -r-xr-xr-x  1 www  www      7015 Jul  6 08:25 index.cgi

              
              # cd /usr/local/www/
              # cd lightsquid/
              # ls -la
              total 2206
              drwxr-xr-x   3 root  wheel      512 Sep 18 02:03 .
              drwxr-xr-x  12 root  wheel     6144 Sep 18 01:04 ..
              -r--r--r--   1 www   www         56 Jul  6 08:25 .htaccess
              -r-xr-xr-x   1 www   www       2307 Jul  6 08:25 bigfiles.cgi
              -r-xr-xr-x   1 www   www       2556 Jul  6 08:25 check-setup.pl
              -r-xr-xr-x   1 www   www       9185 Jul  6 08:25 common.pl
              -r-xr-xr-x   1 www   www       4740 Jul  6 08:25 day_detail.cgi
              -r-xr-xr-x   1 www   www       1324 Jul  6 08:25 fixreport.pl
              -r-xr-xr-x   1 www   www       1210 Jul  6 08:25 get.cgi
              -r-xr-xr-x   1 www   www      10054 Jul  6 08:25 graph.cgi
              -r-xr-xr-x   1 www   www       6710 Jul  6 08:25 group_detail.cgi
              -r-xr-xr-x   1 www   www       7015 Jul  6 08:25 index.cgi
              -r-xr-xr-x   1 www   www      16353 Jul  6 08:25 lightparser.pl
              -rw-------   1 root  wheel  2129920 Sep 18 01:57 lighttpd.core
              -r-xr-xr-x   1 www   www       3779 Jul  6 08:25 month_detail.cgi
              -rw-r--r--   1 root  wheel      491 Sep 18 02:03 temp.txt
              -r-xr-xr-x   1 www   www       4757 Jul  6 08:25 topsites.cgi
              drwxr-xr-x   6 root  wheel      512 Sep 18 01:04 tpl
              -r-xr-xr-x   1 www   www       4038 Jul  6 08:25 user_detail.cgi
              -r-xr-xr-x   1 www   www       3132 Jul  6 08:25 user_month.cgi
              -r-xr-xr-x   1 www   www       4049 Jul  6 08:25 user_time.cgi
              -r-xr-xr-x   1 www   www       3572 Jul  6 08:25 whousesite.cgi
              # cat .htaccess
              Options FollowSymLinks ExecCGI
              DirectoryIndex index.cgi
              #
              
              
              1 Reply Last reply Reply Quote 0
              • iorxI Offline
                iorx
                last edited by

                Bump.

                Anyone got this working in latest 1.2.1?

                1 Reply Last reply Reply Quote 0
                • W Offline
                  wilagobler
                  last edited by

                  This had me baffled as well.

                  In index.cgi take a look at the shebang at the top of the file.  The path it has for perl is incorrect.  I made a symlink and now everything works.

                  
                  # head -n 3 /usr/local/www/lightsquid/index.cgi
                  #!/usr/bin/perl
                  #
                  # LightSquid Project (c) 2004-2005 Sergey Erokhin aka ESL
                  
                   # which perl
                  /usr/local/bin/perl
                  
                  # ln -s /usr/local/bin/perl /usr/bin/perl
                  
                  # which perl
                  /usr/bin/perl
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    dvserg
                    last edited by

                    Good job!
                    Thanks!

                    SquidGuardDoc EN  RU Tutorial
                    Localization ru_PFSense

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      AudiAddict
                      last edited by

                      I just posted this in the 1.2.1 thread section regarding the same problem.

                      Can somebody update the package to fix this issue? I don't know how to create a symlink :(

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        dvserg
                        last edited by

                        @AudiAddict:

                        I just posted this in the 1.2.1 thread section regarding the same problem.

                        Can somebody update the package to fix this issue? I don't know how to create a symlink :(

                        Execute from shell
                        ln -s /usr/local/bin/perl /usr/bin/perl

                        SquidGuardDoc EN  RU Tutorial
                        Localization ru_PFSense

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          AudiAddict
                          last edited by

                          For some reason, I can't reinstall it.

                          The directory is missing in /usr/local/www

                          Reinstalled package a bunch of times, no directory shows up even after refresh.

                          The xml and options do work in the gui, services does not display lightsquid though.

                          Is there anyway I could get this installed manualy, it seems the install through the gui isnt' working anymore.

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            dvserg
                            last edited by

                            Package not fixed
                            Can you execute from pfSense GUI
                            'Diagnostics: Execute command > Execute Shell command' next cmd (?) :

                            ln -s /usr/local/bin/perl /usr/bin/perl

                            SquidGuardDoc EN  RU Tutorial
                            Localization ru_PFSense

                            1 Reply Last reply Reply Quote 0
                            • A Offline
                              AudiAddict
                              last edited by

                              Thanks for the quick reply, I tried that, still no difference.

                              Even after reinstall of the package in GUI. It's not even making the directories/config files anymore.

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                sonick
                                last edited by

                                This recept helped to me:
                                ln -s /usr/local/bin/perl /usr/bin/perl

                                Thank you, dvserg.

                                1 Reply Last reply Reply Quote 0
                                • W Offline
                                  wilagobler
                                  last edited by

                                  I am having the same problem as AudiAddict now.  It seems unrelated to the perl path issue.  I think the package is broken, it does not install anything into /usr/loca/www/  so the lightsquid directory does not exist.

                                  1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    AudiAddict
                                    last edited by

                                    Jep I'm also still having this same problem.

                                    Even when I create the directories myself and give them chhmod 777, nothing happends.. no files get created

                                    1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      AudiAddict
                                      last edited by

                                      Problem fixed with the help of dvserg!! (THANKS!!)

                                      He asked me to post the instructions

                                      • Remove package from GUI
                                      • Go to the firewall shell and type pkg_info
                                      • If lightsquid is listed, use PKG_delete to remove it (pkg_delete lightsquid-1.7.1_1)
                                      • Reinstall from GUI now and it should be fixed!
                                      1 Reply Last reply Reply Quote 0
                                      • W Offline
                                        wilagobler
                                        last edited by

                                        That fixed the problem, thanks dvserg and Audi!

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          tester_02
                                          last edited by

                                          YAYYYYYYY.

                                          That fixed my final issue with pfsense.
                                          Finally pfsense 1.2.1 with squid/squidguard/bandwidthd/lightsquid ALL WORK!!!!!!

                                          1 Reply Last reply Reply Quote 0
                                          • R Offline
                                            ric2233
                                            last edited by

                                            Geat!Thanks wilagobler,Thanks dvserg! ;D ;D ;D ;D

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.