+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 40
*nix Thread, Squid Proxy Server Keeps Stopping in Technical; Log rotation is done by the 'logrotate' package (cryptic eh?). To install it on an ubuntu machine do the following: ...
  1. #16

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Log rotation is done by the 'logrotate' package (cryptic eh?). To install it on an ubuntu machine do the following:

    Code:
    apt-get install logrotate
    To manually logrotate your squid log files run the following:

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

  2. #17
    wellscs's Avatar
    Join Date
    Apr 2008
    Posts
    75
    Thank Post
    7
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    next step

    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 ~ #

  3. #18
    wellscs's Avatar
    Join Date
    Apr 2008
    Posts
    75
    Thank Post
    7
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    nearly worked

    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 ~ #

  4. #19
    wellscs's Avatar
    Join Date
    Apr 2008
    Posts
    75
    Thank Post
    7
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    how can i can clear this /dev/sda1 71G 68G 0 100% /

  5. #20
    wellscs's Avatar
    Join Date
    Apr 2008
    Posts
    75
    Thank Post
    7
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Help

    Has stopped working all together now

  6. #21

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241
    Quote Originally Posted by wellscs View Post
    Has stopped working all together now
    What did you do to stop it working?

  7. #22


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,619
    Thank Post
    275
    Thanked 777 Times in 604 Posts
    Rep Power
    223
    To clear the log file.

    From a terminal, type:


    Code:
    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:

    Code:
    sudo -s
    then type:
    Code:
    > /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:

    Code:
    sudo /etc/init.d/squid start

  8. #23
    wellscs's Avatar
    Join Date
    Apr 2008
    Posts
    75
    Thank Post
    7
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    still no luck

    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

  9. #24
    wellscs's Avatar
    Join Date
    Apr 2008
    Posts
    75
    Thank Post
    7
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    does this mean this bit is working?

    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

  10. #25

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241
    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.

  11. #26

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    241
    P.S. the apt-install lines will need to be carried out as a super user too - just type sudo prior to the command.

  12. #27
    wellscs's Avatar
    Join Date
    Apr 2008
    Posts
    75
    Thank Post
    7
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    getting confused now

    seems the laccess log is in th wrong place? can we create a new one?


    WCSLOBSTER ~ # sudo -s
    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: No such file or directory
    WCSLOBSTER ~ # /var/log/squid/access.log
    bash: /var/log/squid/access.log: No such file or directory
    WCSLOBSTER ~ # /var/log/squid/access.log
    bash: /var/log/squid/access.log: No such file or directory
    WCSLOBSTER ~ # /var/log/squid-ntlm/access.log
    bash: /var/log/squid-ntlm/access.log: Permission denied
    WCSLOBSTER ~ #

  13. #28
    wellscs's Avatar
    Join Date
    Apr 2008
    Posts
    75
    Thank Post
    7
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    startup

    sudo /etc/init.d/squid start
    * Starting Squid HTTP proxy squid 2009/03/17 09:10:23| WARNING: Very large maximum_object_size_in_memory settings can have negative impact on performance

  14. #29

    Join Date
    Oct 2008
    Location
    Hedge End, Southampton
    Posts
    56
    Thank Post
    1
    Thanked 10 Times in 10 Posts
    Rep Power
    13
    Are you still low in disk space?
    Code:
    df -h
    Find where the disk is being used (almost certianly log files) ((will take a while)):
    Code:
    sudo du -sh /*
    See where the squid logs are being stored:
    Code:
    sudo cat /etc/squid/squid.conf | grep _log
    Then you can do what pete said (note the leading chevron, without that you're executing the file):
    Code:
    sudo su
    > /var/log/squid/access.log
    exit

  15. #30
    wellscs's Avatar
    Join Date
    Apr 2008
    Posts
    75
    Thank Post
    7
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    this is what i get

    Still seems to be using all the disk space


    WCSLOBSTER ~ # df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 71G 67G 336M 100% /
    varrun 1013M 288K 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 67G 336M 100% /root/.gvfs
    WCSLOBSTER ~ # sudo du -sh /*
    5.2M /bin
    20M /boot
    0 /cdrom
    104K /dev
    81M /etc
    13M /home
    4.0K /initrd
    0 /initrd.img
    175M /lib
    16K /lost+found
    8.0K /media
    4.0K /mnt
    134M /opt
    du: cannot access `/proc/7634/task/7634/fd/4': No such file or directory
    du: cannot access `/proc/7634/task/7634/fdinfo/4': No such file or directory
    du: cannot access `/proc/7634/fd/4': No such file or directory
    du: cannot access `/proc/7634/fdinfo/4': No such file or directory
    0 /proc
    12G /root
    4.0K /rsync
    9.0M /sbin
    4.0K /SDB
    7.0G /squid
    4.0K /srv
    0 /sys
    116K /tmp
    2.2G /usr
    46G /var
    0 /vmlinuz
    WCSLOBSTER ~ # sudo cat /etc/squid/squid.conf | grep _log
    cache_access_log /var/log/squid/access.log
    cache_log /var/log/squid/cache.log
    cache_store_log /var/log/squid/store.log
    WCSLOBSTER ~ # sudo su
    WCSLOBSTER ~ # > /var/log/squid/access.log
    WCSLOBSTER ~ # exit
    exit
    WCSLOBSTER ~ # df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 71G 67G 334M 100% /
    varrun 1013M 288K 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 67G 334M 100% /root/.gvfs
    WCSLOBSTER ~ #

SHARE:
+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Squid Upstream proxy
    By Lee_K_81 in forum *nix
    Replies: 14
    Last Post: 20th January 2009, 11:04 AM
  2. Replies: 19
    Last Post: 15th October 2008, 02:44 PM
  3. Replies: 8
    Last Post: 18th July 2008, 02:34 PM
  4. Squid Transparent Proxy.
    By Jackd in forum Network and Classroom Management
    Replies: 2
    Last Post: 25th July 2007, 06:54 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •