Nimclient command failed - aix

Below error is observed for nimclient command.
# nimclient -l -l `hostname -s`
<hostname>: Connection timed out
0042-006 nimclient: (To_Master) rcmd Connection timed out
Any resolution for this issue?

Related

Packer error - sudo: no tty present and no askpass program specified

I'm been learning how to use Packer this week on my home lab where I have an ESXi 7 host.
I'm simply trying to deploy a Ubuntu 18.04 VM however at the end of the build I get this error in the packer console:
sudo: no tty present and no askpass program specified
This is what I have done.
Build.json
Preseed.cfg
variables.json
Command I run:
sudo packer build -var-file=variables.json build.json
In ESXi I see the VM build and complete and reboot and it gets an IP and I get a SSH prompt briefly before Packer deletes the VM after I see the above message.
This is the full error:
==> Ubuntu-18.04: Connecting to VNC over websocket...
==> Ubuntu-18.04: Waiting 10s for boot...
==> Ubuntu-18.04: Typing the boot command over VNC...
==> Ubuntu-18.04: Waiting for SSH to become available...
==> Ubuntu-18.04: Connected to SSH!
==> Ubuntu-18.04: Provisioning with shell script: /tmp/packer-shell382031289
==> Ubuntu-18.04: sudo: no tty present and no askpass program specified
==> Ubuntu-18.04: Provisioning step had errors: Running the cleanup provisioner, if present...
==> Ubuntu-18.04: Stopping virtual machine...
==> Ubuntu-18.04: Destroying virtual machine...
Build 'Ubuntu-18.04' errored after 8 minutes 21 seconds: Script exited with non-zero exit status: 1.Allowed exit codes are: [0]
==> Wait completed after 8 minutes 21 seconds
==> Some builds didn't complete successfully and had errors:
--> Ubuntu-18.04: Script exited with non-zero exit status: 1.Allowed exit codes are: [0]
==> Builds finished but no artifacts were created.
What am I doing wrong?
You need to tell sudo to read from stdin like this:
echo 'password' | sudo -S echo "I am groot"
This way your sudo command should work.

Unable to access running jupyter session over SSH

I am trying to run a jupyter notebook on remote remote machine user#remote and use it from my local machine. I did
local#host $ ssh user#remote
user#remote $ ipython notebook --no-browser --port=8889
http://localhost:8889/?token=2656c58d730bd3779be5f1b6af9356b4de7113c927c9c722
Which starts the jupyter session in remote machine. Then, on my local machine then I do
local#host $ ssh -N -L localhost:8888:localhost:8889 user#remote
when I open this(http://localhost:8888/?token=2656c58d730bd3779be5f1b6af9356b4de7113c927c9c722
), it says
local#host $ channel 2: open failed: connect failed: Connection refused

OS X cannot reinstall boot2docker : Error requesting socket: exit status 255

I reinstalled boot2docker on my OS X computer. Running boot2docker up, I get an error message:
boot2docker up
Waiting for VM and Docker daemon to start...
..............................................
ooooooooooooooooooooooooooooooooooooooooooooooooo
Started.
Trying to get Docker socket one more time
Error requesting socket: exit status 255
Auto detection of the VM's Docker socket failed.
Please run `boot2docker -v up` to diagnose.
Running verbose (boot2docker -v up), I can see all the tries:
executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o
StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o
LogLevel=quiet -p 2022 -i /Users/baboo/.ssh/id_boot2docker
docker#localhost grep tcp:// /proc/$(cat /var/run/docker.pid)/cmdline
Error requesting socket: exit status 255
I already have in my /etc/hosts:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
What's the meaning of this error and how can I solve it?
I found an issues page on GH with the same error message -- they said that they had a stray VirtualBox bootdocker vm... you can see the article here:
Link to GitHub issue
They basically deleted the Virtualbox VM and re-inited.
Hopefully that works for you.

Why rsync fails with jenkins

When rsync is used with jenkins as Execute shell Command on CentOS 6.4, it fails:
[workspace] $ /bin/sh -xe /tmp/hudson3424899639384884888.sh
+ rsync -av /var/lib/jenkins/jobs/myjob/workspace/target/classes/ myuser#myserver.com:/home/myuser/test
rsync: Failed to exec ssh: Permission denied (13)
rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.6]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(600) [sender=3.0.6]
However, it works from the command line:
su jenkins
rsync -av /var/lib/jenkins/jobs/myjob/workspace/target/classes/ myuser#myserver.com:/home/myuser/test
sending incremental file list
sent 17875 bytes received 83 bytes 3990.67 bytes/sec
total size is 1981027 speedup is 110.31
What has to be done to make it work in jenkins as well?
The problem was with SElinux installed on CentOS, which for some reason were blocking ssh for rsync.
Here is a line from /var/log/messages which says the ssh was blocked:
Jun 12 13:45:59 myserver kernel: type=1400 audit(1434109559.911:33346): avc: denied { execute } for pid=11862 comm="rsync" name="ssh" dev=dm-1 ino=11931741 scontext=unconfined_u:system_r:rsync_t:s0 tcontext=system_u:object_r:ssh_exec_t:s0 tclass=file
For now we disabled SElinux on our server, proper solution would be to create custom policy module (1)
I had a similar problem.
In my case jenkins was not executing rsync with the expected user (jenkins) but with another (jboss in my case)
adding 'whoami' to the script and using ssh verbose:
rsync -e "ssh -v" .......
helped to find the problem.
Note, that when you change (add) jenkins user to some group, permission will apply after slave (agent) restart.

invoking remote java process via ssh command

It works like charm form solaris to linux(RHEL5) but gives error when executing from RHEL5 to RHEL5
apache log error:
tcgetattr: Invalid argument
Connection to server20 closed.
it also gives this error in message log:
Jan 20 02:13:39 sj1glm013 kernel: type=1400 audit(1327054419.954:18549): avc: denied { getattr } for pid=18469 comm="sun.sh" path="/web/cgi-bin/remote"
(sun.sh is local script that cgi invokes)
I am invoking a local shell script from CGI web interface, and that shell script executes another program (script) on remote host.
code of shell script:
### it takes parameters form cgi script.
#!/bin/bash
host="$1"
str3="$2"
ssh -t -t -l user $host $str3
exit 0
any inputs..
When I had a similar problem, I just took out the -tt and that solved it.