LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   squid service not starting (https://www.linuxquestions.org/questions/linux-newbie-8/squid-service-not-starting-4175451602/)

fwaheed1979 02-25-2013 05:12 AM

squid service not starting
 
service squid start
Starting squid: .................... [FAILED]


Feb 25 16:11:19 localhost squid[3773]: Squid Parent: child process 3789 exited with status 1
Feb 25 16:11:22 localhost squid[3773]: Squid Parent: child process 3795 started
Feb 25 16:11:23 localhost (squid): #011Failed to verify one of the swap directories, Check cache.log#012#011for details. Run 'squid -z' to create swap directories#012#011if needed, or if running Squid for the first time.
Feb 25 16:11:23 localhost kernel: type=1400 audit(1361790683.301:11760): avc: denied { getattr } for pid=3795 comm="squid" path="/cache" dev=sda2 ino=2 scontext=unconfined_u:system_r:squid_t:s0 tcontext=system_u:object_r:etc_runtime_t:s0 tclass=dir
Feb 25 16:11:23 localhost squid[3773]: Squid Parent: child process 3795 exited with status 1
Feb 25 16:11:26 localhost squid[3773]: Squid Parent: child process 3802 started
Feb 25 16:11:26 localhost (squid): #011Failed to verify one of the swap directories, Check cache.log#012#011for details. Run 'squid -z' to create swap directories#012#011if needed, or if running Squid for the first time.
Feb 25 16:11:26 localhost kernel: type=1400 audit(1361790686.632:11761): avc: denied { getattr } for pid=3802 comm="squid" path="/cache" dev=sda2 ino=2 scontext=unconfined_u:system_r:squid_t:s0 tcontext=system_u:object_r:etc_runtime_t:s0 tclass=dir
Feb 25 16:11:26 localhost squid[3773]: Squid Parent: child process 3802 exited with status 1
Feb 25 16:11:26 localhost squid[3773]: Exiting due to repeated, frequent failures

help me

acid_kewpie 02-25-2013 05:30 AM

You don't acknowledge those error messages at all... did you even search for them? You'd have quite possibly ended up here if you had... http://www.linuxquestions.org/questi...roblem-762265/

A please / thank you would be recommended next time too btw.

fwaheed1979 02-25-2013 05:32 AM

service squid start
Starting squid: .................... [FAILED]


Feb 25 16:11:19 localhost squid[3773]: Squid Parent: child process 3789 exited with status 1
Feb 25 16:11:22 localhost squid[3773]: Squid Parent: child process 3795 started
Feb 25 16:11:23 localhost (squid): #011Failed to verify one of the swap directories, Check cache.log#012#011for details. Run 'squid -z' to create swap directories#012#011if needed, or if running Squid for the first time.
Feb 25 16:11:23 localhost kernel: type=1400 audit(1361790683.301:11760): avc: denied { getattr } for pid=3795 comm="squid" path="/cache" dev=sda2 ino=2 scontext=unconfined_u:system_r:squid_t:s0 tcontext=system_ubject_r:etc_runtime_t:s0 tclass=dir
Feb 25 16:11:23 localhost squid[3773]: Squid Parent: child process 3795 exited with status 1
Feb 25 16:11:26 localhost squid[3773]: Squid Parent: child process 3802 started
Feb 25 16:11:26 localhost (squid): #011Failed to verify one of the swap directories, Check cache.log#012#011for details. Run 'squid -z' to create swap directories#012#011if needed, or if running Squid for the first time.
Feb 25 16:11:26 localhost kernel: type=1400 audit(1361790686.632:11761): avc: denied { getattr } for pid=3802 comm="squid" path="/cache" dev=sda2 ino=2 scontext=unconfined_u:system_r:squid_t:s0 tcontext=system_ubject_r:etc_runtime_t:s0 tclass=dir
Feb 25 16:11:26 localhost squid[3773]: Squid Parent: child process 3802 exited with status 1
Feb 25 16:11:26 localhost squid[3773]: Exiting due to repeated, frequent failures

acid_kewpie 02-25-2013 05:38 AM

why did you post that?

fwaheed1979 02-25-2013 05:42 AM

Quote:

Originally Posted by acid_kewpie (Post 4899168)
why did you post that?

every time i am going to start squid service but it shows fail can you help me?

acid_kewpie 02-25-2013 05:55 AM

I already have. Please actually read the responses you get.

sangfroid 02-25-2013 08:00 AM

Your SeLinux is screwing up here... If you disable it, then it will be all ok.

See http://www.crypt.gen.nz/selinux/disable_selinux.html for how to disable it.

TB0ne 02-25-2013 08:58 AM

Quote:

Originally Posted by fwaheed1979 (Post 4899174)
every time i am going to start squid service but it shows fail can you help me?

Well, the system tried to help you. Did you actually READ what you posted??? Did you not post this?
Quote:

Originally Posted by fwaheed1979
Feb 25 16:11:23 localhost (squid): #011Failed to verify one of the swap directories, Check cache.log#012#011for details. Run 'squid -z' to create swap directories#012#011if needed, or if running Squid for the first time.

See the part that's bolded?? Where the system TELLS YOU what command to run? Did you RUN IT? Have you tried "restart" instead of "start"?

acid_kewpie 02-25-2013 10:15 AM

Quote:

Originally Posted by TB0ne (Post 4899291)
Well, the system tried to help you. Did you actually READ what you posted??? Did you not post this?

See the part that's bolded?? Where the system TELLS YOU what command to run? Did you RUN IT? Have you tried "restart" instead of "start"?

Nrrg, well ... it doesn't actually. It's SELinux.

TB0ne 02-25-2013 10:42 AM

Quote:

Originally Posted by acid_kewpie (Post 4899353)
Nrrg, well ... it doesn't actually. It's SELinux.

Perhaps, but it could also be the directory is missing (the -z creates it), or a permissions issue. Running with the "-z" as suggested will either fix it, or give output indicating a permissions issue.

But the OP never indicates what version/distro of Linux, whether SElinux is enabled or not, any sort of permissions, or whether squid was ever working or if this is a new installation. Hard to say.

acid_kewpie 02-25-2013 01:14 PM

Quote:

Originally Posted by TB0ne (Post 4899367)
Perhaps, but it could also be the directory is missing (the -z creates it), or a permissions issue. Running with the "-z" as suggested will either fix it, or give output indicating a permissions issue.

But the OP never indicates what version/distro of Linux, whether SElinux is enabled or not, any sort of permissions, or whether squid was ever working or if this is a new installation. Hard to say.

Ahh come on now... did you even read the error message? There's a Violation right there! It's *very* easy to say ;)

fwaheed1979 02-25-2013 10:23 PM

well i already disable SELINUX but result is same and also try restart
and im fresh 1st time using linux version fedora12

acid_kewpie 02-26-2013 02:14 AM

No, that's not true, the result can NOT be the same if you've disabled it. That's impossible.

And... Fedora 12????? That went out of support ages ago. do NOT use it under and circumstances. If this is a preopr server then use CentOS 6

once again, how about a please / thank you??

TB0ne 02-26-2013 09:38 AM

Quote:

Originally Posted by fwaheed1979 (Post 4899795)
well i already disable SELINUX but result is same and also try restart
and im fresh 1st time using linux version fedora12

AGAIN...have you tried running the command that the system told you to run????

zafar_dandoti 02-26-2013 10:26 PM

I once encounter similar situation with fc17 , its not necessary to disable SELINUX
its definitely a permission issue ... check to make sure the swap directories are owned by squid user
(chown squid:squid /var/spool/squid)...!!googd luck


All times are GMT -5. The time now is 08:39 AM.