LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-11-2009, 05:37 AM   #1
kr1spen
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Rep: Reputation: 0
swap file problem


when i attempt to start squid i get the following complaint from the system:

id" dev=dm-0 ino=1147922 scontext=root:system_r:squid_t:s0 tcontext=rootbject_r:var_t:s0 tclass=dir
Sep 11 12:21:31 localhost squid[3045]: Squid Parent: child process 3074 started
Sep 11 12:21:31 localhost (squid): storeUfsDirOpenSwapLog: Failed to open swap log.
Sep 11 12:21:31 localhost squid[3045]: Squid Parent: child process 3074 exited due to signal 6
Sep 11 12:21:31 localhost squid[3045]: Exiting due to repeated, frequent failures

please help!!!
 
Old 09-11-2009, 06:00 AM   #2
adamben
Member
 
Registered: Feb 2007
Distribution: slackware,gentoo,ubuntu
Posts: 50

Rep: Reputation: 17
Please see this thread:

http://www.linuxquestions.org/questi...d-help-145923/
 
Old 09-11-2009, 06:24 AM   #3
kr1spen
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Original Poster
Rep: Reputation: 0
i have checked ownership, but its still giving the same msg.
Here is part of my configuration file as pertains to the swap file:

cache_dir ufs /var/cache/squid 100 16 256
cache_swap_log /var/cache/squid/swap.log
 
Old 09-11-2009, 06:36 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,823

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Quote:
id" dev=dm-0 ino=1147922 scontext=root:system_r:squid_t:s0 tcontext=rootbject_r:var_t:s0 tclass=dir
If the cache and logs directory permissions are correct, then it's a SELinux problem
To verify if that's the case you can disable SELinux temporarily, running
Code:
setenforce 0
If that solves your problem, then you must read how to use configure SELinux policy for squid.

Regadrs
 
Old 09-11-2009, 07:04 AM   #5
kr1spen
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Hi Bathory
disabled SElinux with the command you gave me, and now squid is complaining about something else. right now am researching on the SElinux policy for squid that you mentioned. This is the msg i'm getting now:

Sep 11 13:40:10 localhost kernel: audit(1252669210.103:108): avc: denied { read } for pid=3917 comm="squid" name="00" dev=dm-0 ino=1180657 scontext=root:system_r:squid_t:s0 tcontext=rootbject_r:var_t:s0 tclass=dir
 
Old 09-11-2009, 07:28 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,823

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Are you sure SELinux is disabled? Because this is a SELinux message!!!
Make sure squid is not running.
Disable SELinux
Try to start squid without rebooting and see what happens.
 
Old 09-11-2009, 07:42 AM   #7
kr1spen
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Original Poster
Rep: Reputation: 0
squid was running, so i stopped squid 'service squid stop'
then i disabled SElinux, and then attempted to start squid and it gave the same complaint:
Sep 11 13:40:14 localhost kernel: audit(1252669214.139:109): avc: denied { remove_name } for pid=3917 comm="squid" name="swap.log.00.new" dev=dm-0 ino=1147981 scontext=root:system_r:squid_t:s0 tcontext=rootbject_r:var_t:s0 tclass=dir
Sep 11 13:40:14 localhost kernel: audit(1252669214.139:110): avc: denied { rename } for pid=3917 comm="squid" name="swap.log.00.new" dev=dm-0 ino=1147981 scontext=root:system_r:squid_t:s0 tcontext=rootbject_r:var_t:s0 tclass=file
Sep 11 13:40:14 localhost kernel: audit(1252669214.139:111): avc: denied { unlink } for pid=3917 comm="squid" name="swap.log.00" dev=dm-0 ino=1147980 scontext=root:system_r:squid_t:s0 tcontext=rootbject_r:var_t:s0 tclass=file
Sep 11 13:43:18 localhost kernel: audit(1252669398.410:112): avc: denied { setattr } for pid=3917 comm="squid" name="swap.log.00.clean" dev=dm-0 ino=1147980 scontext=root:system_r:squid_t:s0 tcontext=rootbject_r:var_t:s0 tclass=file
Sep 11 13:43:18 localhost squid[3915]: Squid Parent: child process 3917 exited with status 0
Sep 11 13:43:28 localhost squid[3990]: Squid Parent: child process 3993 started
Sep 11 14:29:50 localhost squid[3990]: Squid Parent: child process 3993 exited with status 0
Sep 11 14:30:39 localhost squid[4442]: Squid Parent: child process 4444 started
 
Old 09-11-2009, 08:01 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,823

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Quote:
Sep 11 13:43:18 localhost kernel: audit(1252669398.410:112): avc: denied { setattr } for pid=3917 comm="squid" name="swap.log.00.clean" dev=dm-0 ino=1147980 scontext=root:system_r:squid_t:s0 tcontext=rootbject_r:var_t:s0 tclass=file
...
Sep 11 14:29:50 localhost squid[3990]: Squid Parent: child process 3993 exited with status 0
Sep 11 14:30:39 localhost squid[4442]: Squid Parent: child process 4444 started
I think that you don't get those SELinux messages anymore. Those in you logs are almost an hour before the last squid stop/start.
You can stop/start again squid and watch the logs from another terminal with "tail -f logfile" to see if you get these messages.
 
Old 09-11-2009, 09:00 AM   #9
kr1spen
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Original Poster
Rep: Reputation: 0
those error msgs are no longer being given but squid still fails to start. the following are part of the cache.log file


009/09/11 15:47:37| Process ID 6005
2009/09/11 15:47:37| With 1024 file descriptors available
2009/09/11 15:47:37| DNS Socket created at 0.0.0.0, port 33377, FD 5
2009/09/11 15:47:37| Adding nameserver 196.201.1.6 from /etc/resolv.conf
2009/09/11 15:47:37| Adding nameserver 196.201.1.7 from /etc/resolv.conf
2009/09/11 15:47:37| Adding nameserver 10.4.0.5 from /etc/resolv.conf
2009/09/11 15:47:37| User-Agent logging is disabled.
2009/09/11 15:47:37| Referer logging is disabled.
2009/09/11 15:47:37| Unlinkd pipe opened on FD 10
2009/09/11 15:47:37| Swap maxSize 102400 KB, estimated 7876 objects
2009/09/11 15:47:37| Target number of buckets: 393
2009/09/11 15:47:37| Using 8192 Store buckets
2009/09/11 15:47:37| Max Mem size: 8192 KB
2009/09/11 15:47:37| Max Swap size: 102400 KB
2009/09/11 15:47:37| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2009/09/11 15:47:37| Rebuilding storage in /var/cache/squid (CLEAN)
2009/09/11 15:47:37| Using Least Load store dir selection
2009/09/11 15:47:37| Current Directory is /
2009/09/11 15:47:37| Loaded Icons.
2009/09/11 15:47:37| Accepting HTTP connections at 0.0.0.0, port 8080, FD 12.
2009/09/11 15:47:37| WCCP Disabled.
2009/09/11 15:47:37| Ready to serve requests.
2009/09/11 15:47:37| Done reading /var/cache/squid swaplog (0 entries)
2009/09/11 15:47:37| Finished rebuilding storage from disk.
2009/09/11 15:47:37| 0 Entries scanned
2009/09/11 15:47:37| 0 Invalid entries.
2009/09/11 15:47:37| 0 With invalid flags.
2009/09/11 15:47:37| 0 Objects loaded.
2009/09/11 15:47:37| 0 Objects expired.
2009/09/11 15:47:37| 0 Objects cancelled.
2009/09/11 15:47:37| 0 Duplicate URLs purged.
2009/09/11 15:47:37| 0 Swapfile clashes avoided.
2009/09/11 15:47:37| Took 0.5 seconds ( 0.0 objects/sec).
2009/09/11 15:47:37| Beginning Validation Procedure
2009/09/11 15:47:37| Completed Validation Procedure
2009/09/11 15:47:37| Validated 0 Entries
2009/09/11 15:47:37| store_swap_size = 0k
2009/09/11 15:47:38| storeLateRelease: released 0 objects

when i stop squid, the system tells me that it stopped OK, but when i start it says squid failed to start.
 
Old 09-11-2009, 09:07 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,823

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Quote:
when i stop squid, the system tells me that it stopped OK, but when i start it says squid failed to start.
The startup logs look OK. You can use ps to see if squid is running.
Code:
ps -ef|grep squid
 
Old 09-11-2009, 09:23 AM   #11
kr1spen
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Hi again Bathory

Squid is running now, thanks a lot. I am nt sure if i restart the machine will it nt give the same problems because of the SElinux being enabled.
 
Old 09-11-2009, 11:44 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,823

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
You should consider the following:
Upgrade Fedora to a recent version, as version 5 is deprecated.
Read the SELinux documentation and see how to configure it, so it allows squid run smoothly and keep your system secure.

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
swap file vs. swap partition verndog Ubuntu 16 07-09-2012 08:49 PM
Can swap file or a swap partition be mounted and read? Mr-Bisquit Linux - General 3 06-08-2009 02:16 PM
swap space (or) swap file yusufs Linux - Newbie 8 07-17-2008 02:02 AM
Raid array swap file problem rgreeves Ubuntu 1 09-24-2007 05:50 AM
Need Help Increasing Swap by creating a swap file froggo Red Hat 3 06-13-2006 08:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration