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

acid_kewpie 02-27-2013 12:48 AM

Quote:

Originally Posted by zafar_dandoti (Post 4900558)
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

It's *DEFINITELY* not! Read the errors!

fwaheed1979 03-04-2013 11:45 PM

ping yahoo.com
ping: unknown host yahoo.com


squid service is running
but i can not ping yahoo or any other domain
yesterday all the thins was working today i restart then route is automatically remove and dns entries also from resolve.conf then i put this command chattr +i /etc/resolv.conf after that dns entries is there after reboot but host not resolving

acid_kewpie 03-05-2013 02:03 AM

so what happened to the previous page of comments? All irrelevant now?

what are your dns settings? can you ping the dns server IP? Can you hit a web page by IP address?

fwaheed1979 03-05-2013 03:36 AM

yes previous all irrelevant bcoz i installed fresh machine it is SElinux and iptables problem which solved and all are working ping nslookup browsing but still dont know about removing config in resolv.conf if i put chattr -i and route also remove on reboot

acid_kewpie 03-05-2013 04:16 AM

you re-installed for that??? Blimey!

I presume you are using DHCP for the server? Don't do that. Stop the NetworkManager service and configure the network config statically. It's a server. Treat it as such. You can use a reservation on your DHCP server if need be, but even then, make it give you the right details in the first place.

fwaheed1979 03-19-2013 05:58 AM

hi
i am not able to find few mail boxes location of my mail directory is /home/vpopmail/domains/xyz.com
its showing mail groups and mail boxes here but not all most of them missing even i am not able to find my own mail box but my mail is working any idea?

acid_kewpie 03-19-2013 06:03 AM

this has nothign to do with squid, please ask new questions in new threads.


All times are GMT -5. The time now is 10:41 PM.