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

    Squidguard Error

    Scheduled Pinned Locked Moved Cache/Proxy
    10 Posts 7 Posters 7.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.
    • J
      jaybee
      last edited by

      I am using squidguard-devel and squid3 (although i also have the same problem on squid and squidguard beta).  When I go to youtube.com, the top banner ad is replaced with:

      ERROR
      The requested URL could not be retrieved

      The following error was encountered while trying to retrieve the URL: http://172.16.1.1:88/sgerror.php?

      Zero Sized Reply

      Squid did not receive any data for this request.

      Your cache administrator is admin@localhost.

      The strange thing is that 172.16.1.1:88 is the address of the admin gui.  If I go to admin access page in the gui and blank out the TCP port field then I don't get the error.  If I change the port to anything but blank then the error above comes up on youtube.com only (that I know of) but with the 88 replaced by what ever port I changed the admin GUI to.  What is the world does having a port specified for the admin gui have to do with this squid error?

      1 Reply Last reply Reply Quote 0
      • J
        jaybee
        last edited by

        UPDATE:  If I wait several minutes once going to youtube.com.  The blank space at the top where the ad normally is will give me the following error if I have the TCP port field blank for the admin gui port. If I specify a port for the admin gui then I get the error in the previous message immediately.

        ERROR
        The requested URL could not be retrieved

        The following error was encountered while trying to retrieve the URL: http://172.16.1.1/sgerror.php?

        Connection to 172.16.1.1 failed.

        The system returned: (60) Operation timed out

        The remote host or network may be down. Please try the request again.

        Any ideas?

        1 Reply Last reply Reply Quote 0
        • L
          Legion
          last edited by

          I'm messing around with squidGuard and came across the same error. It's coming from these lines in squidguard_configurator.inc:

          
          # -------------------------------------------------------------------------------------------------
          # sg_redirector_base_url
          #   $url - url where redirect to
          #   $use_internal - ignore 'Redirect mode' option, use internal (for rebuild config, for example)
          #
          # -------------------------------------------------------------------------------------------------
          function sg_redirector_base_url($rdr_info, $redirect_mode)
          {
              global $squidguard_config;
              $rdr_path = '';
          
              # gui port, ip & proto
              $guiip = (!empty($squidguard_config[F_CURRENT_LAN_IP])) ? $squidguard_config[F_CURRENT_LAN_IP] : '127.0.0.1';
              $guiport = (!empty($squidguard_config[F_CURRENT_GUI_PORT])) ? $squidguard_config[F_CURRENT_GUI_PORT] : '80';
              $rdr_path = "http://$guiip:$guiport" . REDIRECT_BASE_URL;
              ...
          
          

          Since most of us are probably using https for the webgui, this code won't find sgerror.php. I happen to be running a lighttpd server on port 80 as well, but this code won't find that either because it will use my https webgui port.

          I don't know php or how much about pfSense state the code can determine at this level. Is it possible to know if the webgui is in https mode? If so, $rdr_path should reflect that.

          1 Reply Last reply Reply Quote 0
          • L
            Legion
            last edited by

            Actually, I tried editing my squidguard_configurator.inc code to use https and got certificate errors. So in my case it works best if I leave the protocol the same but hardcode $guiport to '80'. But this relies on my having my second lighttpd running on 80 and won't work for most users. However, it now presents the error messages I expect, using:

            
            # -------------------------------------------------------------------------------------------------
            # sg_redirector_base_url
            #   $url - url where redirect to
            #   $use_internal - ignore 'Redirect mode' option, use internal (for rebuild config, for example)
            #
            # -------------------------------------------------------------------------------------------------
            function sg_redirector_base_url($rdr_info, $redirect_mode)
            {
                global $squidguard_config;
                $rdr_path = '';
            
                # gui port, ip & proto
                $guiip = (!empty($squidguard_config[F_CURRENT_LAN_IP])) ? $squidguard_config[F_CURRENT_LAN_IP] : '127.0.0.1';
                # $guiport = (!empty($squidguard_config[F_CURRENT_GUI_PORT])) ? $squidguard_config[F_CURRENT_GUI_PORT] : '80';
                $guiport = '80';
                $rdr_path = "http://$guiip:$guiport" . REDIRECT_BASE_URL;
                ...
            
            
            1 Reply Last reply Reply Quote 0
            • J
              jolebole
              last edited by

              I am surprised that there is no  resolution for this problem yet. Some recommend use http for the admin gui and the problem goes away or use an external error page, which might be a second best possible option.

              1 Reply Last reply Reply Quote 0
              • D
                doktornotor Banned
                last edited by

                Why are you reviving zombie threads? :(

                1 Reply Last reply Reply Quote 0
                • J
                  jolebole
                  last edited by

                  Well l, I searched for a solution. Found 10 threads with the same problem and no solution. Didn't even noticed its a buried thread.

                  1 Reply Last reply Reply Quote 0
                  • S
                    Snailkhan
                    last edited by

                    me also facing similar error.
                    I get this error for sites that are blocked.
                    @OP
                    were you able to find a solution for it ?

                    1 Reply Last reply Reply Quote 0
                    • E
                      exa_gon
                      last edited by

                      Someone have find a solution ? I 've the same error.

                      1 Reply Last reply Reply Quote 0
                      • R
                        rharder
                        last edited by

                        Zombie thread or not, this long-standing problem without a solution is crazy.

                        With squid == websites broken

                        Without squid == websites work

                        Apparently browsers don't mind having dropped connections or whatever else is going on.  Why does squid cause a greater failure than apparently the source error?

                        -Rob

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