Description
First time today I found in my server logs a ValueError: invalid literal for long() with base 10: 'uts'
some instances showed an Internal Server Error
1 [Tue Jun 15 19:09:39 2010] [error] 2010-06-15 19:09:39,898 ERROR MoinMoin.wsgiapp:293 An exception has occurred [http://server/page].
2 [Tue Jun 15 19:09:39 2010] [error] Traceback (most recent call last):
3 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 282, in __call__
4 [Tue Jun 15 19:09:39 2010] [error] response = run(context)
5 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 88, in run
6 [Tue Jun 15 19:09:39 2010] [error] response = dispatch(request, context, action_name)
7 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 136, in dispatch
8 [Tue Jun 15 19:09:39 2010] [error] response = handle_action(context, pagename, action_name)
9 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 154, in handle_action
10 [Tue Jun 15 19:09:39 2010] [error] context.page = wikiutil.getFrontPage(context)
11 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wikiutil.py", line 717, in getFrontPage
12 [Tue Jun 15 19:09:39 2010] [error] return getLocalizedPage(request, request.cfg.page_front_page)
13 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wikiutil.py", line 686, in getLocalizedPage
14 [Tue Jun 15 19:09:39 2010] [error] i18n_name = request.getText(pagename)
15 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/web/contexts.py", line 141, in _
16 [Tue Jun 15 19:09:39 2010] [error] return i18n.getText(text, request, lang, **kw)
17 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/i18n/__init__.py", line 313, in getText
18 [Tue Jun 15 19:09:39 2010] [error] if dictpagename in dicts:
19 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/datastruct/backends/wiki_dicts.py", line 70, in __contains__
20 [Tue Jun 15 19:09:39 2010] [error] return self.is_dict_name(dict_name) and Page(self.request, dict_name).exists()
21 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/Page.py", line 666, in exists
22 [Tue Jun 15 19:09:39 2010] [error] d, d, exists = self.get_rev(use_underlay, rev)
23 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/Page.py", line 385, in get_rev
24 [Tue Jun 15 19:09:39 2010] [error] cache_data = request.cfg.cache.meta.getItem(request, cache_name, cache_key)
25 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/Page.py", line 87, in getItem
26 [Tue Jun 15 19:09:39 2010] [error] self.refresh(request)
27 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/Page.py", line 114, in refresh
28 [Tue Jun 15 19:09:39 2010] [error] new_pos, items = elog.news(old_pos)
29 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/logfile/editlog.py", line 251, in news
30 [Tue Jun 15 19:09:39 2010] [error] for line in self:
31 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/logfile/__init__.py", line 303, in next
32 [Tue Jun 15 19:09:39 2010] [error] result = self.__next()
33 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/logfile/__init__.py", line 290, in __next
34 [Tue Jun 15 19:09:39 2010] [error] result = self.parser(self.__buffer.lines[self.__rel_index])
35 [Tue Jun 15 19:09:39 2010] [error] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/logfile/editlog.py", line 226, in parser
36 [Tue Jun 15 19:09:39 2010] [error] result.ed_time_usecs = long(result.ed_time_usecs or '0') # has to be long for py 2.2.x
37 [Tue Jun 15 19:09:39 2010] [error] ValueError: invalid literal for long() with base 10: 'uts'
38 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] mod_wsgi (pid=11378): Exception occurred processing WSGI script '/home/wikicoconuts/coconuts.wsgi'.
39 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] Traceback (most recent call last):
40 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/support/werkzeug/utils.py", line 248, in __call__
41 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] return self.app(environ, start_response)
42 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 282, in __call__
43 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] response = run(context)
44 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 88, in run
45 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] response = dispatch(request, context, action_name)
46 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 136, in dispatch
47 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] response = handle_action(context, pagename, action_name)
48 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wsgiapp.py", line 154, in handle_action
49 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] context.page = wikiutil.getFrontPage(context)
50 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wikiutil.py", line 717, in getFrontPage
51 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] return getLocalizedPage(request, request.cfg.page_front_page)
52 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/wikiutil.py", line 686, in getLocalizedPage
53 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] i18n_name = request.getText(pagename)
54 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/web/contexts.py", line 141, in _
55 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] return i18n.getText(text, request, lang, **kw)
56 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/i18n/__init__.py", line 313, in getText
57 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] if dictpagename in dicts:
58 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/datastruct/backends/wiki_dicts.py", line 70, in __contains__
59 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] return self.is_dict_name(dict_name) and Page(self.request, dict_name).exists()
60 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/Page.py", line 666, in exists
61 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] d, d, exists = self.get_rev(use_underlay, rev)
62 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/Page.py", line 385, in get_rev
63 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] cache_data = request.cfg.cache.meta.getItem(request, cache_name, cache_key)
64 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/Page.py", line 87, in getItem
65 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] self.refresh(request)
66 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/Page.py", line 114, in refresh
67 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] new_pos, items = elog.news(old_pos)
68 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/logfile/editlog.py", line 251, in news
69 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] for line in self:
70 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/logfile/__init__.py", line 303, in next
71 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] result = self.__next()
72 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/logfile/__init__.py", line 290, in __next
73 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] result = self.parser(self.__buffer.lines[self.__rel_index])
74 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] File "/usr/local/lib/python2.6/dist-packages/MoinMoin/logfile/editlog.py", line 226, in parser
75 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] result.ed_time_usecs = long(result.ed_time_usecs or '0') # has to be long for py 2.2.x
76 [Tue Jun 15 19:09:39 2010] [error] [client xxx.xxx.xxx.xxx] ValueError: invalid literal for long() with base 10: 'uts'
The problem was solved by server restart.
It sounds therefore a bit like a caching problem.
Component selection
- general
Details
MoinMoin Version |
1.9.3pre |
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Discussion
Likely defect edit-log that contains "uts" instead of a timestamp or revision number.
- Unfortunately not
Those log files look a bit strange: where is the ip addr of some of the entries?
- In page_edit_log the page was created by xmlrpc in a wiki
- then copied to the new wiki instance.
- This instance has a config value show_hosts = 0 for supressing the hostname.
- afterwards some scripts add new content. I guess the don't write the ip into the file
And it is very obvious from the traceback that it tries to parse a timestamp from "uts".
- I know but I didn't find it
So, if you created these entries by yourself (not using the web interface), check your code.
- I created those entries by xmlrpc and cli and not manually.
Plan
- Priority:
- Assigned to:
- Status: