(Migrated) load balancer start up fails

(This message has been automatically imported from the retired mailing list)

Now I am trying to setup zato on my VPS which has Ubuntu 12.04.

Here is the output from zato.agent.load_balancer.main

py -m zato.agent.load_balancer.main load-balancer/config/repo
2013-11-30 20:00:42,510 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_add_remove_server of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [add_remove_server]
2013-11-30 20:00:42,510 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_execute_command of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [execute_command]
2013-11-30 20:00:42,511 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_config of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_config]
2013-11-30 20:00:42,511 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_config_source_code of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_config_source_code]
2013-11-30 20:00:42,512 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_server_data_dict of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_server_data_dict]
2013-11-30 20:00:42,512 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_servers_state of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_servers_state]
2013-11-30 20:00:42,512 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_uptime_info of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_uptime_info]
2013-11-30 20:00:42,513 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_work_config of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_work_config]
2013-11-30 20:00:42,513 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_haproxy_version_info of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [haproxy_version_info]
2013-11-30 20:00:42,513 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_is_haproxy_alive of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [is_haproxy_alive]
2013-11-30 20:00:42,513 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_ping of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [ping]
2013-11-30 20:00:42,514 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_rename_server of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [rename_server]
2013-11-30 20:00:42,514 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_validate_save of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [validate_save]
2013-11-30 20:00:42,514 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_validate_save_source_code of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [validate_save_source_code]
Traceback (most recent call last):
File “/home/navjeetc/zato-bin/zato-1.1/bin/py”, line 101, in
_val, {}, “main”, alter_sys=True)
File “/usr/lib/python2.7/runpy.py”, line 176, in run_module
fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File
"/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/main.py",
line 19, in
lba.start_load_balancer()
File
"/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/server.py",
line 114, in start_load_balancer
self._re_start_load_balancer(“HAProxy didn’t start in [{}] seconds. “,
'Failed to start HAProxy. ')
File
”/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/server.py”,
line 109, in _re_start_load_balancer
self._popen(command, 5.0, timeout_msg, rc_non_zero_msg)
File
"/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/server.py",
line 86, in _popen
p = Popen(command, stdout=PIPE, stderr=PIPE)
File “/usr/lib/python2.7/subprocess.py”, line 679, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Also I noticed that although haproxy is installed I cannot start the
service.

Navjeet

Just fixed this problem. haproxy was not in the path. Updated the path to
include /usr/sbin and things are fine now.

Navjeet
GooglePlus: https://plus.google.com/u/0/113548947815611089354
LinkedIn: http://www.linkedin.com/in/navjeetc
Blog: http://chabbewal.blogspot.com
Twitter: http://twitter.com/navjeetc

On Sat, Nov 30, 2013 at 3:08 PM, Navjeet navjeetc@gmail.com wrote:

Now I am trying to setup zato on my VPS which has Ubuntu 12.04.

Here is the output from zato.agent.load_balancer.main

py -m zato.agent.load_balancer.main load-balancer/config/repo
2013-11-30 20:00:42,510 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_add_remove_server of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [add_remove_server]
2013-11-30 20:00:42,510 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_execute_command of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [execute_command]
2013-11-30 20:00:42,511 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_config of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_config]
2013-11-30 20:00:42,511 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_config_source_code of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_config_source_code]
2013-11-30 20:00:42,512 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_server_data_dict of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_server_data_dict]
2013-11-30 20:00:42,512 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_servers_state of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_servers_state]
2013-11-30 20:00:42,512 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_uptime_info of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_uptime_info]
2013-11-30 20:00:42,513 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_get_work_config of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [get_work_config]
2013-11-30 20:00:42,513 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_haproxy_version_info of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [haproxy_version_info]
2013-11-30 20:00:42,513 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_is_haproxy_alive of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [is_haproxy_alive]
2013-11-30 20:00:42,513 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_ping of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [ping]
2013-11-30 20:00:42,514 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_rename_server of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [rename_server]
2013-11-30 20:00:42,514 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_validate_save of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [validate_save]
2013-11-30 20:00:42,514 - INFO - 12821:MainThread - root:140 - Registering
[<bound method LoadBalancerAgent._lb_agent_validate_save_source_code of
<zato.agent.load_balancer.server.LoadBalancerAgent object at 0x9b22f8c>>]
under public name [validate_save_source_code]
Traceback (most recent call last):
File “/home/navjeetc/zato-bin/zato-1.1/bin/py”, line 101, in
_val, {}, “main”, alter_sys=True)
File “/usr/lib/python2.7/runpy.py”, line 176, in run_module
fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File
"/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/main.py",
line 19, in
lba.start_load_balancer()
File
"/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/server.py",
line 114, in start_load_balancer
self._re_start_load_balancer(“HAProxy didn’t start in [{}] seconds. “,
'Failed to start HAProxy. ')
File
”/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/server.py”,
line 109, in _re_start_load_balancer
self._popen(command, 5.0, timeout_msg, rc_non_zero_msg)
File
"/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/server.py",
line 86, in _popen
p = Popen(command, stdout=PIPE, stderr=PIPE)
File “/usr/lib/python2.7/subprocess.py”, line 679, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Also I noticed that although haproxy is installed I cannot start the
service.

Navjeet

On 11/30/2013 09:08 PM, Navjeet wrote:

self._re_start_load_balancer("HAProxy didn't start in [{}] seconds. ",

'Failed to start HAProxy. ')
File
"/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/server.py",
line 109, in _re_start_load_balancer
self._popen(command, 5.0, timeout_msg, rc_non_zero_msg)
File
"/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/server.py",
line 86, in _popen
p = Popen(command, stdout=PIPE, stderr=PIPE)
File “/usr/lib/python2.7/subprocess.py”, line 679, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Hi Navjeet,

can you please send the contents of load-balancer/config/repo/lb-agent.conf?

thanks,

On 11/30/2013 09:08 PM, Navjeet wrote:

self._re_start_load_balancer("HAProxy didn't start in [{}] seconds. ",

'Failed to start HAProxy. ')
File
"/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/server.py",
line 109, in _re_start_load_balancer
self._popen(command, 5.0, timeout_msg, rc_non_zero_msg)
File
"/home/navjeetc/zato-bin/zato-1.1/zato-agent/src/zato/agent/load_balancer/server.py",
line 86, in _popen
p = Popen(command, stdout=PIPE, stderr=PIPE)
File “/usr/lib/python2.7/subprocess.py”, line 679, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Hi Navjeet,

can you please send the contents of load-balancer/config/repo/lb-agent.conf?

thanks,

On 11/30/2013 09:28 PM, Navjeet wrote:

Just fixed this problem. haproxy was not in the path. Updated the path to
include /usr/sbin and things are fine now.

Hm, what user account was it in the end that /usr/sbin wasn’t on its path?

On 12/01/2013 02:52 PM, Navjeet Chabbewal wrote:

The user account for zato1 user which I created using “adduser” command with default options.

OK, I can see a regular user’s PATH is

PATH=’/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games’

I’ll make the installer symlink /usr/sbin/haproxy to /usr/local/bin so
this works out of the box.

thanks again,