unable to submit popularity contest

Asked by Wolf Canis

Hello,
I found following message in the logs:

Jan 19 10:41:35 laptop popularity-contest: unable to submit report to http://popcon.ubuntu.com/popcon-submit.cgi.
Jan 19 10:41:35 laptop popularity-contest: unable to submit report using sendmail.
Jan 19 10:41:35 laptop popularity-contest: unable to submit report.

That isn't the first time. What's going wrong?
Anyone a idea?

Thanks in advance,
                                 Mr Canis

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Wolf Canis
Solved:
Last query:
Last reply:
Revision history for this message
davee (davee-sungate) said :
#1

Basic sanity check first: is networking up and running at the time of the above errors?

Revision history for this message
Wolf Canis (wolf-canis) said :
#2

Hello davee,
yes networking is up and is running perfectly.
So simple isn't it, sorry.

Any other suggestions?

Thanks in advance,
                                  Mr Canis

Revision history for this message
davee (davee-sungate) said :
#3

Hmmm, not sure about the web submission failing, although that link is currently giving a "A problem occurred in a Python script" error, so perhaps that's what's wrong.

The sendmail error might be due to your local MTA not running, perhaps? Do you have Postfix or Exim installed?

Revision history for this message
Wolf Canis (wolf-canis) said :
#4

Hello davee,
first to your question, whether I installed sendmail: No, I have installed Ubunto Desktop 6.10 edgy. I found until now no reason to install it. I use a laptop not a server.

Below is the error message that comes up if you run the above link (in my initial text):
-----------------------------------------------BEGIN------------------------------------------------------------
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
 /srv/popcon.ubuntu.com/www/popcon-submit.cgi
   14
   15 formStorage = cgi.FieldStorage()
   16 fileitem = formStorage["popcondata"]
   17 if fileitem.file:
   18 header = fileitem.file.readline()
fileitem undefined, formStorage = FieldStorage(None, None, [])
 /usr/lib/python2.4/cgi.py in __getitem__(self=FieldStorage(None, None, []), key='popcondata')
  557 if item.name == key: found.append(item)
  558 if not found:
  559 raise KeyError, key
  560 if len(found) == 1:
  561 return found[0]
builtin KeyError = <class exceptions.KeyError>, key = 'popcondata'

KeyError: 'popcondata'
      args = ('popcondata',)

------------------------------------------END------------------------------------------------------
I'm don't familiar with python, therefore this error message doesn't help me.

If I try to start the script by hand ( /etc/cron.weekly/popularity-contest) nothing happens
and the script hangs. I can't terminate it with CRTL+C, only with CTRL+D.

Below the the files under /var/log:

-rw-r--r-- 1 root root 54471 2007-01-19 22:03 popularity-contest
-rw-r--r-- 1 root root 0 2007-01-19 22:03 popularity-contest.0
-rw-r--r-- 1 root root 13933 2007-01-19 21:54 popularity-contest.2.gz
-rw-r--r-- 1 root root 13921 2007-01-19 21:53 popularity-contest.3.gz
-rw-r--r-- 1 root root 13878 2007-01-19 10:41 popularity-contest.4.gz
-rw-r--r-- 1 root root 13765 2007-01-12 13:07 popularity-contest.5.gz
-rw-r--r-- 1 root root 13553 2007-01-05 07:40 popularity-contest.6.gz

I have no idea what happens.
The Ubuntu server can't the problem, because then would no popularity-contest work,
or?

Mr Canis

Revision history for this message
davee (davee-sungate) said :
#5

It's possible you're coming up against this bug, actually:

https://bugs.launchpad.net/ubuntu/+source/popularity-contest/+bug/51149

It is quite feasible for popcon to be broken, occasionally :-)

Revision history for this message
Wolf Canis (wolf-canis) said :
#6

Hello davee,
thanks for the above link. I did the changes in /etc/cron.weekly/popularity-contest, but
I still have the same error.
Despite it doesn't work, thanks for your help.
I think, I must learn python to investigate the scripts. Perhaps the error isn't in the scripts,
but on the Ubuntu server. How knows? We will find out, or not. ~;)

Thanks,
             Mr Canis

Revision history for this message
Wolf Canis (wolf-canis) said :
#7

Hello,
perhaps I have a found a solution. The python script
/usr/share/popularity-contest/popcon-upload-ubuntu
want to read from stdin, but the shell
script /etc/cron.weekly/popularity-contest
gives the python script the parameter -f. The parameter I have ignored, because the
server and filename are hard coded:

ret= post_multipart('popcon.ubuntu.com', '/popcon-submit.cgi', '' , data)

This should be changed. If I learn enough about python, perhaps I do so. ~:)

I did following changes:

 #if setsid /usr/share/popularity-contest/popcon-upload-ubuntu \
 # -u $URL -f $POPCON 2>/dev/null ; then
 if setsid /usr/share/popularity-contest/popcon-upload-ubuntu \
            < $POPCON 2>/dev/null ; then

Now the python script reads from stdin, so how it expected. The script runs with out any
errors. I don't know whether the data comes correctly at the Ubuntu server or not. Is
there a way to check this?

Thanks in advance,
                                 Mr Canis

Revision history for this message
Benjamin Goodger (goodgerster-deactivatedaccount) said :
#8

Install sendmail, as indicated by the error message you received.

Revision history for this message
Best Wolf Canis (wolf-canis) said :
#9

Hello Ben Goodger,
yes that could I do, but this doesn't solve the problem. The changes I made, for now, solve the problem.
I have subscribed to the bug mentioned by davee. I close this request, because it is a bug and they work on it.

Thanks for your help.

Mr Canis