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

[Question] Ajenti on Debian 8 (SSL) #870

Closed
Yaksinikos opened this issue Feb 6, 2016 · 21 comments
Closed

[Question] Ajenti on Debian 8 (SSL) #870

Yaksinikos opened this issue Feb 6, 2016 · 21 comments

Comments

@Yaksinikos
Copy link

Hi,
I want to run a WordPress on my own home-server.
I want to use OpenSSL, Nginx, PostgreSQL and Ajenti for a better overview.

  • OpenSSL, nginx and postgresql are already installed.
    Ajenti is installed but the https://...:8000 do not work, just the http://...:8000 after setup the config manually.
    How do i get the certificate to run with ajenti?

EDIT:
Debian 8: My Firefox says: "No secure connection, please send us a report."
Debian 7: Works fine!

@Yaksinikos Yaksinikos changed the title [Question] Ajenti with NginX and PostgreSQL [Question] Ajenti with NginX (SSL) Feb 6, 2016
@Xefir
Copy link

Xefir commented Feb 7, 2016

Please refer to #702

There is a bug in the old and latest version of gevent.
You have to install 1.1b3 or 1.1b4 version of gevent to get https working.

Simply run this command and restart ajenti :

sudo easy_install -U gevent==1.1b4

@Yaksinikos
Copy link
Author

I'm not totally sure, i didn't installed any gevent at all as far i know...
Ant my debian say's unknown command :/
Really trying now to run ajenti for 4 days!

@Xefir
Copy link

Xefir commented Feb 9, 2016

If you don't have the easy_install command, it's because you don't have the required python-setuptools installed. Don't forget to install python-dev too for be able to compile gevent

@Yaksinikos
Copy link
Author

For how long is gevent required by ajenti, last I installed ajenti it worked all fine without any gevent (debian 7)?

@Xefir
Copy link

Xefir commented Feb 9, 2016

Since the beginning, but it strated to be annoying when the gevent team release the 1.1b version (around July 2015)

@Yaksinikos Yaksinikos changed the title [Question] Ajenti with NginX (SSL) [Question] Ajenti on Debian 8 (SSL) Feb 9, 2016
@Yaksinikos
Copy link
Author

Maybe it's time to update the instruction:
Ajenti - Installing on Debian

@Xefir
Copy link

Xefir commented Feb 15, 2016

[EDIT]

PLEASE KEEP YOUR COMMENTS !!! REMOVE THEM WILL MAKE ALL THIS SH*T A LOT HARDER TO FOLLOW

This is a response to a deleted comment by @echizenryoma about the fact it tends to be compatible with the lastest gevent RC.


Nope, it's not.

The service start, but the website don't load (with this usual error on logs)

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gevent-1.1rc3-py2.7-linux-x86_64.egg/gevent/greenlet.py", line 522, in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gevent-1.1rc3-py2.7-linux-x86_64.egg/gevent/baseserver.py", line 153, in _close_when_done
    return handle(*args)
  File "/usr/local/lib/python2.7/dist-packages/gevent-1.1rc3-py2.7-linux-x86_64.egg/gevent/server.py", line 130, in wrap_socket_and_handle
    return self.handle(ssl_socket, address)
  File "/usr/lib/python2.7/dist-packages/socketio/server.py", line 124, in handle
    handler.handle()
  File "/usr/local/lib/python2.7/dist-packages/gevent-1.1rc3-py2.7-linux-x86_64.egg/gevent/pywsgi.py", line 418, in handle
    result = self.handle_one_request()
  File "/usr/local/lib/python2.7/dist-packages/gevent-1.1rc3-py2.7-linux-x86_64.egg/gevent/pywsgi.py", line 633, in handle_one_request
    self.handle_one_response()
  File "/usr/lib/pymodules/python2.7/ajenti/http.py", line 25, in handle_one_response
    return SocketIOHandler.handle_one_response(self)
  File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 122, in handle_one_response
    return self._do_handshake(handshake_tokens.groupdict())
  File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 64, in _do_handshake
    self.write_smart(data)
  File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 88, in write_smart
    self.write_plain_result(data)
  File "/usr/lib/python2.7/dist-packages/socketio/handler.py", line 78, in write_plain_result
    ("Content-Type", "text/plain"),
  File "/usr/local/lib/python2.7/dist-packages/gevent-1.1rc3-py2.7-linux-x86_64.egg/gevent/pywsgi.py", line 748, in start_response
    raise UnicodeError("The value must be a native string", header, value)
UnicodeError: ('The value must be a native string', 'Access-Control-Max-Age', 3600)
<Greenlet at 0x7f9cb3174730: _close_when_done(<socket at 0x7f9cb3048110 fileno=[Errno 9] Bad fil, ('', 65229))> failed with UnicodeError

@pwnz22
Copy link

pwnz22 commented Feb 15, 2016

I have the same issue. The service start, but the website don't load ... help me pls

debug list:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
result = self._run(_self.args, *_self.kwargs)
File "/usr/lib/python2.7/dist-packages/gevent/server.py", line 102, in wrap_socket_and_handle
ssl_socket = self.wrap_socket(client_socket, **self.ssl_args)
File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 382, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 84, in init
ctx = SSLContext(ssl_version)
NameError: global name 'SSLContext' is not defined
<Greenlet at 0x7f73a9f10eb0: <bound method SocketIOServer.wrap_socket_and_handle of <SocketIOServer at 0x7f73a93e5190 fileno=6 address=0.0.0.0:8000>>(<socket at 0x7f73a9570390 fileno=12 sock=192.168.0, ('91.231.255.246', 58513))> failed with NameError

@Xefir
Copy link

Xefir commented Feb 15, 2016

@pwnz22 Please read above.

Install a particular version of gevent (1.1b3 or 1.1b4) and it'll run :

sudo easy_install -U gevent==1.1b4

@pwnz22
Copy link

pwnz22 commented Feb 15, 2016

Processing gevent-1.1b4.tar.gz Writing /tmp/easy_install-e8GQHU/gevent-1.1b4/setup.cfg Running gevent-1.1b4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-e8GQHU/gevent-1.1b4/egg-dist-tmp-HLefc1 Running '(cd "/tmp/easy_install-e8GQHU/gevent-1.1b4/libev" && /bin/sh ./configure && mv config.h "$OLDPWD") > configure-output.txt' in /tmp/easy_install-e8GQHU/gevent-1.1b4/build/temp.linux-x86_64-2.7/libev ./configure: line 2684: printf: write error: Broken pipe configure: error: in/tmp/easy_install-e8GQHU/gevent-1.1b4/libev':
configure: error: no acceptable C compiler found in $PATH
See config.log' for more details Traceback (most recent call last): File "/usr/bin/easy_install", line 9, in <module> load_entry_point('setuptools==5.5.1', 'console_scripts', 'easy_install')() File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2199, in main lambda: setup( File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2185, in with_ei_usage return f() File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 2202, in <lambda> distclass=DistributionWithoutHelpCommands, **kw File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 393, in run self.easy_install(spec, not self.no_deps) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 636, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 666, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 856, in install_eggs return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1078, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1063, in run_setup run_setup(setup_script, args) File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 68, in run_setup DirectorySandbox(setup_dir).run(runner) File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 114, in run return func() File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 67, in runner _execfile(setup_script, ns) File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 43, in _execfile exec(code, globals, locals) File "/tmp/easy_install-e8GQHU/gevent-1.1b4/setup.py", line 408, in <module> File "/tmp/easy_install-e8GQHU/gevent-1.1b4/setup.py", line 396, in run_setup File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 161, in run cmd = self.call_command('install_lib', warn_dir=0) File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 147, in call_command self.run_command(cmdname) File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/install_lib.py", line 22, in run self.build() File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build self.run_command('build_ext') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/distutils/command/build_ext.py", line 337, in run self.build_extensions() File "/usr/lib/python2.7/distutils/command/build_ext.py", line 446, in build_extensions self.build_extension(ext) File "/tmp/easy_install-e8GQHU/gevent-1.1b4/setup.py", line 259, in build_extension File "/tmp/easy_install-e8GQHU/gevent-1.1b4/setup.py", line 256, in gevent_prepare File "/tmp/easy_install-e8GQHU/gevent-1.1b4/setup.py", line 162, in configure_libev File "/tmp/easy_install-e8GQHU/gevent-1.1b4/setup.py", line 138, in _system File "/usr/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '(cd "/tmp/easy_install-e8GQHU/gevent-1.1b4/libev" && /bin/sh ./configure && mv config.h "$OLDPWD") > configure-output.txt' returned non-zero exit status 1
I got new errors with this command)

@Xefir
Copy link

Xefir commented Feb 15, 2016

First things first : Could you use the full code syntax of github ? It's unreadable this way.

And, do you install the python-dev package (via aptitude) ?
It's required to build a custom gevent installation.

Install it and try again :)

@pwnz22
Copy link

pwnz22 commented Feb 15, 2016

Yes, i installed python-dev. Now tried again, getting the same error(( i have no idea what's that.

@Xefir
Copy link

Xefir commented Feb 15, 2016

Oh I know.

You have to install the build-essential package to have the required compilers to achieve the task.

Sorry, i totally forgot this detail x)

@pwnz22
Copy link

pwnz22 commented Feb 15, 2016

Thank you so much man) it's working. :)))

@Dont-ask-for-it
Copy link

Dont-ask-for-it commented Oct 18, 2016

Has this been corrected? Do we need to do this command (sudo easy_install -U gevent==1.1b4)?

@Xefir
Copy link

Xefir commented Oct 18, 2016

No and yes

@Dont-ask-for-it
Copy link

@Xefir ?

@Dont-ask-for-it
Copy link

Dont-ask-for-it commented Oct 18, 2016

I installed build-essential (apt-get install build-essential) since I used the automatic install. But still I have his error when trying to install gevent==1.1b4.

easy_install: command not found

@Xefir
Copy link

Xefir commented Oct 19, 2016

Install the python-setuptools package to have this command

@Dont-ask-for-it
Copy link

I did install python and python tools. Here's what I have now:
root@localhost:# easy_install -U gevent==1.1b4
Searching for gevent==1.1b4
Reading https://pypi.python.org/simple/gevent/
Best match: gevent 1.1b4
Downloading https://pypi.python.org/packages/61/dc/9b5e55433a259823e2aedfbc5e09c36f45a52de1c906be958ee712c4bb6c/gevent-1.1b4.tar.gz#md5=1faddf3de98201793268bf62f9afa103
Processing gevent-1.1b4.tar.gz
Writing /tmp/easy_install-2An1Zy/gevent-1.1b4/setup.cfg
Running gevent-1.1b4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-2An1Zy/gevent-1.1b4/egg-dist-tmp-q3KG3E
Running '(cd "/tmp/easy_install-2An1Zy/gevent-1.1b4/libev" && /bin/sh ./configure && mv config.h "$OLDPWD") > configure-output.txt' in /tmp/easy_install-2An1Zy/gevent-1.1b4/build/temp.linux-x86_64-2.7/libev
gevent/gevent.corecext.c:9:22: fatal error: pyconfig.h: No such file or directory
#include "pyconfig.h"
^
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
root@localhost:
#

@Xefir
Copy link

Xefir commented Oct 21, 2016

Install python-dev. Please read the previous responses, all your problems has already been covered before in this issue.

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

4 participants