Installing agents on Amazon Linux 2014.03

84 views
Skip to first unread message

Sergio Jurado

unread,
Jul 31, 2014, 7:24:21 AM7/31/14
to vfe...@googlegroups.com
Hello guys, I have been setup a vFense server for an Amazon AWS infraestructure.

All was fine, the vFense server is running, but I have the following problems:

- While the agent installation on Ubuntu servers was OK, I can't install it on Amazon Linux servers. I have tried to install the RPM version following this post:

https://groups.google.com/forum/#!searchin/vfense/Amazon$20Linux/vfense/WwIiQS9U08U/QAnC5EQ027MJ

But when I run the following on the python prompt:

>>> import platform
>>> platform.linux_distribution()[0].lower()

I have as ouput: ' '

So, I can't add a new OS type in the install script and the rvplugin.py

If I add ' ' in those files the agent is installed, but not connect to the server. The agent log says the following:

ERROR : 07/31/2014 11:44:11 AM : Could not check-in to server. See logs for details.
DEBUG : 07/31/2014 11:45:11 AM : Sending message to server
DEBUG : 07/31/2014 11:45:11 AM : https://xxx.xx.xxx.xx/rvl/v1//core/checkin
DEBUG : 07/31/2014 11:45:11 AM : Logging into server
DEBUG : 07/31/2014 11:45:11 AM : Login status code: 200
DEBUG : 07/31/2014 11:45:11 AM : Login server text: 
DEBUG : 07/31/2014 11:45:11 AM : Url: https://xxx.xxx.xx.xx/rvl/v1//core/checkin
DEBUG : 07/31/2014 11:45:11 AM : Status code: 404
DEBUG : 07/31/2014 11:45:11 AM : Server text: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1309, in _execute
    result = self.prepare()
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1998, in prepare
    raise HTTPError(self._status_code)
HTTPError: HTTP 404: Not Found
 
ERROR : 07/31/2014 11:45:11 AM : Unable to read data from server. Invalid JSON?
ERROR : 07/31/2014 11:45:11 AM : Exception: No JSON object could be decoded
DEBUG : 07/31/2014 11:45:11 AM : Traceback (most recent call last):
  File "/opt/TopPatch/agent/src/net/netmanager.py", line 176, in send_message
    received_data = response.json()
  File "/opt/TopPatch/agent/deps/requests/models.py", line 651, in json
    return json.loads(self.text or self.content, **kwargs)
  File "/opt/TopPatch/agent/deps/rpm6/Python-2.7.5/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/opt/TopPatch/agent/deps/rpm6/Python-2.7.5/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/TopPatch/agent/deps/rpm6/Python-2.7.5/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

ERROR : 07/31/2014 11:45:12 AM : Could not check-in to server. See logs for details.

Humberto Chacon

unread,
Aug 6, 2014, 9:57:49 PM8/6/14
to vfe...@googlegroups.com
Hey there Sergio, sorry for the late response.

Yes, unfortunately Amazon Linux doesn't say what platform it is when using the platform module for python. The only way to get the agent to work properly on Amazon Linux would be to modify the code that checks the platform (maybe just ignore what platform is returned from the python platform module call and hardcode it to go the rpm route), although I haven't taken a look at it. If you want to go this route then let me know, although, like I mentioned on the previous post you linked to, Amazon Linux is not officially supported by us as we've never tested on it.

Martin Herbert

unread,
Oct 3, 2014, 4:55:05 PM10/3/14
to vfe...@googlegroups.com
Hi Humberto,

I've managed to install the agent on Amazon Linux 2014.03 by tweaking the install script and also installing the pciutils package.  But could you let me know if there is any plans on support Amazon Linux in the future? We've just started using vFense across a huge network of AWS servers, some of which are Windows, some are Ubuntu and Debian. However we do have a number of Amazon Linux servers that may be difficult to rebuild using Ubuntu or Debian due to how there currently configured/used.

Thanks

Martin

linuxdynasty

unread,
Oct 3, 2014, 9:42:13 PM10/3/14
to vfe...@googlegroups.com
We would definitely like to support amazon linux servers in the future. On a side note can you do a pull request in the vFenseAgent-nix repository, so that we can see what you did in order to get the script working with the amazon linux servers?
Reply all
Reply to author
Forward
0 new messages