I get this error while trying to run a job in hudson here is the log
Started by user anonymous
[workspace] $ /bin/bash -x /tmp/hudson3189813701500418318.sh
+ date
Thu Feb 19 17:02:03 EST 2015
+ fab -f /FABRIC/FABFILESv1/deploy_ansiblev1.py -H 192.168.23.151 deploy_ansible
/usr/lib64/python2.6/getpass.py:83: GetPassWarning: Can not control echo on the terminal.
passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.
[192.168.23.151] Login password for 'root': [192.168.23.151] Executing task 'deploy_ansible'
[192.168.23.151] run: cd /ANSIBLE/ANSIBLEv1/PLAYBOOKSv1
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/fabric/main.py", line 743, in main
*args, **kwargs
File "/usr/lib/python2.6/site-packages/fabric/tasks.py", line 384, in execute
multiprocessing
File "/usr/lib/python2.6/site-packages/fabric/tasks.py", line 274, in _execute
return task.run(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/fabric/tasks.py", line 174, in run
return self.wrapped(*args, **kwargs)
File "/FABRIC/FABFILESv1/deploy_ansiblev1.py", line 7, in deploy_ansible
run('cd /ANSIBLE/ANSIBLEv1/PLAYBOOKSv1')
File "/usr/lib/python2.6/site-packages/fabric/network.py", line 647, in host_prompting_wrapper
return func(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/fabric/operations.py", line 1054, in run
shell_escape=shell_escape)
File "/usr/lib/python2.6/site-packages/fabric/operations.py", line 921, in _run_command
channel=default_channel(), command=wrapped_command, pty=pty,
File "/usr/lib/python2.6/site-packages/fabric/state.py", line 397, in default_channel
chan = _open_session()
File "/usr/lib/python2.6/site-packages/fabric/state.py", line 389, in _open_session
return connections[env.host_string].get_transport().open_session()
File "/usr/lib/python2.6/site-packages/fabric/network.py", line 159, in __getitem__
self.connect(key)
File "/usr/lib/python2.6/site-packages/fabric/network.py", line 151, in connect
user, host, port, cache=self, seek_gateway=seek_gateway)
File "/usr/lib/python2.6/site-packages/fabric/network.py", line 531, in connect
password = prompt_for_password(text)
File "/usr/lib/python2.6/site-packages/fabric/network.py", line 612, in prompt_for_password
new_password = _password_prompt(password_prompt, stream)
File "/usr/lib/python2.6/site-packages/fabric/network.py", line 584, in _password_prompt
return getpass.getpass(prompt.encode('ascii', 'ignore'), stream)
File "/usr/lib64/python2.6/getpass.py", line 83, in unix_getpass
passwd = fallback_getpass(prompt, stream)
File "/usr/lib64/python2.6/getpass.py", line 118, in fallback_getpass
return _raw_input(prompt, stream)
File "/usr/lib64/python2.6/getpass.py", line 135, in _raw_input
raise EOFError
EOFError
Finished: FAILURE
now the same command runs fine via CLI
[root@bbhudson ~]# fab -f /FABRIC/FABFILESv1/deploy_ansiblev1.py -H 192.168.23.151 deploy_ansible
[192.168.23.151] Executing task 'deploy_ansible'
[192.168.23.151] run: cd /ANSIBLE/ANSIBLEv1/PLAYBOOKSv1
[192.168.23.151] run: ansible-playbook -i /ANSIBLE/ANSIBLEv1/PLAYBOOKSv1/hosts /ANSIBLE/ANSIBLEv1/PLAYBOOKSv1/stg-servers.yml
[192.168.23.151] out: [WARNING]: The version of gmp you have installed has a known issue regarding
[192.168.23.151] out: timing vulnerabilities when used with pycrypto. If possible, you should update
[192.168.23.151] out: it (i.e. yum update gmp).
[192.168.23.151] out:
[192.168.23.151] out:
[192.168.23.151] out: PLAY [stg-servers] ************************************************************
[192.168.23.151] out:
[192.168.23.151] out: GATHERING FACTS ***************************************************************
[192.168.23.151] out: ok: [192.168.23.77]
[192.168.23.151] out:
...
...
What is causing this? I have already restarted server and didn't help.
Thanks
ADDED:
Just realized hudson jobs runs as hudson user So what do i do to fix this? The job need root user to run...the SSH authentication is needed in the job to run
See below
[root@bbhudson ~]# ps aux | grep hudson
root 1134 0.0 0.1 108436 1160 ? S Feb19 0:00 /bin/sh /etc/rc3.d/S50hudson start
root 1136 0.0 0.1 131176 1420 ? S Feb19 0:00 runuser -s /bin/bash hudson -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/bin/java -Djava.awt.headless=true -DHUDSON_HOME=/var/lib/hudson -jar /usr/lib/hudson/hudson.war --logfile=/var/log/hudson/hudson.log --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20
hudson 1149 0.0 0.1 106060 1324 ? Ss Feb19 0:00 bash -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/bin/java -Djava.awt.headless=true -DHUDSON_HOME=/var/lib/hudson -jar /usr/lib/hudson/hudson.war --logfile=/var/log/hudson/hudson.log --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20
hudson 1150 0.1 16.6 1117940 169604 ? Sl Feb19 1:20 /usr/bin/java -Djava.awt.headless=true -DHUDSON_HOME=/var/lib/hudson -jar /usr/lib/hudson/hudson.war --logfile=/var/log/hudson/hudson.log --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20
root 11133 0.0 0.0 103244 868 pts/0 S+ 11:33 0:00 grep hudson