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

installer #53

Closed
mcdl opened this issue Feb 6, 2012 · 14 comments
Closed

installer #53

mcdl opened this issue Feb 6, 2012 · 14 comments

Comments

@mcdl
Copy link

mcdl commented Feb 6, 2012

I get a lot of errors on the install for CentOS 5.7 (64 bit)

curl install.amon.cx | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 833 100 833 0 0 6088 0 --:--:-- --:--:-- --:--:-- 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5381 100 5381 0 0 64613 0 --:--:-- --:--:-- --:--:-- 243k
--2012-02-06 08:20:31-- http://install.amon.cx/amon-0.7.tar.gz
Resolving install.amon.cx... 178.236.6.68
Connecting to install.amon.cx|178.236.6.68|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 212306 (207K) [application/x-tar]
Saving to: `amon-0.7.tar.gz'

100%[==================================================================================>] 212,306 --.-K/s in 0.1s

2012-02-06 08:20:31 (1.85 MB/s) - `amon-0.7.tar.gz' saved [212306/212306]

File "build/bdist.linux-x86_64/egg/amon/api/models.py", line 27
other_type = 'logs' if type == 'exceptions' else 'exceptions'
^
SyntaxError: invalid syntax
File "build/bdist.linux-x86_64/egg/amon/system/_linux.py", line 14
with open('/proc/meminfo', 'r') as lines:
^
SyntaxError: invalid syntax
File "build/bdist.linux-x86_64/egg/amon/backends/mongodb.py", line 10
class MongoBackend():
^
SyntaxError: invalid syntax
File "build/bdist.linux-x86_64/egg/amon/web/views/api.py", line 9
content_type = content_type_dict[0] if len(content_type_dict) > 0 else ''
^
SyntaxError: invalid syntax
File "build/bdist.linux-x86_64/egg/amon/web/models.py", line 20
page = 1 if page == None else int(page)
^
SyntaxError: invalid syntax
File "build/bdist.linux-x86_64/egg/amon/web/template.py", line 115
variable = float(variable) if not isinstance(variable, float) else variable
^
SyntaxError: invalid syntax
File "/usr/lib/python2.4/site-packages/amon-0.7.0-py2.4.egg/amon/api/models.py", line 27
other_type = 'logs' if type == 'exceptions' else 'exceptions'
^
SyntaxError: invalid syntax
File "/usr/lib/python2.4/site-packages/amon-0.7.0-py2.4.egg/amon/system/_linux.py", line 14
with open('/proc/meminfo', 'r') as lines:
^
SyntaxError: invalid syntax
File "/usr/lib/python2.4/site-packages/amon-0.7.0-py2.4.egg/amon/backends/mongodb.py", line 10
class MongoBackend():
^
SyntaxError: invalid syntax
File "/usr/lib/python2.4/site-packages/amon-0.7.0-py2.4.egg/amon/web/models.py", line 20
page = 1 if page == None else int(page)
^
SyntaxError: invalid syntax
File "/usr/lib/python2.4/site-packages/amon-0.7.0-py2.4.egg/amon/web/template.py", line 115
variable = float(variable) if not isinstance(variable, float) else variable
^
SyntaxError: invalid syntax
File "/usr/lib/python2.4/site-packages/amon-0.7.0-py2.4.egg/amon/web/views/api.py", line 9
content_type = content_type_dict[0] if len(content_type_dict) > 0 else ''
^
SyntaxError: invalid syntax
File "generate_config.py", line 31
with open(generated_config_path,'w+') as f:
^
SyntaxError: invalid syntax

@martinrusev
Copy link
Member

Hi, the problem is the Python version in your OS. Amon works only on Python 2.6+
Can you please take a look at https://github.com/martinrusev/amon/issues/49

@mcdl
Copy link
Author

mcdl commented Feb 6, 2012

I followed that and installed and switched to python 2.7.2; I now get this error:

Using /usr/lib/python2.4/site-packages/pymongo-2.1.1-py2.4-linux-x86_64.egg
Finished processing dependencies for amon==0.7.0
File "generate_config.py", line 31
with open(generated_config_path,'w+') as f:
^
SyntaxError: invalid syntax

@martinrusev
Copy link
Member

I will write a small tutorial about this issue today. Really sorry for your troubles.

@mcdl
Copy link
Author

mcdl commented Feb 6, 2012

Ok thanks and it's no problem I'm just keen on using it as it looks great! Please update this with a link to the tutorial thanks!

@mcdl
Copy link
Author

mcdl commented Feb 7, 2012

Any news?

@martinrusev
Copy link
Member

I wanted to create a one- liner, but as it seems - its more work ( bash installers are always more work ), than I originally expected. I can give you some instructions in the meantime:

  1. I created a small gist for installing a more recent python version. Pasting that in the terminal will
    install python 2.7.2 in /opt/python2.7
curl https://raw.github.com/gist/1751958/dfb82f043f3040f60952b634735cd4367a61862a/gistfile1.sh | bash

This step will take some time

2/ http://amon.cx/guide/install/, but instead of

sudo python setup.py install
sudo python2.7 setup install

3/ Final step change #!/usr/bin/python in /etc/init.d/amon and /etc/initd/amond to #!/usr/bin/python2.7

@mcdl
Copy link
Author

mcdl commented Feb 7, 2012

I installed it all and got to starting the daemon but it said it wasn't installed.

I ran sudo python2.7 setup.py install and saw that it stops at

Best match: tornado 2.2
Downloading https://github.com/downloads/facebook/tornado/tornado-2.2.tar.gz
error: Download error for https://github.com/downloads/facebook/tornado/tornado-2.2.tar.gz: unknown url type: https

@martinrusev
Copy link
Member

Can you try the following

sudo easy_install2.7 yolk
/opt/python2.7/bin/yolk -l

And tell me the results

@mcdl
Copy link
Author

mcdl commented Feb 7, 2012

Python - 2.7.2 - active development (/opt/python2.7/lib/python2.7/lib-dynload)
setuptools - 0.6c11 - active
wsgiref - 0.1.2 - active development (/opt/python2.7/lib/python2.7)
yolk - 0.4.3 - active

@martinrusev
Copy link
Member

That means, it didn't installed anything :)

That's what the list should look like after installing amon

/opt/python2.7/bin/yolk -l
FormEncode - 1.2.4 - active
Jinja2 - 2.6 - active
Python - 2.7.2 - active development (/opt/python2.7/lib/python2.7/lib-dynload)
amon - 0.7.0 - active
pip - 1.0.2 - active
pymongo - 2.1.1 - active
setuptools - 0.6c11 - active
tornado - 2.2 - active
virtualenv - 1.7 - active
wsgiref - 0.1.2 - active development (/opt/python2.7/lib/python2.7)
yolk - 0.4.2 - active

Can you try installing only tornado and tell me what happens

sudo easy_install2.7 tornado

@mcdl
Copy link
Author

mcdl commented Feb 7, 2012

Keep getting https error

Searching for tornado
Reading http://pypi.python.org/simple/tornado/
Reading http://www.tornadoweb.org/
Best match: tornado 2.2
Downloading http://github.com/downloads/facebook/tornado/tornado-2.2.tar.gz
error: Download error for http://github.com/downloads/facebook/tornado/tornado-2.2.tar.gz: unknown url type: https

@martinrusev
Copy link
Member

It looks that Python can't find SSL, and without it the https addresses don't work. Can you please try:

http://stackoverflow.com/a/2598936/32091

Or if that sounds easier, you can download tornado and install it manually, all the other packages don't require secure connection

@mcdl
Copy link
Author

mcdl commented Feb 7, 2012

I did that and tornado installed fine using

sudo easy_install2.7 tornado

But I run python2.7 setup.py install and it gets stuck on tornado again with https error.

/opt/python2.7/bin/yolk -l now outputs:

Python - 2.7.2 - active development (/opt/python2.7/lib/python2.7/lib-dynload)
setuptools - 0.6c11 - active
tornado - 2.2 - active
wsgiref - 0.1.2 - active development (/opt/python2.7/lib/python2.7)
yolk - 0.4.3 - active

@martinrusev
Copy link
Member

I expected that it will stop searching, when it founds that tornado is already installed and is the most recent version.
The next step is to remove the tornado line in amon/setup.py, because you already have it

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

2 participants