[squid-users] unable to open http socket

yannick.rousseau at tutanota.com yannick.rousseau at tutanota.com
Wed Dec 4 12:17:54 UTC 2019


Hi everybody,

I'm using debianedu (stretch) with squid 3.5. 
I would like to configure my squid through a parent proxy (172.16.103.254:3128).
I give you my issues at the beginning of this post, and my squid config at the end.
-> When I start squid on my debian stretch, and check if everything is ok, I've got the message "Unable to open HTTP Socket":

# service squid status
● squid.service - LSB: Squid HTTP Proxy version 3.x
   Loaded: loaded (/etc/init.d/squid; generated; vendor preset: enabled)
   Active: active (running) since Tue 2019-12-03 12:41:48 AST; 2s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10838 ExecStop=/etc/init.d/squid stop (code=exited, status=0/SUCCESS)
  Process: 10852 ExecStart=/etc/init.d/squid start (code=exited, status=0/SUCCESS)
Main PID: 10893
    Tasks: 6 (limit: 4915)
   CGroup: /system.slice/squid.service <http://system.slice/squid.service>
           ├─  818 /usr/sbin/squid -YC -f /etc/squid/squid-debian-edu.conf
           ├─ 2164 (squid-1) -YC -f /etc/squid/squid-debian-edu.conf
           ├─ 2165 (logfile-daemon) /var/log/squid/access.log
           ├─ 2166 (unlinkd)
           ├─ 2167 (pinger)
           └─10891 /usr/sbin/squid -YC -f /etc/squid/squid-debian-edu.conf

déc. 03 12:41:47 tjener.intern systemd[1]: Starting LSB: Squid HTTP Proxy version 3.x...
déc. 03 12:41:47 tjener.intern squid[10891]: Squid Parent: will start 1 kids
déc. 03 12:41:47 tjener.intern squid[10852]: Starting Squid HTTP Proxy: squid.
déc. 03 12:41:47 tjener.intern squid[10891]: Squid Parent: (squid-1) process 10893 started
déc. 03 12:41:47 tjener.intern systemd[1]: squid.service: PID file /var/run/squid.pid not readable (yet?) after start: No such file or directory
déc. 03 12:41:48 tjener.intern systemd[1]: squid.service: Supervising process 10893 which is not our child. We'll most likely not notice when it exits.
déc. 03 12:41:48 tjener.intern (squid-1)[10893]: Unable to open HTTP Socket
déc. 03 12:41:48 tjener.intern systemd[1]: Started LSB: Squid HTTP Proxy version 3.x.
déc. 03 12:41:48 tjener.intern squid[10891]: Squid Parent: (squid-1) process 10893 exited with status 1



-> When I look the cache log, I've got a "commBind: Cannot bind socket FD 17 to [::]:3128: (98) Address already in use":

2019/12/03 12:39:56 kid1| Closing Pinger socket on FD 19
2019/12/03 12:39:56| pinger: Initialising ICMP pinger ...
2019/12/03 12:39:56| pinger: ICMP socket opened.
2019/12/03 12:39:56| pinger: ICMPv6 socket opened
2019/12/03 12:39:56| Pinger exiting.
2019/12/03 12:41:47 kid1| Set Current Directory to /var/spool/squid
2019/12/03 12:41:47 kid1| Starting Squid Cache version 3.5.23 for x86_64-pc-linux-gnu...
2019/12/03 12:41:47 kid1| Service Name: squid
2019/12/03 12:41:47 kid1| Process ID 10893
2019/12/03 12:41:47 kid1| Process Roles: worker
2019/12/03 12:41:47 kid1| With 65535 file descriptors available
2019/12/03 12:41:47 kid1| Initializing IP Cache...
2019/12/03 12:41:47 kid1| DNS Socket created at [::], FD 6
2019/12/03 12:41:47 kid1| DNS Socket created at 0.0.0.0, FD 8
2019/12/03 12:41:47 kid1| Adding nameserver 127.0.0.1 from /etc/resolv.conf
2019/12/03 12:41:47 kid1| Adding domain intern from /etc/resolv.conf
2019/12/03 12:41:47 kid1| Logfile: opening log daemon:/var/log/squid/access.log
2019/12/03 12:41:47 kid1| Logfile Daemon: opening log /var/log/squid/access.log
2019/12/03 12:41:48 kid1| Unlinkd pipe opened on FD 14
2019/12/03 12:41:48 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2019/12/03 12:41:48 kid1| Store logging disabled
2019/12/03 12:41:48 kid1| Swap maxSize 11758592 + 262144 KB, estimated 924672 objects
2019/12/03 12:41:48 kid1| Target number of buckets: 46233
2019/12/03 12:41:48 kid1| Using 65536 Store buckets
2019/12/03 12:41:48 kid1| Max Mem  size: 262144 KB
2019/12/03 12:41:48 kid1| Max Swap size: 11758592 KB
2019/12/03 12:41:48 kid1| Rebuilding storage in /var/spool/squid (dirty log)
2019/12/03 12:41:48 kid1| Using Least Load store dir selection
2019/12/03 12:41:48 kid1| Set Current Directory to /var/spool/squid
2019/12/03 12:41:48 kid1| Finished loading MIME types and icons.
2019/12/03 12:41:48 kid1| commBind: Cannot bind socket FD 17 to [::]:3128: (98) Address already in use
2019/12/03 12:41:48 kid1| HTCP Disabled.
2019/12/03 12:41:48 kid1| Pinger socket opened on FD 19
2019/12/03 12:41:48 kid1| Configuring Parent 172.16.103.254/3128/0
2019/12/03 12:41:48 kid1| Squid plugin modules loaded: 0
2019/12/03 12:41:48 kid1| Adaptation support is off.
2019/12/03 12:41:48 kid1| Closing HTTP port [::]:3128
FATAL: Unable to open HTTP Socket
Squid Cache (Version 3.5.23): Terminated abnormally.



-> But when I check this with netstat, there's just squid using this port:

# netstat -anop |grep 3128
tcp6       0      0 :::3128                 :::*                    LISTEN      2164/(squid-1)       off (0.00/0/0)

So what's wrong ?



-> As I said, here is my squid config , I've added these two lines at the end :
cache_peer 172.16.103.254 parent 3128 0 proxy-only no-query
never_direct allow all

#cat squid-debian-edu.confacl CONNECT method CONNECT

# Grant access to the local networks
acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny all
htcp_access allow localnet
htcp_access deny all

http_port 3128

coredump_dir /var/spool/squid3



refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0

# See bug #591839
refresh_pattern (Release|Packages(.gz)*)$      0       20%      2880

refresh_pattern .               0       20%     4320

# Cache larger files to cache more debian packages
maximum_object_size 153600 KB

#  - Appends .intern to hostnames without any dots in them.
append_domain .intern

# Adjust cache size to fit size of /var/spool/squid, the capasity is
# dynamically updated using
# /usr/share/debian-edu-config/tools/squid-update-cachedir
cache_peer 172.16.103.254 parent 3128 0 proxy-only no-query
never_direct allow all
cache_dir ufs /var/spool/squid3 11432 16 256


Thanks for your help.


-- 
 Envoi sécurisé avec Tutanota. Obtenez votre propre adresse email chiffrée : 
 https://tutanota.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20191204/38343c05/attachment-0001.html>


More information about the squid-users mailing list