claudyus / LXC-Web-Panel

LXC Web Panel improved for lxc 1.0+
http://claudyus.github.io/LXC-Web-Panel/
Other
221 stars 68 forks source link

issue with network settings #94

Open lgwapnitsky opened 9 years ago

lgwapnitsky commented 9 years ago

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

claudyus commented 9 years ago

Try the --debug option from readme [1] and when this happens?

  1. https://github.com/claudyus/LXC-Web-Panel#developersdebug
sequentiality commented 9 years ago

Hello!

OS: CentOS Linux release 7.1.1503 (Core) LXC: 1.0.7-2.el7.x86_64 LWP: master (Installation on rpm system or from source code)

I have the same. Debug output after I logged in:

KeyError

KeyError: 'lxc1' Traceback (most recent call last)

This is the Copy/Paste friendly version of the traceback. You can also paste this traceback into a gist:

Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/flask/app.py", line 1836, in call return self.wsgi_app(environ, start_response) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request return self.view_functionsrule.endpoint File "/opt/LXC-Web-Panel-master/lwp/utils.py", line 95, in new_handler return handler(_args, *_kwargs) File "/opt/LXC-Web-Panel-master/lwp/views/main.py", line 41, in home listx = lxc.listx() File "/opt/LXC-Web-Panel-master/lwp/lxclite/init.py", line 127, in listx if status_container[container][0] == 'RUNNING': KeyError: 'lxc1'

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object

Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.


lxc1 is the existing container. When I move it from lxc dir, same error for second container: /var/lib/lxc/lxc1: total 12 -rw-r--r--. 1 root root 1235 жов 3 10:25 config dr-xr-xr-x. 18 root root 4096 жов 15 09:19 rootfs lrwxrwxrwx. 1 root root 31 жов 15 09:19 rootfs.dev -> /dev/.lxc/lxc1.386cc02d7fa8aff2 -rw-------. 1 root root 17 сер 14 16:16 tmp_root_pass

/var/lib/lxc/lxc2: total 12 -rw-r--r--. 1 root root 1238 жов 3 10:26 config dr-xr-xr-x. 18 root root 4096 жов 15 09:20 rootfs lrwxrwxrwx. 1 root root 31 жов 15 09:20 rootfs.dev -> /dev/.lxc/lxc2.386cbf2d7fa8ae3f -rw-------. 1 root root 17 сер 14 16:17 tmp_root_pass

If I move all containers from lxc dir, LWP shows me a home page but no containers :)

alive-corpse commented 8 years ago

Hi! I get 500 internal server error, while saving network settings. All parameters are the same as examples (10.0.3.1/255.255.255.0/etc), bridge name is br0. It's exists and active. OS: Debian Jessie LXC: 1:1.0.6-6+deb8u1 LXCCTL: 0.3.1+debian-3 LWP: 0.8

I start lwp with debug option and after trying got this traceback: File "/usr/share/pyshared/flask/app.py", line 1836, in __call__ return self.wsgi_app(environ, start_response) File "/usr/share/pyshared/flask/app.py", line 1820, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/usr/share/pyshared/flask/app.py", line 1403, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/share/pyshared/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/usr/share/pyshared/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/share/pyshared/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/share/pyshared/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/usr/share/pyshared/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/lib/python2.7/dist-packages/lwp/utils.py", line 94, in new_handler return handler(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/lwp/views/main.py", line 139, in lxc_net if form['use'] != cfg['use']: TypeError: 'bool' object has no attribute '__getitem__'