Python utils.install missing in the install script when trying to run agent on el6 based distro

120 views
Skip to first unread message

David Nedvěd

unread,
May 29, 2014, 6:04:19 AM5/29/14
to vfe...@googlegroups.com
Hi team,
Like the subject suggests python is throwing the following error when trying to run:

./install --username='admin' --password='xxxx' --serverhostname='xxxx.local' --customer='xxxx'

On a EL6 Distro....

Traceback (most recent call last):
  File "./install", line 1464, in <module>
    utils.install(args)
AttributeError: 'NoneType' object has no attribute 'install'

I've tried both the official agent install for el6 x86_64 -- v0.7.2 as well as the agent_utils in the v0.8.0 tag (toppatch/vFenseAgent-nix git repo).

Has anyone else experienced / fixed this issue? - I'm running Python 2.6.8

Cheers,

Humberto Chacon

unread,
May 29, 2014, 10:06:51 AM5/29/14
to vfe...@googlegroups.com
Hello there David,

can you tell us the full name of the distro you're running?

David Nedvěd

unread,
May 29, 2014, 11:08:47 AM5/29/14
to vfe...@googlegroups.com
I'm running "Amazon Linux 2014.03" on EC2 - which is rebuilt CentOS 6.4/6.5 on Linux 3.x

Linux 3.10.35-43.137.amzn1.x86_64 #1 SMP Wed Apr 2 09:36:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Humberto Chacon

unread,
May 29, 2014, 11:42:29 AM5/29/14
to vfe...@googlegroups.com
The problem arising from the install script is that we don't officially support that distribution, as we've not tested on it.

***The following does not insure that the agent will work on the distribution.***

What you can do is first open up python and do the following:

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

and copy what is returned from that last command.

Then open up the install script, and go to line 62 where you will see:

RPM_DISTROS = [
    'fedora',
    'centos',
    'centos linux',
    'redhat',
    'red hat enterprise linux server'
]

and add what you copied from the platform command to this list, like so:

RPM_DISTROS = [
    'fedora',
    'centos',
    'centos linux',
    'redhat',
    'red hat enterprise linux server',
'what you copied, here'
]

Do not forget the comma after 'red hat enterprise linux server'.

Humberto Chacon

unread,
May 29, 2014, 11:48:35 AM5/29/14
to vfe...@googlegroups.com
Also, slipped my mind, you have to modify rvplugin.py in 'agent/plugins/rv/rvplugin.py'.

After you've done the previous steps open up rvplugin.py and go to line 467 where you will see:

_rpm_distros = ['fedora', 'centos', 'centos linux']

as you guessed, insert what you copied into this list as well like so:

_rpm_distros = ['fedora', 'centos', 'centos linux', 'what was copied']

David Nedvěd

unread,
May 29, 2014, 6:28:53 PM5/29/14
to vfe...@googlegroups.com
Thank's Humberto,
Got it installed - I'm now seeing the following in /opt/TopPatch/agent/logs/agent.log

ERROR : 05/30/2014 08:21:39 AM : Error while processing operation: {'core_data': {'system_info': {'os_code': 'linux', 'version': '3.2.34-55.46.amzn1.x86_64', 'bit_type': '64', 'host_name': '', 'computer_name': 'xxxx.local', 'os_string': ' '}}, 'reboot_delay_seconds': 90, 'plugin': u'', 'type': u'new_agent', 'raw_result': '', 'raw_operation': '{"operation_id": "02a82cef-bdaf-4e7b-8ec5-ec9f251d3d17-agent", "operation": "new_agent", "plugin": ""}', 'json_message': {u'operation_id': u'02a82cef-bdaf-4e7b-8ec5-ec9f251d3d17-agent', u'operation': u'new_agent', u'plugin': u''}, 'request_method': '', 'urn_response': '', 'error': '', 'data': [], 'id': u'02a82cef-bdaf-4e7b-8ec5-ec9f251d3d17-agent', 'shutdown_delay_seconds': 90, 'plugin_data': {}}
 
ERROR : 05/30/2014 08:21:39 AM : Exception: [Errno 2] No such file or directory
 
DEBUG : 05/30/2014 08:21:39 AM : Traceback (most recent call last):
  File "/opt/TopPatch/agent/src/serveroperation/operationmanager.py", line 139, in process_operation
    operation_methods[operation.type](operation)
  File "/opt/TopPatch/agent/src/serveroperation/operationmanager.py", line 167, in new_agent_op
    operation = self._initial_data(operation)
  File "/opt/TopPatch/agent/src/serveroperation/operationmanager.py", line 280, in _initial_data
    operation.core_data[OperationValue.HardwareInfo] = self.hardware_info()
  File "/opt/TopPatch/agent/src/serveroperation/operationmanager.py", line 596, in hardware_info
    hardware_info = systeminfo.hardware()
  File "/opt/TopPatch/agent/src/utils/systeminfo.py", line 116, in hardware
    return utils.hardware.get_hw_info()
  File "/opt/TopPatch/agent/src/utils/hardware.py", line 22, in get_hw_info
    hw_info['display'] = DisplayInfo().get_display_list()
  File "/opt/TopPatch/agent/src/utils/hardware.py", line 309, in get_display_list
    raw_output = self._get_pci_device_info()
  File "/opt/TopPatch/agent/src/utils/hardware.py", line 236, in _get_pci_device_info
    process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/opt/TopPatch/agent/deps/rpm6/Python-2.7.5/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/opt/TopPatch/agent/deps/rpm6/Python-2.7.5/lib/python2.7/subprocess.py", line 1308, in _execute_child
    raise child_exception
 
OSError: [Errno 2] No such file or directory

Is this a simple fix?
platform.linux_distribution()[0].lower() returned '' so I've inserted two empty strings in the _rpm_distros & RPM_DISTROS Of each file.

Humberto Chacon

unread,
May 29, 2014, 8:13:03 PM5/29/14
to vfe...@googlegroups.com
Yikes, empty string isn't necessarily the most helpful thing that command could've returned.

Try these three commands and let me know what they return, please:

>>> import platform
>>> platform.dist()
>>> platform.system()
>>> platform.linux_distribution()


After that, could you verify if 'lspci' is installed on that system?

Lakshmynarayanan V

unread,
Nov 17, 2014, 2:38:50 PM11/17/14
to vfe...@googlegroups.com
Hello,

I have tried installing the vFense agent in a Centos server with Cloud linux kernel installed. I got these errors but modifying the install script did not fix it. So I edited /etc/redhat-release and changed CloudLinux Server release 6.6 to Centos 6.6, which allowed me to complete the installation.

But the agent is not showing up in the vFense server. The following errors appear in "rvweb_file.log".

~~~
rvweb - ERROR - 404 PUT /rvl/v1/0efdf342-e8bb-4cec-936a-ba3e231f8e83/rv/results/install/apps/os
~~~

Could someone help me?

Allen Sanabria

unread,
Nov 17, 2014, 3:43:37 PM11/17/14
to
Can you please check rvapi_file.log. Also 
python
>>>from vFense.db.client import *
>>>conn = db_connect()
>>>list(r.table('agents').run(conn))


What does it return?

Lakshmynarayanan V

unread,
Nov 17, 2014, 5:57:38 PM11/17/14
to Allen Sanabria, vfe...@googlegroups.com
Hello Allen,

Please see the log entries below:

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/vFense/plugins/patching/_db.py", line 95, in fetch_app_data
    .run(conn)
  File "/usr/local/lib/python2.7/dist-packages/rethinkdb/ast.py", line 95, in run
    return c._start(self, **global_optargs)
  File "/usr/local/lib/python2.7/dist-packages/rethinkdb/net.py", line 238, in _start
    return self._send_query(query, global_optargs)
  File "/usr/local/lib/python2.7/dist-packages/rethinkdb/net.py", line 339, in _send_query
    self._check_error_response(response, query.term)
  File "/usr/local/lib/python2.7/dist-packages/rethinkdb/net.py", line 312, in _check_error_response
    raise RqlRuntimeError(message, term, frames)
RqlRuntimeError: Cannot perform merge on a non-object non-sequence `null`. in:
r.table('unique_applications').get(u'').merge(lambda var_2830: r.expr({'release_date': r.row['release_date'].to_epoch_time()}))
------------


On Tue, Nov 18, 2014 at 2:13 AM, Allen Sanabria <asan...@linuxdynasty.org> wrote:
Can you please check rvapi_file.log. Also 
python
>>>from vFense.db.clientimport *

>>>conn = db_connect()
>>>list(r.table('agents').run(conn))


What does it return?

On Monday, November 17, 2014 2:38:50 PM UTC-5, Lakshmynarayanan V wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "vFense" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vfense/WwIiQS9U08U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vfense+un...@googlegroups.com.
To post to this group, send email to vfe...@googlegroups.com.
Visit this group at http://groups.google.com/group/vfense.
To view this discussion on the web visit https://groups.google.com/d/msgid/vfense/d2878d82-3a6a-4a85-9c03-5fb9f550a230%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Regards,
Lakshmynarayanan V
Reply all
Reply to author
Forward
0 new messages