diladele/squid-windows

commBind: Cannot bind socket FD 10 to [::]:3128: (1) Operation not permitted

fragtion opened this issue · 4 comments

Hi

Failed to bind port on first run / new installation on Windows 10 (Version 2004 OS Build 19603.1000)

Could it be the fact that I'm running a version of Windows 10 for Insiders ?

2020/04/20 11:15:40 kid1| Set Current Directory to /var/cache/squid
2020/04/20 11:15:40 kid1| Starting Squid Cache version 3.5.28 for x86_64-unknown-cygwin...
2020/04/20 11:15:40 kid1| Service Name: squid
2020/04/20 11:15:40 kid1| Process ID 12216
2020/04/20 11:15:40 kid1| Process Roles: worker
2020/04/20 11:15:40 kid1| With 3200 file descriptors available
2020/04/20 11:15:40 kid1| Initializing IP Cache...
2020/04/20 11:15:40 kid1| parseEtcHosts: /etc/hosts: (2) No such file or directory
2020/04/20 11:15:40 kid1| DNS Socket created at [::], FD 5
2020/04/20 11:15:40 kid1| DNS Socket created at 0.0.0.0, FD 6
2020/04/20 11:15:40 kid1| Adding nameserver 8.8.8.8 from squid.conf
2020/04/20 11:15:40 kid1| Adding nameserver 208.67.222.222 from squid.conf
2020/04/20 11:15:40 kid1| Logfile: opening log daemon:/var/log/squid/access.log
2020/04/20 11:15:40 kid1| Logfile Daemon: opening log /var/log/squid/access.log
2020/04/20 11:15:40 kid1| WARNING: no_suid: setuid(0): (22) Invalid argument
2020/04/20 11:15:40 kid1| Store logging disabled
2020/04/20 11:15:40 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2020/04/20 11:15:40 kid1| Target number of buckets: 1008
2020/04/20 11:15:40 kid1| Using 8192 Store buckets
2020/04/20 11:15:40 kid1| Max Mem  size: 262144 KB
2020/04/20 11:15:40 kid1| Max Swap size: 0 KB
2020/04/20 11:15:40 kid1| Using Least Load store dir selection
2020/04/20 11:15:40 kid1| Set Current Directory to /var/cache/squid
2020/04/20 11:15:40 kid1| Finished loading MIME types and icons.
2020/04/20 11:15:40 kid1| commBind: Cannot bind socket FD 10 to [::]:3128: (1) Operation not permitted
2020/04/20 11:15:40 kid1| HTCP Disabled.
2020/04/20 11:15:40 kid1| Squid plugin modules loaded: 0
2020/04/20 11:15:40 kid1| Adaptation support is off.
2020/04/20 11:15:40 kid1| Closing HTTP port [::]:3128
2020/04/20 11:15:40 kid1| storeDirWriteCleanLogs: Starting...
2020/04/20 11:15:40 kid1|   Finished.  Wrote 0 entries.
2020/04/20 11:15:40 kid1|   Took 0.00 seconds (  0.00 entries/sec).
FATAL: Unable to open HTTP Socket
Squid Cache (Version 3.5.28): Terminated abnormally.

Notes:

  1. My Windows Firewall is disabled.
  2. I did try to change http_port 3128 to another port
  3. I did try to bind to non-IPV6 address, same problem.

I presume it relates to this cause and has something to do with cygwin?
2020/04/20 11:15:40 kid1| WARNING: no_suid: setuid(0): (22) Invalid argument

Any advice?

In the meanwhile I'll try the VM Appliance ...

Thanks

Hm I have it running on latest Win 10 but not the insider build of course :( might be something related to permissions with that default LOCAL SYSTEM user that runs the binary? Anything in the system/auth event log?

Hi again. Thanks for prompt response. I've done some further testing and discovered that this is not an issue with Squid for Windows after all (just a bit unlucky that squid's default ports are affected)

For some reason I just can't listen on some port ranges (1551-3489 and 7479-8278). Still trying to figure out exact cause & solution, as no application seems to be binding to those ports and firewall is off

Will advise if I find a solution as it may assist other users who run into this problem, but since it is not technically a Squid issue, you may close this ticket if you wish as I don't expect a solution to come from here

Thanks:))

Just a quick note to say that I've managed to track down the problem cause for this behavior...

See following resources for more information:
https://blog.ofortune.xyz/2020/01/03/fix-network/
docker/for-win#3171

Apologies once again for the false issue report for Diladele Squid for Windows -
I am happy to report that my Squid for Windows is now working great since applying this fix.

Regards

Oh good; but please be sure to check the issue #86 too.