/var/spool/squid/swap.state: (13) Permission denied FATAL: commonUfsDirOpenSwapLog: Failed to open swap log.

Daca primesti eroarea de mai jos:

2015/02/17 08:13:39| Store logging disabled

2015/02/17 08:13:39| Swap maxSize 30720000 + 2048000 KB, estimated 2520615 objects

2015/02/17 08:13:39| Target number of buckets: 126030

2015/02/17 08:13:39| Using 131072 Store buckets

2015/02/17 08:13:39| Max Mem  size: 2048000 KB

2015/02/17 08:13:39| Max Swap size: 30720000 KB

2015/02/17 08:13:39| /var/spool/squid/swap.state: (13) Permission denied

FATAL: commonUfsDirOpenSwapLog: Failed to open swap log.

Cum rezolvi eroarea de mai sus si cum o rezolvi..

Principalul vinovat e cache-ul squid-ului si permisiunile acestuia..

Eu am intalnit-o pe un Centos..

Primul pas e sa afli locatia directorului squid cache

Intr-un terminal dai comanda

grep cache_dir /etc/squid/squid.conf

si vei avea un output de genul

cache_dir ufs /var/spool/squid 100 16 256

apoi dai comanda

# squid -k shutdown

Apoi ar cam trebui sa stergi directoarele de cache cu comenzile de mai jos

# rm -rf /path/to/dir/cache/

# rm -rf /var/spool/squid/

Apoi va trebui sa recreezi directoarele tocmai sterse si sa aplici permisiuni corespunzator owner-ului squid

# mkdir /var/spool/squid

# chown squid:squid /var/spool/squid

In cazul meu fiindca foloseam SELinux, a fost nevoie de restaurare a permisiunilor SELinux si se rezolva cu comanda

# restorecon -vr /var/spool/squid

Apoi va trebui sa recreezi directoarele de cache cu comanda

# squid -z

Si va afisa ceva de genul

2015/08/24 04:24:19| Making directories in /var/spool/squid/002015/08/24 04:24:19| Making directories in /var/spool/squid/012015/08/24 04:24:19| Making directories in /var/spool/squid/022015/08/24 04:24:20| Making directories in /var/spool/squid/032015/08/24 04:24:20| Making directories in /var/spool/squid/042015/08/24 04:24:20| Making directories in /var/spool/squid/052015/08/24 04:24:20| Making directories in /var/spool/squid/062015/08/24 04:24:20| Making directories in /var/spool/squid/072015/08/24 04:24:20| Making directories in /var/spool/squid/082015/08/24 04:24:20| Making directories in /var/spool/squid/092015/08/24 04:24:20| Making directories in /var/spool/squid/0A2015/08/24 04:24:20| Making directories in /var/spool/squid/0B2015/08/24 04:24:20| Making directories in /var/spool/squid/0C2015/08/24 04:24:20| Making directories in /var/spool/squid/0D2015/08/24 04:24:20| Making directories in /var/spool/squid/0E2015/08/24 04:24:20| Making directories in /var/spool/squid/0F

Poai va trebui sa pornesti serviciul squid cu

/etc/init.d/squid start

Apoi verifici functinalitatea cu comenzile de mai jos

# netstat -tulpn | grep :3128

# tail -f /var/log/squid/access.log

# tail -f /var/log/squid/cache.log

comments

0 Responses to "/var/spool/squid/swap.state: (13) Permission denied FATAL: commonUfsDirOpenSwapLog: Failed to open swap log."