mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 08:56:02 +03:00
[GH-ISSUE #653] Statistiques on v1.2.0-rc1 #612
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#612
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Dec 12, 2014).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/653
Hello,
After a fresh install of modoboa on debian 7.7, i've this error when i want to see Graphical Stats :
[Fri Dec 12 14:04:46 2014] [error] Internal Server Error: /stats/graphs/
[Fri Dec 12 14:04:46 2014] [error] Traceback (most recent call last):
[Fri Dec 12 14:04:46 2014] [error] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
[Fri Dec 12 14:04:46 2014] [error] response = wrapped_callback(request, _callback_args, *_callback_kwargs)
[Fri Dec 12 14:04:46 2014] [error] File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Fri Dec 12 14:04:46 2014] [error] return view_func(request, _args, *_kwargs)
[Fri Dec 12 14:04:46 2014] [error] File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
[Fri Dec 12 14:04:46 2014] [error] return view_func(request, _args, *_kwargs)
[Fri Dec 12 14:04:46 2014] [error] File "/usr/local/lib/python2.7/dist-packages/modoboa/extensions/stats/views.py", line 110, in graphs
[Fri Dec 12 14:04:46 2014] [error] tplvars['graphs'] = gsets[gset].export(tplvars["domain"], start, end)
[Fri Dec 12 14:04:46 2014] [error] File "/usr/local/lib/python2.7/dist-packages/modoboa/extensions/stats/graphics.py", line 146, in export
[Fri Dec 12 14:04:46 2014] [error] "curves": graph.export(rrdfile, start, end)
[Fri Dec 12 14:04:46 2014] [error] File "/usr/local/lib/python2.7/dist-packages/modoboa/extensions/stats/graphics.py", line 79, in export
[Fri Dec 12 14:04:46 2014] [error] code, output = exec_cmd(cmd)
[Fri Dec 12 14:04:46 2014] [error] File "/usr/local/lib/python2.7/dist-packages/modoboa/lib/sysutils.py", line 32, in exec_cmd
[Fri Dec 12 14:04:46 2014] [error] process = subprocess.Popen(cmd, **kwargs)
[Fri Dec 12 14:04:46 2014] [error] File "/usr/lib/python2.7/subprocess.py", line 679, in init
[Fri Dec 12 14:04:46 2014] [error] errread, errwrite)
[Fri Dec 12 14:04:46 2014] [error] File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
[Fri Dec 12 14:04:46 2014] [error] raise child_exception
[Fri Dec 12 14:04:46 2014] [error] TypeError: execv() arg 2 must contain only strings
Crontab for RRD created, RRD files created, directory of RRD in modoboa is correct.
Thanks
@tonioo commented on GitHub (Dec 12, 2014):
You're not the first one to report this issue (see #646). Is it still failing?
@ghost commented on GitHub (Dec 12, 2014):
i've rrdtool installed (rrdtool_1.4.7-2_amd64.deb), still failing.
directory /srv/vmail/vmail/media/stats still empty and /srv/vmail/vmail/media/stats/graphs not exists.
@tonioo commented on GitHub (Dec 12, 2014):
The media/stats directory is not used anymore. The graphs directory is the one you configured to store RRD files ?
Have you setup the cron job ?
@ghost commented on GitHub (Dec 12, 2014):
Ok for media stats.
My crontab :
*/5 * * * * /srv/vmail/manage.py logparser &> /dev/null
RRD directory in modoboa : /var/lib/modoboa/rrd
content of this dir :
-rw-r--r-- 1 root root 107K déc. 12 16:40 boiteamail.net.rrd
-rw-r--r-- 1 root root 107K déc. 12 16:40 global.rrd
-rw-r--r-- 1 root root 107K déc. 11 18:25 gryfon.eu.rrd
-rw-r--r-- 1 root root 107K déc. 12 16:35 mon-mail.eu.rrd
-rw-r--r-- 1 root root 107K déc. 11 18:25 tribal-dolphin.eu.rrd
Sorry for the mistake, i think media/stats/graphs is created by modoboa cause i see this message : Internal Server Error: /stats/graphs/ :-)
@tonioo commented on GitHub (Dec 12, 2014):
Is there any traffic on your server ? Have selected a custom time period or something else ?
@ghost commented on GitHub (Dec 12, 2014):
Yes, it have mail traffic on 2 domains.
global.rrd and .rrd updated today at 17:55. another .rrd updated today at 17:50
Same error with or without custom period or when i type a domain name in the textbox.
@tonioo commented on GitHub (Dec 12, 2014):
Do you know python/django ?
@ghost commented on GitHub (Dec 12, 2014):
I'm a beginner in python/Django. I usually work in php.
@tonioo commented on GitHub (Dec 12, 2014):
According to the exception that is raised in the stacktrace you pasted, there is something wrong with command I try to execute using Popen (or excev in the end). It would be helpful if I could dump this command.
The interesing line is:
I need the content of cmd. How did you receive this error? Into you browser or by email?
@ghost commented on GitHub (Dec 12, 2014):
I try to get the content of the variable but no success.
No report of this error by mail, i set debug=True in settings.py but no more info, juste a red message "erreur interne".
The stacktrace is from apache error log. Additionaly i've this in the access log :
[12/Dec/2014:19:37:51 +0100] "GET /stats/graphs/?gset=mailtraffic&_=1418409469508 HTTP/1.1" 500 4535
@tonioo commented on GitHub (Dec 12, 2014):
Can you remove the # character inside the URL and try again? You should see a dynamic stack...
@ghost commented on GitHub (Dec 12, 2014):
graphics.py", line 79
cmd
u'rrdtool xport --start -1day --end 1418416726 DEF:reject=/var/lib/modoboa/rrd/global.rrd:reject:AVERAGE CDEF:rejectpm=reject,60,* XPORT:rejectpm:"messages rejet\xe9s" DEF:bounced=/var/lib/modoboa/rrd/global.rrd:bounced:AVERAGE CDEF:bouncedpm=bounced,60,* XPORT:bouncedpm:"messages non remis" DEF:recv=/var/lib/modoboa/rrd/global.rrd:recv:AVERAGE CDEF:recvpm=recv,60,* XPORT:recvpm:"messages re\xe7us" DEF:sent=/var/lib/modoboa/rrd/global.rrd:sent:AVERAGE CDEF:sentpm=sent,60,* XPORT:sentpm:"messages envoy\xe9s"'
cmdargs
[u'DEF:reject=/var/lib/modoboa/rrd/global.rrd:reject:AVERAGE',
'CDEF:rejectpm=reject,60,',
u'XPORT:rejectpm:"messages rejet\xe9s"',
u'DEF:bounced=/var/lib/modoboa/rrd/global.rrd:bounced:AVERAGE',
'CDEF:bouncedpm=bounced,60,',
u'XPORT:bouncedpm:"messages non remis"',
u'DEF:recv=/var/lib/modoboa/rrd/global.rrd:recv:AVERAGE',
'CDEF:recvpm=recv,60,',
u'XPORT:recvpm:"messages re\xe7us"',
u'DEF:sent=/var/lib/modoboa/rrd/global.rrd:sent:AVERAGE',
'CDEF:sentpm=sent,60,',
u'XPORT:sentpm:"messages envoy\xe9s"']
sysutils.py, line 32
cmd
u'rrdtool xport --start -1day --end 1418416726 DEF:reject=/var/lib/modoboa/rrd/global.rrd:reject:AVERAGE CDEF:rejectpm=reject,60,* XPORT:rejectpm:"messages rejet\xe9s" DEF:bounced=/var/lib/modoboa/rrd/global.rrd:bounced:AVERAGE CDEF:bouncedpm=bounced,60,* XPORT:bouncedpm:"messages non remis" DEF:recv=/var/lib/modoboa/rrd/global.rrd:recv:AVERAGE CDEF:recvpm=recv,60,* XPORT:recvpm:"messages re\xe7us" DEF:sent=/var/lib/modoboa/rrd/global.rrd:sent:AVERAGE CDEF:sentpm=sent,60,* XPORT:sentpm:"messages envoy\xe9s"'
@tonioo commented on GitHub (Dec 13, 2014):
What's the locale of your server ?
@ghost commented on GitHub (Dec 13, 2014):
In french, fr utf8.
I'll try to change to en and I'll tell you.
With en_US.UTF8 : same error :(
@tonioo commented on GitHub (Dec 13, 2014):
Could you try the fix I've just pushed please ?
@ghost commented on GitHub (Dec 13, 2014):
Work for me.
Thanks a lot !!
@tonioo commented on GitHub (Dec 13, 2014):
Great :)