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

    Squid fails to start

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    4 Posts 2 Posters 6.7k 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.
    • A
      asterix
      last edited by

      Just did a clean reinstall and now Squid fails to start. Exact same configuration as before. Even executed squid -z but has no effect.

      Here is the log..

      2011/04/30 20:22:03| Starting Squid Cache version 2.7.STABLE9 for amd64-portbld-freebsd8.1…
      2011/04/30 20:22:03| Process ID 62394
      2011/04/30 20:22:03| With 11095 file descriptors available
      2011/04/30 20:22:03| Using kqueue for the IO loop
      2011/04/30 20:22:03| DNS Socket created at 0.0.0.0, port 22805, FD 6
      2011/04/30 20:22:03| Adding domain localdomain from /etc/resolv.conf
      2011/04/30 20:22:03| Adding nameserver 208.67.222.222 from /etc/resolv.conf
      2011/04/30 20:22:03| Adding nameserver 208.67.220.220 from /etc/resolv.conf
      2011/04/30 20:22:03| Referer logging is disabled.
      2011/04/30 20:22:03| logfileOpen: opening log /var/squid/log/access.log
      2011/04/30 20:22:03| Unlinkd pipe opened on FD 11
      2011/04/30 20:22:03| Swap maxSize 3072000 + 614400 KB, estimated 283569 objects
      2011/04/30 20:22:03| Target number of buckets: 14178
      2011/04/30 20:22:03| Using 16384 Store buckets
      2011/04/30 20:22:03| Max Mem  size: 614400 KB
      2011/04/30 20:22:03| Max Swap size: 3072000 KB
      2011/04/30 20:22:03| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
      2011/04/30 20:22:03| Store logging disabled
      2011/04/30 20:22:03| /var/squid/cache/10: (2) No such file or directory
      FATAL: Failed to verify one of the swap directories, Check cache.log
      for details.  Run 'squid -z' to create swap directories
      if needed, or if running Squid for the first time.
      Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
      CPU Usage: 0.144 seconds = 0.068 user + 0.076 sys
      Maximum Resident Size: 6176 KB
      Page faults with physical i/o: 0

      1 Reply Last reply Reply Quote 0
      • A
        asterix
        last edited by

        If I keep the "Level 1 subdirectories" to 16 it starts, but if I select 32/65/128 it dies with the same errors.

        And the log shows below errors while the Squid service is up.

        2011/04/30 20:44:34| storeDirClean: /var/squid/cache/07/7F: (13) Permission denied
        2011/04/30 20:44:49| storeDirClean: /var/squid/cache/08/7F: (13) Permission denied
        2011/04/30 20:45:04| storeDirClean: /var/squid/cache/09/7F: (13) Permission denied
        2011/04/30 20:45:19| storeDirClean: /var/squid/cache/0A/7F: (13) Permission denied
        2011/04/30 20:45:24| storeAufsOpenDone: (13) Permission denied
        2011/04/30 20:45:24| /var/squid/cache/00/00/00000000
        2011/04/30 20:45:24| storeSwapOutFileClosed: dirno 0, swapfile 00000000, errflag=-1
        (13) Permission denied
        2011/04/30 20:45:24| storeAufsOpenDone: (13) Permission denied
        2011/04/30 20:45:24| /var/squid/cache/00/00/00000001
        2011/04/30 20:45:24| storeSwapOutFileClosed: dirno 0, swapfile 00000001, errflag=-1
        (13) Permission denied
        2011/04/30 20:45:34| storeDirClean: /var/squid/cache/0B/7F: (13) Permission denied
        2011/04/30 20:45:49| storeDirClean: /var/squid/cache/0C/7F: (13) Permission denied
        2011/04/30 20:46:04| storeDirClean: /var/squid/cache/0D/7F: (13) Permission denied
        2011/04/30 20:46:19| storeDirClean: /var/squid/cache/0E/7F: (13) Permission denied
        2011/04/30 20:46:34| storeDirClean: /var/squid/cache/0F/7F: (13) Permission denied
        2011/04/30 20:46:49| storeDirClean: /var/squid/cache/00/80: (13) Permission denied
        2011/04/30 20:47:04| storeDirClean: /var/squid/cache/01/80: (13) Permission denied
        2011/04/30 20:47:19| storeDirClean: /var/squid/cache/02/80: (13) Permission denied
        2011/04/30 20:47:34| storeDirClean: /var/squid/cache/03/80: (13) Permission denied
        2011/04/30 20:47:42| storeAufsOpenDone: (13) Permission denied
        2011/04/30 20:47:42| /var/squid/cache/00/00/00000002
        2011/04/30 20:47:42| storeSwapOutFileClosed: dirno 0, swapfile 00000002, errflag=-1
        (13) Permission denied
        2011/04/30 20:47:49| storeDirClean: /var/squid/cache/04/80: (13) Permission denied

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          chown -R proxy:proxy /var/squid/cache
          

          Not sure how what might have stomped on that.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • A
            asterix
            last edited by

            I have tried that command already. That didn't work.

            I figured out the issue. Not sure if it's something to do with the latest snapshots or Squid itself. Pretty sure its not Squid as this issue never came up in builds before April 10th.
            When you install Squid the directory /var/squid/cache is deprived of system rights on "write" to a degree that Squid cannot crate the sub directories and fails to start.

            What I did was.. installed Squid, configured it, rebooted. Squid fails to start on first reboot. Deleted /var/squid/cache directory through File Manager and then went into packages and did a Squid "reinstall" package. This time the reinstall creates the cache directory with the correct access permissions. Reboot again to ensure everything is in order.

            I had one question on the level of Squid configuration. Please shed some light on this.

            I have 4GB RAM and 120GB hdd.

            What would be the best performance settings in Squid Cache Mgmt for..

            1. Hard disk cache size = ? (I have it at 3000MB)
            2. HArd Disk cache system = ? ( I have aufs)
            3. Memory cache size = ? (I have 1000MB)
            4. Minimum object size = ? (default 0 is fine??)
            5. Maximum object size = ? (I have 256KB)
            6. Level 1 subdirectories = ? (I have it at 16, should I go for more? If so how much?)
            7. Memory replacement policy = ? (I have Heap LFUDA)
              8 ) Cache replacement policy = ? (I have Heap LFUDA)
            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.