Troubleshooting: Cron <root@localhost> /usr/share/l.v.e-manager/utils/

Your cron job error may look similar to the following:


Traceback (most recent call last):
File "/usr/share/l.v.e-manager/utils/", line 39, in <module>
File "/usr/share/l.v.e-manager/utils/", line 35, in main
File "/usr/lib/python2.6/site-packages/clselect/clselectpython/", line 35, in write_cache
extensions = self._rpc.list_packages()
File "/usr/lib64/python2.6/", line 1199, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.6/", line 1489, in __request
File "/usr/lib64/python2.6/", line 1235, in request
self.send_content(h, request_body)
File "/usr/lib64/python2.6/", line 1349, in send_content
File "/usr/lib64/python2.6/", line 908, in endheaders
File "/usr/lib64/python2.6/", line 780, in _send_output
File "/usr/lib64/python2.6/", line 739, in send
File "/usr/lib64/python2.6/", line 720, in connect
File "/usr/lib64/python2.6/", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known

What it's doing

This script generates a list of available python extensions from pypi ( ) and stores it itn /var/lve/pypindex. The number of lines in this file should be the same as the number of available packages in pypi, at the time of this writing that is 59655. You can check this against your file with the word count command and the line count option as follows

# wc -l /var/lve/pypindex
59655 /var/lve/pypindex

The script supports a -d option to remove this cache file and running the script successfully with no options should generate it.

# /usr/share/l.v.e-manager/utils/ -h
Usage: /usr/share/l.v.e-manager/utils/ [-d]
 -h | --help   : print this message
 -d | --delete : delete cache
# /usr/share/l.v.e-manager/utils/ -d
# /usr/share/l.v.e-manager/utils/
# stat /var/lve/pypindex
  File: `/var/lve/pypindex'
  Size: 762624          Blocks: 1496       IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 16123159    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2015-05-14 16:46:06.897967456 -0700
Modify: 2015-05-14 16:46:06.903967456 -0700
Change: 2015-05-14 16:46:06.904967456 -0700

What’s wrong / Troubleshooting options

If this script failed chances are either it could not write the cache file or it could not connect to pypi at the time the cron job ran, first run it again by hand to see if the problem still exists.


If it fails you can optionally run it with strace to get some more details

strace /usr/share/l.v.e-manager/utils/ 2>&1 |more 

The strace output will show you a query to your resolvers, in this example public google resovlers and and a query to which resovles to at this time:

connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("")}, 16) = 0
poll([{fd=3, events=POLLOUT}], 1, 0)    = 1 ([{fd=3, revents=POLLOUT}])
sendto(3, "\322w\1\0\0\1\0\0\0\0\0\0\4pypi\6python\3org\0\0\1\0"..., 33, MSG_NOSIGNAL, NULL, 0) = 33
poll([{fd=3, events=POLLIN|POLLOUT}], 1, 5000) = 1 ([{fd=3, revents=POLLOUT}])
sendto(3, "W\256\1\0\0\1\0\0\0\0\0\0\4pypi\6python\3org\0\0\34\0"..., 33, MSG_NOSIGNAL, NULL, 0) = 33
poll([{fd=3, events=POLLIN}], 1, 4999)  = 1 ([{fd=3, revents=POLLIN}])
ioctl(3, FIONREAD, [84])                = 0
recvfrom(3, "\322w\201\200\0\1\0\2\0\0\0\0\4pypi\6python\3org\0\0\1\0"..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("")}, [16]) = 84
poll([{fd=3, events=POLLIN}], 1, 4965)  = 1 ([{fd=3, revents=POLLIN}])
ioctl(3, FIONREAD, [140])               = 0
recvfrom(3, "W\256\201\200\0\1\0\1\0\1\0\0\4pypi\6python\3org\0\0\34\0"..., 1964, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("")}, [16]) = 140
close(3)                                = 0
connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("")}, 16) = 0
sendto(3, "POST /pypi HTTP/1.0\r\nHost: pypi."..., 147, 0, NULL, 0) = 147
sendto(3, "<?xml version='1.0'?>\n<methodCal"..., 107, 0, NULL, 0) = 107

Check that your file system for /var is not full, not out of inodes, and not marked read only.

df -h && df -i
touch /var/lve/test
rm /var/lve/test

Check that you can resolve the domain and connect out on port 80

telnet 80

Resolving issues above should allow the script to run okay. If you are still having trouble please open a ticket with support on this matter.