无法启动 Squid 代理

无法启动 Squid 代理

我的 Squid 代理出现了一些问题。代理关闭后,我无法启动代理。据我所知,从昨天开始,我没有动过任何 Squid 配置。然后今天早上我来到办公室,它看起来好像已经关闭了。请参阅以下内容cache.log

2016/08/03 10:24:47| Unlinkd pipe opened on FD 16
2016/08/03 10:24:47| Swap maxSize 3584000 + 32768 KB, estimated 602794
objects
2016/08/03 10:24:47| Target number of buckets: 30139
2016/08/03 10:24:47| Using 32768 Store buckets
2016/08/03 10:24:47| Max Mem  size: 32768 KB
2016/08/03 10:24:47| Max Swap size: 3584000 KB
2016/08/03 10:24:47| Local cache digest enabled; rebuild/rewrite every
3600/3600 sec
2016/08/03 10:24:47| logfileOpen: opening log /var/log/squid/store.log
2016/08/03 10:24:47| Rebuilding storage in /var/spool/squid (DIRTY)
2016/08/03 10:24:47| Using Least Load store dir selection
2016/08/03 10:24:47| Current Directory is /
2016/08/03 10:24:47| Loaded Icons.
2016/08/03 10:24:47| Accepting proxy HTTP connections at
192.168.120.104, port 8080, FD 18.
2016/08/03 10:24:47| HTCP Disabled.
2016/08/03 10:24:47| WCCP Disabled.
Can't locate NTA/database/TechDb.pm in @INC (@INC contains:
/opt/nta/perl/lib/perl5 /etc/perl /usr/local/lib/perl/5.10.1
/usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl
/usr/local/lib/perl/5.10.0 .) at
/opt/squid_auth/script/squid_techdb_digest_auth.pl line 9.
BEGIN failed--compilation aborted at
/opt/squid_auth/script/squid_techdb_digest_auth.pl line 9.
2016/08/03 10:24:47| Ready to serve requests.
2016/08/03 10:24:47| WARNING: digestauthenticator #2 (FD 8) exited
2016/08/03 10:24:47| WARNING: digestauthenticator #3 (FD 9) exited
2016/08/03 10:24:47| WARNING: digestauthenticator #4 (FD 10) exited
2016/08/03 10:24:47| Too few digestauthenticator processes are running
FATAL: The digestauthenticator helpers are crashing too rapidly, need help!

Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.028 seconds = 0.024 user + 0.004 sys
Maximum Resident Size: 22224 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
        total space in arena:    2924 KB
        Ordinary blocks:         2854 KB      5 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:           780 KB      3 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:      69 KB
        Total in use:            3634 KB 98%
        Total free:                69 KB 2%
Can't locate NTA/database/TechDb.pm in @INC (@INC contains:
/opt/nta/perl/lib/perl5 /etc/perl /usr/local/lib/perl/5.10.1
/usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl
/usr/local/lib/perl/5.10.0 .) at
/opt/squid_auth/script/squid_techdb_digest_auth.pl line 9.
BEGIN failed--compilation aborted at
/opt/squid_auth/script/squid_techdb_digest_auth.pl line 9.
Can't locate NTA/database/TechDb.pm in @INC (@INC contains:
/opt/nta/perl/lib/perl5 /etc/perl /usr/local/lib/perl/5.10.1
/usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl
/usr/local/lib/perl/5.10.0 .) at
/opt/squid_auth/script/squid_techdb_digest_auth.pl line 9.
BEGIN failed--compilation aborted at
/opt/squid_auth/script/squid_techdb_digest_auth.pl line 9.

请指教。

答案1

Perl 模块NTA/database/TechDb.pm丢失,导致程序退出。

CPAN 和 Google 都找不到关于它的任何信息。

您在什么操作系统上使用 Squid?这是专有的东西吗?为什么下面有东西/opt/nta/选择/squid_auth您的系统上是否安装了?这不是标准的。您的系统配置方式有些不同寻常。

答案2

这个问题已经解决。问题并不在于模块不在路径中,而在于最近的引擎更新覆盖了 TechDb.pm 模块的权限。问题是作为“代理”运行的 squid 服务无法读取 perl 模块,因为更新后,它恢复为“scans:techdata”默认值。因此,我已将模块提交给 SVN,以使其与其他服务器保持一致,这意味着权限不会因“代理”用户的更改而改变。

谢谢

答案3

解决这个问题的更好方法是按照 POSIX 系统中应该使用的方式使用组成员身份。

  • 从 squid.conf 中删除 cache_effective_group 设置

  • 将代理用户添加为 techdata 组的成员(以读取模块)。

相关内容