LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with cache_dir in squid (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-cache_dir-in-squid-676200/)

sohailkmu 10-20-2008 03:36 AM

Quote:

Originally Posted by bathory (Post 3314616)
Ok, don't delete /Cache1, delete /Cache1/squid, recreate it and try again:
Code:

rm -rf /Cache1/squid
mkdir /Cache1/squid
chown squid.squid /Cache1/squid
squid -z


I have applied the procedure as per your directions.

after running squid -z it gives no error. But when I started squid it failed. out put from cache.log is given below

2008/10/20 14:31:53| Starting Squid Cache version 2.5.STABLE6 for i386-redhat-linux-gnu...
2008/10/20 14:31:53| Process ID 3608
2008/10/20 14:31:53| With 1024 file descriptors available
2008/10/20 14:31:53| DNS Socket created at 0.0.0.0, port 32772, FD 4
2008/10/20 14:31:53| Adding nameserver 172.16.0.1 from /etc/resolv.conf
2008/10/20 14:31:53| User-Agent logging is disabled.
2008/10/20 14:31:53| Referer logging is disabled.
2008/10/20 14:31:53| Unlinkd pipe opened on FD 9
2008/10/20 14:31:53| Swap maxSize 20480000 KB, estimated 1575384 objects
2008/10/20 14:31:53| Target number of buckets: 78769
2008/10/20 14:31:53| Using 131072 Store buckets
2008/10/20 14:31:53| Max Mem size: 8192 KB
2008/10/20 14:31:53| Max Swap size: 20480000 KB
2008/10/20 14:31:53| /Cache1/squid/swap.state: (13) Permission denied
FATAL: storeUfsDirOpenSwapLog: Failed to open swap log.

Squid Cache (Version 2.5.STABLE6): Terminated abnormally.
CPU Usage: 0.182 seconds = 0.006 user + 0.176 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0

bathory 10-20-2008 04:46 AM

Plz check again the owner/group of the /Cache dirs.
This post describes the exact same problem you face, and it's just a matter of chown the cache dir.

Regards

sohailkmu 10-21-2008 12:38 AM

Quote:

Originally Posted by bathory (Post 3316320)
Plz check again the owner/group of the /Cache dirs.
This post describes the exact same problem you face, and it's just a matter of chown the cache dir.

Regards

Every thing was done as per your suggestions but still it is not working. Same commands were applied but in vain.

Even created a file swap.state in /Cache1/squid and /Cache2/squid but still not working.



2008/10/21 11:28:05| Starting Squid Cache version 2.5.STABLE6 for i386-redhat-linux-gnu...
2008/10/21 11:28:05| Process ID 3704
2008/10/21 11:28:05| With 1024 file descriptors available
2008/10/21 11:28:05| DNS Socket created at 0.0.0.0, port 32770, FD 4
2008/10/21 11:28:05| Adding nameserver 172.16.0.1 from /etc/resolv.conf
2008/10/21 11:28:05| User-Agent logging is disabled.
2008/10/21 11:28:05| Referer logging is disabled.
2008/10/21 11:28:05| Unlinkd pipe opened on FD 9
2008/10/21 11:28:05| Swap maxSize 20480000 KB, estimated 1575384 objects
2008/10/21 11:28:05| Target number of buckets: 78769
2008/10/21 11:28:05| Using 131072 Store buckets
2008/10/21 11:28:05| Max Mem size: 8192 KB
2008/10/21 11:28:05| Max Swap size: 20480000 KB
2008/10/21 11:28:05| /Cache1/squid/swap.state: (13) Permission denied
FATAL: storeUfsDirOpenSwapLog: Failed to open swap log.

Squid Cache (Version 2.5.STABLE6): Terminated abnormally.
CPU Usage: 0.012 seconds = 0.005 user + 0.007 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0

bathory 10-21-2008 03:51 AM

I'm asking you once again: Are you sure it's not a SELinux problem?

sohailkmu 10-21-2008 10:50 PM

Quote:

Originally Posted by bathory (Post 3317338)
I'm asking you once again: Are you sure it's not a SELinux problem?

Dear what do you mean by SELinux problem. I am using red hat linux enterprise AS 4. I don't know much about SELINUX. So if there be a problem please let me know about it and its solution.


Thank you very much for your active support.

bathory 10-21-2008 11:54 PM

You should read this if you don't know what SELinux is.
Runnig
Code:

getenforce
you'll find out the SELinux status.

sohailkmu 10-22-2008 12:01 AM

Quote:

Originally Posted by bathory (Post 3318288)
You should read this if you don't know what SELinux is.
Runnig
Code:

getenforce
you'll find out the SELinux status.

I am really thankful. You are great. My problem has been solved. You were absolutely right. The problem was SElinux. I found a website and I applied setenforce 0 command and it worked.

Later on I appended selinux=0 to grub.conf and now it is working perfectly.

bathory 10-22-2008 12:16 AM

Glad to see it worked. We would avoid all of this if you had checked about SELinux from the beginning.
Anyway I don't think it's a good idea to disable it completely. You can read the documentation to see how you can add rules to it to do what you want.

Regards

sohailkmu 10-22-2008 02:41 AM

Quote:

Originally Posted by bathory (Post 3318298)
Glad to see it worked. We would avoid all of this if you had checked about SELinux from the beginning.
Anyway I don't think it's a good idea to disable it completely. You can read the documentation to see how you can add rules to it to do what you want.

Regards

I would read the documentation in detail. If you know about inserting rules without disabling Selinux please let me know about it.

I had no idea of SElinux and i am working on it for the first time.Your help is really appreciated.

bathory 10-22-2008 09:20 AM

I'm sorry but I cannot help you on this, because I have never used a distro that is SELinux enabled.
Better read the documentation ;)

Regards

sohailkmu 10-22-2008 11:10 PM

Quote:

Originally Posted by bathory (Post 3318665)
I'm sorry but I cannot help you on this, because I have never used a distro that is SELinux enabled.
Better read the documentation ;)

Regards

OK No Problem

Thanks, You have already helped alot.


All times are GMT -5. The time now is 05:11 PM.