VideoCache

erros after squid -k reconfigure or squid -k rotate

by Anonymous on 16 Jan 2009

i´m getting erros when run squid -k reconfigure or squid -k rotate

look:

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib64/python2.4/threading.py", line 442, in "bootstrap
    self.run()
  File "/usr/share/videocache/videocache.py", line 792, in run
    squid_part()
  File "/usr/share/videocache/videocache.py", line 499, in squid_part
    videos = video_id_pool.get()
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in "call"
    return self."send(self."name, args)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in "request
    verbose=self."verbose
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1129, in request
    self.send_content(h, request_body)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1243, in send_content
    connection.endheaders()
  File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
    self._send_output()
  File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.4/httplib.py", line 652, in send
    self.connect()
  File "/usr/lib64/python2.4/httplib.py", line 636, in connect
    raise socket.error, msg
error: (111, 'Connection refused')

and cachevideo freeze ... i need to restart squid OR kill all videocache proccess .. after doing .. works...

thanks

Alexandre Correa
Onda Internet

4 Answers

by Kulbir Saini on 19 Jan 2009

Hello Alexandre,

This is a known problem and I am working on it. I think I'll be able to fix this by next version.

Thank you for using videocache :)

by bellera on 4 Feb 2009

Hello!

I never seen this errors (1.6, 1.7 and 1.8 versions) when using:

squid -k rotate
squid -k reconfigure

I used many years squidguard as redirector and I haven't any problems restarting its child processes whith these squid commands.

But squidguard makes only URL filtering, so its actions are very fast and child processes are quickly refreshed.

videocache has the XMLRC server and can have video downloading if I well understud. In consequence, it is more difficult to know if all videocache tasks are finished.

Sometimes I had doubts in these situations and at my FreeBSD proxy I made:

/usr/local/etc/rc.d/squid stop
ps –uU squid
killall -u squid
/usr/local/etc/rc.d/squid start

The "ps" and "killall" lines are to ensure that all the processes owned by the user "squid" are finished. "squid stop" should be sufficient because redirectors are child processes of squid daemon.

I will modify my (midnight) maintenance squid script to don't use squid -k rotate …

Regards,

Josep Pujadas

by Kulbir Saini on 4 Feb 2009

Josep,

Under normal conditions you don't really face this problem, but XMLRPC does create problems sometime due to unclean exit. Anyway it should not happen with 1.8.

Thank You!

by Anonymous on 24 Mar 2009

Hi

To get around this problem until it is fixed I'm using this script:

$ cat /usr/local/bin/squid-reconfigure 
#!/bin/bash
echo "Reconfiguring Squid without Videocache support..."
cp /etc/squid/squid.conf-novc /etc/squid/squid.conf
squid -k reconfigure
sleep 2
echo "Killing any remaining Videocache processes..."
killall python
echo "Reconfiguring with Videocache support..."
cp /etc/squid/squid.conf-vc /etc/squid/squid.conf
squid -k reconfigure
echo "Done."

Also made the same sort of script to do the rotate.

You need to sign in. Please sign in to add answer to this question.