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

Can't open sixpack-web on http://localhost:5001/ #115

Closed
hendrauzia opened this issue May 20, 2014 · 14 comments
Closed

Can't open sixpack-web on http://localhost:5001/ #115

hendrauzia opened this issue May 20, 2014 · 14 comments

Comments

@hendrauzia
Copy link

Summary:
I have just finished installing sixpack, and can't open sixpack-web, opening http://localhost:5001/ always returns error, sixpack server is fine, following are the errors:

 * Running on http://0.0.0.0:5001/
10.0.2.2 - - [19/May/2014 17:12:34] "GET / HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1410, in handle_exception
    return handler(e)
  File "/usr/local/lib/python2.7/dist-packages/sixpack/web.py", line 160, in internal_server_error
    return render_template('errors/500.html'), 500
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 128, in render_template
    context, ctx.app)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 110, in _render
    rv = template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/sixpack/templates/errors/500.html", line 1, in top-level template code
    {% extends "layout.html" %}
  File "/usr/local/lib/python2.7/dist-packages/sixpack/templates/layout.html", line 12, in top-level template code
    {% assets "css_all" %}
  File "/usr/local/lib/python2.7/dist-packages/webassets/ext/jinja2.py", line 181, in _render_assets
    urls = bundle.urls(env=env)
  File "/usr/local/lib/python2.7/dist-packages/webassets/bundle.py", line 681, in urls
    urls.extend(bundle._urls(env, extra_filters, *args, **kwargs))
  File "/usr/local/lib/python2.7/dist-packages/webassets/bundle.py", line 643, in _urls
    *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webassets/bundle.py", line 498, in _build
    force, disable_cache=disable_cache, extra_filters=extra_filters)
  File "/usr/local/lib/python2.7/dist-packages/webassets/bundle.py", line 453, in _merge_and_apply
    return filtertool.apply(final, selected_filters, 'output')
  File "/usr/local/lib/python2.7/dist-packages/webassets/merge.py", line 269, in apply
    return self._wrap_cache(key, func)
  File "/usr/local/lib/python2.7/dist-packages/webassets/merge.py", line 216, in _wrap_cache
    content = func().getvalue()
  File "/usr/local/lib/python2.7/dist-packages/webassets/merge.py", line 249, in func
    getattr(filter, type)(data, out, **kwargs_final)
  File "/usr/local/lib/python2.7/dist-packages/webassets/filter/yui.py", line 50, in output
    ['--charset=utf-8', '--type=%s' % self.mode], out, _in)
  File "/usr/local/lib/python2.7/dist-packages/webassets/filter/__init__.py", line 527, in subprocess
    [self.java_bin, '-jar', self.jar] + args, out, data)
  File "/usr/local/lib/python2.7/dist-packages/webassets/filter/__init__.py", line 481, in subprocess
    stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Steps to Reproduce:
SIXPACK_CONFIG=/etc/sixpack/config.yml sixpack-web

Operating System:
Ubuntu Server 14.04

Installation Procedures:

sudo apt-get install redis-server python-dev
wget -O - https://bootstrap.pypa.io/get-pip.py | sudo python
sudo pip install sixpack

Additional info:

  • I have tried to reproduce the problem with virtualenv, and it returns the same error.
  • http://localhost:5001/_status returns 200, other than that returns 500.
@hendrauzia hendrauzia changed the title Can't start sixpack-web Can't open sixpack-web on http://localhost:5001/ May 20, 2014
@josegonzalez
Copy link
Contributor

What version of pip and distribute are you running? I'll try and reproduce this on a Vagrant vm.

@hendrauzia
Copy link
Author

pip version 1.5.6

@hendrauzia
Copy link
Author

I managed to isolate the problem, it's related to file templates/layout.html line 12-14 and 45-47, errors disappear on removing those lines.

update:
I have managed to focus on the cause of the errors, it's on web.py, line 21 and 26, the lines with filters, I'm not familiar with flask, so I have no idea how to fix it.

@zackkitzmiller
Copy link
Contributor

Interesting. It's as if some requirements aren't being installed properly, you also shouldn't install Sixpack with sudo.

@hendrauzia
Copy link
Author

Yes, I noticed from the readme, using virtualenv is recomended, I have replicated the issue here using virtualenv, unfortunately it returns the same error. Temporary solution currently commenting line 21 and 26 on file web.py, since it's just for styling, I hope it doesn't affect functionality.

@VPilitsyn
Copy link

I had this problem. Sixpack-web works successfully after installing java (icedtea-bin) package linux Gentoo

@josegonzalez
Copy link
Contributor

wtf we don't even use java for sixpack!

For the record, we've been using pip 1.4.1 to install things because they had a pretty serious breaking change in 1.5. Maybe try installing that version within the vm before installing requirements?

@VPilitsyn
Copy link

Already installed dev-python/pip-1.5.6

Look at this piece of text error in question:

File "/ usr/local/lib/python2.7/dist-packages/webassets/filter/init.py", line 527, in subprocess
     [self.java_bin, '-jar', self.jar] + args, out, data)
   File "/ usr/local/lib/python2.7/dist-packages/webassets/filter/init.py", line 481, in subprocess
     stderr = subprocess.PIPE)
</ cut>

But! here webassets needs java :)

@josegonzalez
Copy link
Contributor

ugh why

Okay now that we know what part of the issue is, does anyone know of an alternative way to bundle assets with python that doesn't require another language? Otherwise, I feel as though the best course of action is to remove the asset compression from sixpack-web.

@erwaller
Copy link
Contributor

Yeah, let's just kill asset bundling, it's only used for the admin anyway

@zackkitzmiller
Copy link
Contributor

Definitely.

@josegonzalez
Copy link
Contributor

@zackkitzmiller release a new version?

@zackkitzmiller
Copy link
Contributor

I will. There a bunch of bug fixes in the sprint this week. I'm going to release when they're all done.

@josegonzalez
Copy link
Contributor

Gotcha. 👍

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

No branches or pull requests

5 participants