适用于 x86_64-redhat-linux-gnu 的 SQUID Cache 版本 3.5.10

适用于 x86_64-redhat-linux-gnu 的 SQUID Cache 版本 3.5.10

我已经搜索了很久了,但现在我需要寻求帮助。

我有几个 squid 服务器需要更改 IP 地址。自从更改地址以来,我在启动 squid 时在日志文件中看到以下内容:

2015/12/08 12:16:43 kid1| Starting Squid Cache version 3.5.10 for x86_64-redhat-linux-gnu...
2015/12/08 12:16:43 kid1| Service Name: squid
2015/12/08 12:16:43 kid1| Process ID 1743
2015/12/08 12:16:43 kid1| Process Roles: worker
2015/12/08 12:16:43 kid1| With 131072 file descriptors available
2015/12/08 12:16:43 kid1| Initializing IP Cache...
2015/12/08 12:16:43 kid1| DNS Socket created at [::], FD 6
2015/12/08 12:16:43 kid1| DNS Socket created at 0.0.0.0, FD 7
2015/12/08 12:16:43 kid1| Adding nameserver 8.8.8.8 from /etc/resolv.conf
2015/12/08 12:16:43 kid1| Adding nameserver 8.8.4.4 from /etc/resolv.conf
2015/12/08 12:16:43 kid1| helperOpenServers: Starting 5/32 'ssl_crtd' processes
2015/12/08 12:16:43 kid1| ipcCreate: fork: (12) Cannot allocate memory
2015/12/08 12:16:43 kid1| WARNING: Cannot run '/usr/lib64/squid/ssl_crtd' process.
2015/12/08 12:16:43 kid1| ipcCreate: fork: (12) Cannot allocate memory
2015/12/08 12:16:43 kid1| WARNING: Cannot run '/usr/lib64/squid/ssl_crtd' process.
2015/12/08 12:16:43 kid1| ipcCreate: fork: (12) Cannot allocate memory
2015/12/08 12:16:43 kid1| WARNING: Cannot run '/usr/lib64/squid/ssl_crtd' process.
2015/12/08 12:16:43 kid1| ipcCreate: fork: (12) Cannot allocate memory
2015/12/08 12:16:43 kid1| WARNING: Cannot run '/usr/lib64/squid/ssl_crtd' process.
2015/12/08 12:16:43 kid1| Logfile: opening log daemon:/var/log/squid/access.log
2015/12/08 12:16:43 kid1| Logfile Daemon: opening log /var/log/squid/access.log
2015/12/08 12:16:43 kid1| ipcCreate: fork: (12) Cannot allocate memory
FATAL: Couldn't start logfile helper
Squid Cache (Version 3.5.10): Terminated abnormally.
CPU Usage: 0.226 seconds = 0.203 user + 0.023 sys
Maximum Resident Size: 140208 KB
Page faults with physical i/o: 0

我的 squid 配置如下:

acl localnet src 31.210.109.136/32
acl localnet src 213.128.87.253/32
acl localnet src 176.53.118.101/32
acl localnet src 178.211.45.99/32
acl localnet src 213.128.81.163/32
acl localnet src 176.53.22.194/32
acl localnet src 185.128.113.239
acl localnet src 185.128.113.240
acl localnet src 185.128.113.241
acl localnet src 185.128.113.242
acl localnet src 185.128.113.243
acl localnet src 185.128.113.244
acl localnet src 185.128.113.245
acl localnet src 185.128.113.246
acl localnet src 185.128.113.247
acl localnet src 127.0.0.0/8


acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
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 Safe_ports port 8443
acl Safe_ports port 28443
acl CONNECT method CONNECT

#http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
#http_access deny to_localhost

http_access allow localnet
http_access allow localhost
http_access deny all

http_port 185.128.113.239:10001 name=10001 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/ssl/certs/squid.pem
http_port 185.128.113.239:10002 name=10002 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/ssl/certs/squid.pem
http_port 185.128.113.239:10003 name=10003 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/ssl/certs/squid.pem
http_port 185.128.113.239:10004 name=10004 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/ssl/certs/squid.pem
http_port 185.128.113.239:10005 name=10005 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/ssl/certs/squid.pem
http_port 185.128.113.239:10006 name=10006 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/ssl/certs/squid.pem

acl port10001 myportname 10001 src 37.35.90.3/32
http_access allow port10001
tcp_outgoing_address 185.128.113.239 port10001

acl port10001 myportname 10001 src 37.35.90.131/32
http_access allow port10001
tcp_outgoing_address 185.128.113.239 port10001

acl port10001 myportname 10001 src 82.16.22.100/32
http_access allow port10001
tcp_outgoing_address 185.128.113.239 port10001

always_direct allow all
ssl_bump allow all
sslproxy_cert_error allow all
sslproxy_flags DONT_VERIFY_PEER

cache_dir ufs /var/cache/squid 100 16 256

coredump_dir /var/cache/squid

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

via off
forwarded_for off

request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all

connect_timeout 10 seconds

我尝试了各种方法来实现这一点,但都无济于事。以下是我尝试过的一些方法:

rm -fr /var/cache/squid
mkdir -p /var/cache/squid
chown -R squid:squid /var/cache/squid
squid -z
chown -R squid:squid /var/cache/squid
rm -fr /var/lib/ssl_db
/usr/lib64/squid/ssl_crtd -c -s /var/lib/ssl_db
chown -R squid:squid /var/lib/ssl_db/

/usr/lib64/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB -d

但没有成功。有人可以帮忙吗?

答案1

好的,尽管我今天早些时候更改了 IP 地址后重新启动了服务器,但看来服务器需要重新启动。

感谢您查看这个问题。

相关内容