Network Troublshooting > Linux Servers Support

squid problem

<< < (2/6) > >>

Ricky:
Segun.. I think you can solve his problem here also..!! This site is to solve each other problem.. isn't ?? so no need for emaill etc.. !!

majid_mah:
hi
here is my squid.conf file
i think mayby my problem depended to iptables.
what is your idia?
----------------------------------------
http_port 192.168.1.1:3128
icp_port 3130
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 8 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
cache_dir ufs /var/spool/squid 1000 16 256
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .               0       20%     4320
acl all src 0.0.0.0/0.0.0.0
acl localnet src 192.168.1.0/255.255.255.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443 563     # https, snews
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access allow localnet
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /var/spool/squid
--------------------------------------------------
tnx for reply

Ricky:
Well.. here i think you should try the following modified version of your squid.conf.

--- Code: ---icp_port 3130
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 16 MB
maximum_object_size 4096 KB
cache_dir ufs /var/spool/squid 1000 16 256
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl localnet src 192.168.1.0/255.255.255.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access allow localnet
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /var/spool/squid
http_port 3128
--- End code ---
And tell us!!
And also one thing is to be noted that give proxy little time to build up its cache...

majid_mah:
hi
my speed is slow yet
here is my cache.log file.

--- Code: ---
2003/12/06 20:44:45| Starting Squid Cache version 2.5.STABLE1 for i386-redhat-linux-gnu...
2003/12/06 20:44:45| Process ID 4846
2003/12/06 20:44:45| With 1024 file descriptors available
2003/12/06 20:44:45| DNS Socket created at 0.0.0.0, port 32782, FD 5
2003/12/06 20:44:45| Adding nameserver 192.168.1.1 from squid.conf
2003/12/06 20:44:45| Adding nameserver 192.9.9.3 from squid.conf
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_READ_TIMEOUT': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_LIFETIME_EXP': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_READ_ERROR': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_WRITE_ERROR': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_SHUTTING_DOWN': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_CONNECT_FAIL': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_INVALID_REQ': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_UNSUP_REQ': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_INVALID_URL': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_SOCKET_FAILURE': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_DNS_FAIL': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_CANNOT_FORWARD': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_FORWARDING_DENIED': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_NO_RELAY': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_ZERO_SIZE_OBJECT': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_DISABLED': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_FAILURE': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_URN_RESOLVE': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_ACCESS_DENIED': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_CACHE_ACCESS_DENIED': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_CACHE_MGR_ACCESS_DENIED': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_PUT_CREATED': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_PUT_MODIFIED': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_PUT_ERROR': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_NOT_FOUND': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_FORBIDDEN': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_UNAVAILABLE': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_ONLY_IF_CACHED_MISS': (2) No such file or directory
2003/12/06 20:44:45| errorTryLoadText: '/usr/share/squid/errors/ERR_TOO_BIG': (2) No such file or directory
2003/12/06 20:44:45| Unlinkd pipe opened on FD 10
2003/12/06 20:44:45| Swap maxSize 1024000 KB, estimated 78769 objects
2003/12/06 20:44:45| Target number of buckets: 3938
2003/12/06 20:44:45| Using 8192 Store buckets
2003/12/06 20:44:45| Max Mem  size: 131072 KB
2003/12/06 20:44:45| Max Swap size: 1024000 KB
2003/12/06 20:44:45| Rebuilding storage in /var/spool/squid (CLEAN)
2003/12/06 20:44:45| Using Least Load store dir selection
2003/12/06 20:44:45| Set Current Directory to /var/spool/squid
2003/12/06 20:44:45| Loaded Icons.
2003/12/06 20:44:45| Accepting HTTP connections at 192.168.1.1, port 3128, FD 12.
2003/12/06 20:44:45| Accepting ICP messages at 0.0.0.0, port 192, FD 13.
2003/12/06 20:44:45| WCCP Disabled.
2003/12/06 20:44:45| Ready to serve requests.
2003/12/06 20:44:45| Done reading /var/spool/squid swaplog (5 entries)
2003/12/06 20:44:45| Finished rebuilding storage from disk.
2003/12/06 20:44:45|         5 Entries scanned
2003/12/06 20:44:45|         0 Invalid entries.
2003/12/06 20:44:45|         0 With invalid flags.
2003/12/06 20:44:45|         5 Objects loaded.
2003/12/06 20:44:45|         0 Objects expired.
2003/12/06 20:44:45|         0 Objects cancelled.
2003/12/06 20:44:45|         0 Duplicate URLs purged.
2003/12/06 20:44:45|         0 Swapfile clashes avoided.
2003/12/06 20:44:45|   Took 0.3 seconds (  17.5 objects/sec).
2003/12/06 20:44:45| Beginning Validation Procedure
2003/12/06 20:44:45|   Completed Validation Procedure
2003/12/06 20:44:45|   Validated 5 Entries
2003/12/06 20:44:45|   store_swap_size = 44k
2003/12/06 20:44:46| storeLateRelease: released 0 objects

--- End code ---

Ricky:
Here.. your cache is not working.. that's why you are facing slow speed..

Not sure what is the problem but it is about wrong file permission... you can add special user to your linux only for squid use..
So create a group "squser" and a user "sqgroup"
Now.. add the following lines.. to your squid.conf
--- Code: --- cache_effective_user squser
cache_effective_group sqgroup
--- End code ---

Now next step is to change the ownership of all the files used by squid to the "squser" and "sqgroup" including cache directory.

i am giving here you the example for chagining cache directory permission.

--- Code: ---chown squser:sqgroup /var/spool/squid
--- End code ---

In similar way make all the files rquired by squid owned by the user and gruop we have created and then run squid.. and check cache.log if it is unable to open any file..

Lastly i suggest you to use a  differnet separate partition for squid cache.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version