Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal server error when attempting to view some clients #4

Closed
waa opened this issue Apr 2, 2012 · 6 comments
Closed

Internal server error when attempting to view some clients #4

waa opened this issue Apr 2, 2012 · 6 comments
Labels
Milestone

Comments

@waa
Copy link

waa commented Apr 2, 2012

Clicking on the client's name link for several of our 15 clients returens an internal server error:

Broswer window shows only:

--[snip]--
Internal Server Error

The server encountered an unexpected internal server error

(generated by waitress)
--[snip]--

nginx access log file shows only these two lines when that error is encounters:

192.168.254.4 - - [02/Apr/2012:17:47:20 -0400] "GET /client/13/ HTTP/1.1" 500 110 "http://almir.revpol.com:8000/client/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7"
192.168.254.4 - - [02/Apr/2012:17:47:20 -0400] "GET /favicon.ico HTTP/1.1" 404 1153 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7"

Most other client's pages display just fine

Bill Arlofski

@domenkozar
Copy link
Owner

Can you also pastebin logs at ALMIR_INSTALL_DIR/var/log/almir-stderr*?

@waa
Copy link
Author

waa commented Apr 3, 2012

Here is that log when I click on one client:

2012-04-02 20:06:37,066 ERROR [exc_logger][Dummy-4] http://almir.revpol.com:8000/client/1/
Traceback (most recent call last):
File "/opt/almir/eggs/pyramid_exclog-0.5-py2.7.egg/pyramid_exclog/init.py", line 40, in exclog_tween
return handler(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 164, in handle_request
response = view_callable(context, request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/config/views.py", line 352, in rendered_view
context)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 396, in render_view
return self.render_to_response(response, system, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 426, in render_to_response
result = self.render(value, system_values, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 422, in render
result = renderer(value, system_values)
File "/opt/almir/eggs/pyramid_jinja2-1.3-py2.7.egg/pyramid_jinja2/init.py", line 287, in call
return self.template.render(system)
File "/opt/almir/eggs/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/almir/almir/templates/client_detail.jinja2", line 1, in top-level template code
{% extends "templates/base.jinja2" %}
File "/opt/almir/almir/templates/base.jinja2", line 73, in top-level template code
{% block container %}
File "/opt/almir/almir/templates/base.jinja2", line 84, in block "container"
{% block content %}
File "/opt/almir/almir/templates/client_detail.jinja2", line 6, in block "content"
{{ macros.jobs_table(request, jobs) }}
File "/opt/almir/almir/templates/macros.jinja2", line 67, in template
{{ link(job.render_type(request)) }}
File "/opt/almir/almir/models.py", line 249, in render_type
return {'text': TYPES[self.type]}
KeyError: 'c'
2012-04-02 20:06:37,067 ERROR [waitress][Dummy-4] Exception when serving /client/1/
Traceback (most recent call last):
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/channel.py", line 329, in service
task.service()
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/task.py", line 173, in service
self.execute()
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/task.py", line 380, in execute
app_iter = self.channel.server.application(env, start_response)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 187, in call
response = self.handle_request(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/tweens.py", line 20, in excview_tween
response = handler(request)
File "/opt/almir/eggs/pyramid_tm-0.3-py2.7.egg/pyramid_tm/init.py", line 61, in tm_tween
response = handler(request)
File "/opt/almir/eggs/pyramid_exclog-0.5-py2.7.egg/pyramid_exclog/init.py", line 40, in exclog_tween
return handler(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 164, in handle_request
response = view_callable(context, request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/config/views.py", line 352, in rendered_view
context)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 396, in render_view
return self.render_to_response(response, system, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 426, in render_to_response
result = self.render(value, system_values, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 422, in render
result = renderer(value, system_values)
File "/opt/almir/eggs/pyramid_jinja2-1.3-py2.7.egg/pyramid_jinja2/init.py", line 287, in call
return self.template.render(system)
File "/opt/almir/eggs/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/almir/almir/templates/client_detail.jinja2", line 1, in top-level template code
{% extends "templates/base.jinja2" %}
File "/opt/almir/almir/templates/base.jinja2", line 73, in top-level template code
{% block container %}
File "/opt/almir/almir/templates/base.jinja2", line 84, in block "container"
{% block content %}
File "/opt/almir/almir/templates/client_detail.jinja2", line 6, in block "content"
{{ macros.jobs_table(request, jobs) }}
File "/opt/almir/almir/templates/macros.jinja2", line 67, in template
{{ link(job.render_type(request)) }}
File "/opt/almir/almir/models.py", line 249, in render_type
return {'text': TYPES[self.type]}
KeyError: 'c'
2012-04-02 20:06:37,108 ERROR [exc_logger][Dummy-2] http://almir.revpol.com:8000/client/1/
Traceback (most recent call last):
File "/opt/almir/eggs/pyramid_exclog-0.5-py2.7.egg/pyramid_exclog/init.py", line 40, in exclog_tween
return handler(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 164, in handle_request
response = view_callable(context, request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/config/views.py", line 352, in rendered_view
context)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 396, in render_view
return self.render_to_response(response, system, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 426, in render_to_response
result = self.render(value, system_values, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 422, in render
result = renderer(value, system_values)
File "/opt/almir/eggs/pyramid_jinja2-1.3-py2.7.egg/pyramid_jinja2/init.py", line 287, in call
return self.template.render(system)
File "/opt/almir/eggs/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/almir/almir/templates/client_detail.jinja2", line 1, in top-level template code
{% extends "templates/base.jinja2" %}
File "/opt/almir/almir/templates/base.jinja2", line 73, in top-level template code
{% block container %}
File "/opt/almir/almir/templates/base.jinja2", line 84, in block "container"
{% block content %}
File "/opt/almir/almir/templates/client_detail.jinja2", line 6, in block "content"
{{ macros.jobs_table(request, jobs) }}
File "/opt/almir/almir/templates/macros.jinja2", line 67, in template
{{ link(job.render_type(request)) }}
File "/opt/almir/almir/models.py", line 249, in render_type
return {'text': TYPES[self.type]}
KeyError: 'c'
2012-04-02 20:06:37,109 ERROR [waitress][Dummy-2] Exception when serving /client/1/
Traceback (most recent call last):
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/channel.py", line 329, in service
task.service()
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/task.py", line 173, in service
self.execute()
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/task.py", line 380, in execute
app_iter = self.channel.server.application(env, start_response)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 187, in call
response = self.handle_request(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/tweens.py", line 20, in excview_tween
response = handler(request)
File "/opt/almir/eggs/pyramid_tm-0.3-py2.7.egg/pyramid_tm/init.py", line 61, in tm_tween
response = handler(request)
File "/opt/almir/eggs/pyramid_exclog-0.5-py2.7.egg/pyramid_exclog/init.py", line 40, in exclog_tween
return handler(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 164, in handle_request
response = view_callable(context, request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/config/views.py", line 352, in rendered_view
context)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 396, in render_view
return self.render_to_response(response, system, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 426, in render_to_response
result = self.render(value, system_values, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 422, in render
result = renderer(value, system_values)
File "/opt/almir/eggs/pyramid_jinja2-1.3-py2.7.egg/pyramid_jinja2/init.py", line 287, in call
return self.template.render(system)
File "/opt/almir/eggs/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/almir/almir/templates/client_detail.jinja2", line 1, in top-level template code
{% extends "templates/base.jinja2" %}
File "/opt/almir/almir/templates/base.jinja2", line 73, in top-level template code
{% block container %}
File "/opt/almir/almir/templates/base.jinja2", line 84, in block "container"
{% block content %}
File "/opt/almir/almir/templates/client_detail.jinja2", line 6, in block "content"
{{ macros.jobs_table(request, jobs) }}
File "/opt/almir/almir/templates/macros.jinja2", line 67, in template
{{ link(job.render_type(request)) }}
File "/opt/almir/almir/models.py", line 249, in render_type
return {'text': TYPES[self.type]}
KeyError: 'c'

@domenkozar
Copy link
Owner

What bacula-director version do you have?

@waa
Copy link
Author

waa commented Apr 3, 2012

"Domen Kožar" reply@reply.github.com wrote:

What bacula-director version do you have?


Reply to this email directly or view it on GitHub:
#4 (comment)

Sorry.. I should have posted that in my original message. This issue is with Bacula 5.2.4 on gentoo Linux 64 bit

Bill Arlofski
Reverse Polarity,LLC

Sent while mobile... Please excuse any typos.

@waa
Copy link
Author

waa commented Apr 3, 2012

Hmmm Now, I am also seeing the same Inernal server error when attempting to access the "main" (Dashboard) page:

Here's the ALMIR_INSTALL_DIR/var/log/almir-stderr* when this error occurs:

2012-04-03 12:33:07,834 ERROR [exc_logger][Dummy-1] http://almir.revpol.com:8000/
Traceback (most recent call last):
File "/opt/almir/eggs/pyramid_exclog-0.5-py2.7.egg/pyramid_exclog/init.py", line 40, in exclog_tween
return handler(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 164, in handle_request
response = view_callable(context, request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/config/views.py", line 352, in rendered_view
context)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 396, in render_view
return self.render_to_response(response, system, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 426, in render_to_response
result = self.render(value, system_values, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 422, in render
result = renderer(value, system_values)
File "/opt/almir/eggs/pyramid_jinja2-1.3-py2.7.egg/pyramid_jinja2/init.py", line 287, in call
return self.template.render(system)
File "/opt/almir/eggs/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/almir/almir/templates/dashboard.jinja2", line 1, in top-level template code
{% extends "templates/base.jinja2" %}
File "/opt/almir/almir/templates/base.jinja2", line 73, in top-level template code
{% block container %}
File "/opt/almir/almir/templates/base.jinja2", line 84, in block "container"
{% block content %}
File "/opt/almir/almir/templates/dashboard.jinja2", line 13, in block "content"
{{ macros.jobs_table(request, jobs) }}
File "/opt/almir/almir/templates/macros.jinja2", line 67, in template
{{ link(job.render_type(request)) }}
File "/opt/almir/almir/models.py", line 249, in render_type
return {'text': TYPES[self.type]}
KeyError: 'c'
2012-04-03 12:33:07,837 ERROR [waitress][Dummy-1] Exception when serving /
Traceback (most recent call last):
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/channel.py", line 329, in service
task.service()
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/task.py", line 173, in service
self.execute()
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/task.py", line 380, in execute
app_iter = self.channel.server.application(env, start_response)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 187, in call
response = self.handle_request(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/tweens.py", line 20, in excview_tween
response = handler(request)
File "/opt/almir/eggs/pyramid_tm-0.3-py2.7.egg/pyramid_tm/init.py", line 61, in tm_tween
response = handler(request)
File "/opt/almir/eggs/pyramid_exclog-0.5-py2.7.egg/pyramid_exclog/init.py", line 40, in exclog_tween
return handler(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 164, in handle_request
response = view_callable(context, request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/config/views.py", line 352, in rendered_view
context)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 396, in render_view
return self.render_to_response(response, system, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 426, in render_to_response
result = self.render(value, system_values, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 422, in render
result = renderer(value, system_values)
File "/opt/almir/eggs/pyramid_jinja2-1.3-py2.7.egg/pyramid_jinja2/init.py", line 287, in call
return self.template.render(system)
File "/opt/almir/eggs/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/almir/almir/templates/dashboard.jinja2", line 1, in top-level template code
{% extends "templates/base.jinja2" %}
File "/opt/almir/almir/templates/base.jinja2", line 73, in top-level template code
{% block container %}
File "/opt/almir/almir/templates/base.jinja2", line 84, in block "container"
{% block content %}
File "/opt/almir/almir/templates/dashboard.jinja2", line 13, in block "content"
{{ macros.jobs_table(request, jobs) }}
File "/opt/almir/almir/templates/macros.jinja2", line 67, in template
{{ link(job.render_type(request)) }}
File "/opt/almir/almir/models.py", line 249, in render_type
return {'text': TYPES[self.type]}
KeyError: 'c'

@waa
Copy link
Author

waa commented Apr 18, 2012

Hi! Still seeing the "Internal Server Error" when accessing some of my clients. Not sure if you have had a chance to look into this yet, so I thought I would re-report it here.

The clients that cause this show a single forward slash "/" in the "Last successful backup" column, and "0B" in the "total backup size" column on the clients page.

here's the stderr log when this happens:

2012-04-18 15:13:19,876 ERROR [exc_logger][Dummy-3] http://almir.revpol.com:8000/client/12/
Traceback (most recent call last):
File "/opt/almir/eggs/pyramid_exclog-0.5-py2.7.egg/pyramid_exclog/init.py", line 40, in exclog_tween
return handler(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 164, in handle_request
response = view_callable(context, request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/config/views.py", line 352, in rendered_view
context)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 396, in render_view
return self.render_to_response(response, system, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 426, in render_to_response
result = self.render(value, system_values, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 422, in render
result = renderer(value, system_values)
File "/opt/almir/eggs/pyramid_jinja2-1.3-py2.7.egg/pyramid_jinja2/init.py", line 287, in call
return self.template.render(system)
File "/opt/almir/eggs/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/almir/almir/templates/client_detail.jinja2", line 1, in top-level template code
{% extends "templates/base.jinja2" %}
File "/opt/almir/almir/templates/base.jinja2", line 73, in top-level template code
{% block container %}
File "/opt/almir/almir/templates/base.jinja2", line 76, in block "container"
{% block sidebar %}
File "/opt/almir/almir/templates/client_detail.jinja2", line 24, in block "sidebar"
{{ macros.link(last_successful_job[0].render_starttime(request)) }}
UndefinedError: 'None' has no attribute 'render_starttime'
2012-04-18 15:13:19,877 ERROR [waitress][Dummy-3] Exception when serving /client/12/
Traceback (most recent call last):
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/channel.py", line 329, in service
task.service()
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/task.py", line 173, in service
self.execute()
File "/opt/almir/eggs/waitress-0.8.1-py2.7.egg/waitress/task.py", line 380, in execute
app_iter = self.channel.server.application(env, start_response)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 187, in call
response = self.handle_request(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/tweens.py", line 20, in excview_tween
response = handler(request)
File "/opt/almir/eggs/pyramid_tm-0.3-py2.7.egg/pyramid_tm/init.py", line 61, in tm_tween
response = handler(request)
File "/opt/almir/eggs/pyramid_exclog-0.5-py2.7.egg/pyramid_exclog/init.py", line 40, in exclog_tween
return handler(request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/router.py", line 164, in handle_request
response = view_callable(context, request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/config/views.py", line 352, in rendered_view
context)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 396, in render_view
return self.render_to_response(response, system, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 426, in render_to_response
result = self.render(value, system_values, request=request)
File "/opt/almir/eggs/pyramid-1.3-py2.7.egg/pyramid/renderers.py", line 422, in render
result = renderer(value, system_values)
File "/opt/almir/eggs/pyramid_jinja2-1.3-py2.7.egg/pyramid_jinja2/init.py", line 287, in call
return self.template.render(system)
File "/opt/almir/eggs/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/almir/almir/templates/client_detail.jinja2", line 1, in top-level template code
{% extends "templates/base.jinja2" %}
File "/opt/almir/almir/templates/base.jinja2", line 73, in top-level template code
{% block container %}
File "/opt/almir/almir/templates/base.jinja2", line 76, in block "container"
{% block sidebar %}
File "/opt/almir/almir/templates/client_detail.jinja2", line 24, in block "sidebar"
{{ macros.link(last_successful_job[0].render_starttime(request)) }}
UndefinedError: 'None' has no attribute 'render_starttime'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants