Jump to content

Recommended Posts

Posted

I have just inherited a squid proxy server (on linux)that i have never worked or had any experience on. I came in this morning the internet had stopped. after a couple of reboots reboot it works for about 30 mins each time and then stops. If I restart the services it will restart. With my lack of experience, although I am learning quickly I'm not sure how to fix this.

 

Any help gatefully received

 

Paul

Posted
I have tried the advice given, but not sure what the logs mean was hoping perhaps as this is supposed to be a helping site, someone might take a look at the logs for me to help me out. perhaps this is not a site that helps people anymore
Posted
I was also advised to re post to this area by Geoff

 

3 posts? Just re-post in your old post. And if you want people to look at your logs then perhaps its a good idea to firstly, state that in your post, and secondly, post your logs so people can view them.

 

Your 3 posts have said exactly the same in each. We're a very helping community, but unfortunately I left my Crystal ball at home today.

Posted

Filesystem Size Used Avail Use% Mounted on

/dev/sda1 71G 68G 0 100% /

varrun 1013M 344K 1013M 1% /var/run

varlock 1013M 0 1013M 0% /var/lock

udev 1013M 68K 1013M 1% /dev

devshm 1013M 12K 1013M 1% /dev/shm

lrm 1013M 38M 976M 4% /lib/modules/2.6.24-16-generic/volatile

gvfs-fuse-daemon 71G 68G 0 100% /root/.gvfs

/dev/sdc1 233G 59M 233G 1% /media/disk

Posted (edited)
Filesystem Size Used Avail Use% Mounted on

/dev/sda1 71G 68G 0 100% /

varrun 1013M 344K 1013M 1% /var/run

varlock 1013M 0 1013M 0% /var/lock

udev 1013M 68K 1013M 1% /dev

devshm 1013M 12K 1013M 1% /dev/shm

lrm 1013M 38M 976M 4% /lib/modules/2.6.24-16-generic/volatile

gvfs-fuse-daemon 71G 68G 0 100% /root/.gvfs

/dev/sdc1 233G 59M 233G 1% /media/disk

 

the 1st line: /dev/sda1 is full - you need to clean up your logs a bit - sorry I can't be of more help but I've just started using Squid myself. I'm sure Geoff will be along in a minute with a quick fix.

Edited by Hightower
Posted (edited)
Yep, your root partition /dev/sha1 which contains the root of your filesystem / is full. You'll need to do some cleaning up. My guess is that it's full of old logfiles. Take a look into log rotation for automatic management of your log files. Edited by Iain
Add link to info about logrotate daemon
Posted

Thanks for all your replies, seems we are getting somwhere. remembering Im a compl:)ete novice at this can someone help me with the code to empty/ rotate/compact my log files

 

Thanks to everyone again

Posted (edited)

To ensure it is squid, (and not, say dansguardian as well), cd into /var/logs and use:

 

du -h --max-depth=1

 

Which will give you the space consumed by each directory / log.

 

I'm assuming you're using Ubuntu (by the presence of gvfs-daemon).

 

From a terminal, issue:

sudo /etc/init.d/squid stop

 

If you care about the logs (ideally you should), plug in a removable hard disk and copy the squid logs to it - there's not enough space to compress them on your drive at the moment. If you're running the gnome desktop it should automount the usb drive.

 

Once the squid log is copied somewhere else, su to root temporarily by using:

 

sudo -s

 

then type

> /var/log/squid/access.log 

 

to zero the contents of the file, but keep it and the permissions in place. Type exit to discard root credentials then type:

 

sudo /etc/init.d/squid start

 

Your squid box will now run ok for a while, but you need to get log rotation sorted or this will happen again.

 

NB: It's very rare I remember to check pms - posting in thread is the best way to attract my attention.

Edited by pete
Posted

Log rotation is done by the 'logrotate' package (cryptic eh?). To install it on an ubuntu machine do the following:

 

apt-get install logrotate

 

To manually logrotate your squid log files run the following:

 

logrotate -f -s /var/lib/logrotate.status /etc/logrotate.d/squid

Posted

i get this far

 

WCSLOBSTER ~ # sudo /etc/init.d/squid stop

* Stopping Squid HTTP proxy squid [ OK ]

WCSLOBSTER ~ # sudo -s

WCSLOBSTER ~ # /var/log/squid/access.log

bash: /var/log/squid/access.log: Permission denied

WCSLOBSTER ~ #

Posted

WCSLOBSTER ~ # apt-get install logrotate

Reading package lists... Done

Building dependency tree

Reading state information... Done

Recommended packages:

mailx

The following packages will be upgraded:

logrotate

1 upgraded, 0 newly installed, 0 to remove and 254 not upgraded.

Need to get 36.9kB of archives.

After this operation, 0B of additional disk space will be used.

Get: 1 Index of / hardy-updates/main logrotate 3.7.1-3ubuntu0.8.04 [36.9kB]

Fetched 36.9kB in 0s (105kB/s)

(Reading database ... 117927 files and directories currently installed.)

Preparing to replace logrotate 3.7.1-3 (using .../logrotate_3.7.1-3ubuntu0.8.04_i386.deb) ...

Unpacking replacement logrotate ...

Setting up logrotate (3.7.1-3ubuntu0.8.04) ...

WCSLOBSTER ~ # logrotate -f -s /var/lib/logrotate.status /etc/logrotate.d/squid

2009/03/16 14:56:14| WARNING: Very large maximum_object_size_in_memory settings can have negative impact on performance

squid: ERROR: Could not send signal 10 to process 6670: (3) No such process

error: error running shared postrotate script for /var/log/squid/*.log

WCSLOBSTER ~ #

Posted

To clear the log file.

 

From a terminal, type:

 

 

sudo /etc/init.d/squid stop

 

If you care about the logs (ideally you should), plug in a removable hard disk and copy the squid logs to it - there's not enough space to compress them on your drive at the moment. If you're running the gnome desktop it should automount the usb drive.

 

If you don't care about the log file type:

 

sudo -s

 

then type:

> /var/log/squid/access.log 

 

which will zero the contents of the log file (make it blank and take up no space) , but keep it and the permissions in place. Type exit to discard root credentials then type:

 

sudo /etc/init.d/squid start

Posted

I can only get this far

 

sudo /etc/init.d/squid stop

* Stopping Squid HTTP proxy squid [ OK ]

WCSLOBSTER ~ # /var/log/squid/access.log

bash: /var/log/squid/access.log: Permission denied

 

nit working at all now

Posted

WCSLOBSTER ~ # sudo /etc/init.d/squid stop

* Stopping Squid HTTP proxy squid [ OK ]

WCSLOBSTER ~ # /var/log/squid/access.log

bash: /var/log/squid/access.log: Permission denied

WCSLOBSTER ~ # logrotate -f -s /var/lib/logrotate.status /etc/logrotate.d/squid

WCSLOBSTER ~ # apt-get install logrotate

Reading package lists... Done

Building dependency tree

Reading state information... Done

logrotate is already the newest version.

0 upgraded, 0 newly installed, 0 to remove and 262 not upgraded.

WCSLOBSTER ~ # logrotate -f -s /var/lib/logrotate.status /etc/logrotate.d/squid

WCSLOBSTER ~ #

 

 

 

Sorry do all that i am beeing such a pain this is like a new language to me

Posted

Did you type the sudo -s line before you entered /var/log/squid/access.log?

 

Just seems that you aren't carrying out the tasks as a super user therefore you don't have permissions.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...