SSH Agent Plugin v1.17 with Jenkins Declaritive Pipeline not working with Windows - jenkins-plugins

I have been having issues getting my multibranch pipeline to perform git commands with an SSH key via the SSH Agent plugin on Windows.
I am able to successfully perform a git clone with the ssh from Git Bash on windows server that is running Jenkins.
In my pipeline log I am getting the following error when trying to use the sshagent plugin:
[ssh-agent] Looking for ssh-agent implementation... Could not find
ssh-agent: IOException: Cannot run program "ssh-agent": CreateProcess
error=2, The system cannot find the file specified Check if ssh-agent
is installed and in PATH [ssh-agent] FATAL: Could not find a suitable
ssh-agent provider
I have seen that installing Apache Tomcat Native libraries has helped some people, but the steps for doing so are not very descriptive.
Any help is appreciated. Thanks!

Related

SnowSQL connection test fails with "No module named 'win32timezone'"

I've just installed SnowSQL for Windows as per the instructions at https://docs.snowflake.com/en/user-guide/snowsql-install-config.html#installing-snowsql-on-microsoft-windows-using-the-installer
However, when I attempt to connect to Snowflake, it fails:
C:\>snowsql -a <account> -u <user> --authenticator externalbrowser -o log_level=DEBUG
No module named 'win32timezone'
If the error message is unclear, enable logging using -o log_level=DEBUG and see the log to find out the cause. Contact support for further help.
Goodbye!
C:\>snowsql -v
Version: 1.2.7
Any ideas appreciated
What version of windows are you using? How did you install?
No module named 'win32timezone'
Per the official documentation snowsql is a python application. The error message above is a python error indicating it cannot find the aforementioned package. However, installing that package is not likely a fix as snowsql appears to ship with a version of python. Which makes a lot of sense, dealing with python dependencies is a nightmare.
I started a Windows 2016 host in AWS and installed snowsql 1.2.7 via the MSI. I was able to get to the login screen without any problems.
I would completely remove snowsql, do a search for snowsql and delete any folders you find, then reinstall. If it's still not working I'd provide more information as requested above.
This was acknowledged as a defect by Snowflake, and they will fix it in a newer version. The workaround is to install v 1.2.5, and invoke this version from the command line
snowflake <options> -v 1.2.5

apache flink windows installation

I am trying to install flink on windows running into all sorts of problems . Please help.
Downloading the tar file from net, does not give me windows bat file options. Used the download links at https://flink.apache.org/downloads.html#apache-flink-1111. So i cannot run start-local.bat. Infact i dont even have start-local.sh . I ended up installing cygwin just so i can run start cluster bat
However running the start cluster bat is giving weird issues and exiting immediately.
$ ./start-cluster.sh
Starting cluster.
Starting standalonesession daemon on host DESKTOP**.
Starting taskexecutor daemon on host DESKTOP**.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Improperly specified VM option 'MaxMetaspaceSize=268435456
'
This is an open bug for sometime and is deferred to Flink 1.14 version.
https://issues.apache.org/jira/browse/FLINK-18438
https://issues.apache.org/jira/browse/FLINK-18792

Tosca and Jenkins

Does anybody work with Tosca and Jenkins?
I have problems to run my batch script from Jenkins. It does not open browser, but job is finished successfully. Batch script runs normally when I try to run in on Windows, without Jenkins.
Anybody has an experience using these two tools together?
In order to use Tosca CI with Jenkins you need to:
Configure your Jenkins build project
Add an additional build step (Execute Windows batch command)
Call ToscaCIClient.exe/ToscaCIClient.jar with parameters
e.g. "PathToTosca\ToscaCI\Client\ToscaCIClient.exe" -t junit -r PathToResults\result.xml
Further information can be found here: https://support.tricentis.com/community/article.do?number=KB0012411
The issue your facing is because your running Jenkins as windows service, in this case headless execution happens technically your script is executed for other user account.
Solution
Instead of installing Jenkins host it on Apache Tomcat server
Download Jenkins war file
Copy it inside webapps folder of Tomcat
Run startup.bat
Refer-
https://www.tutorialspoint.com/jenkins/jenkins_tomcat_setup.htm
I had faced the same issue.
I am guessing your slave machine running the test has jenkins services installed as services.
Uninstall the service. (.jenkins/jenkins-slave.exe uninstall)
Use the .jnlp or slave.jar to connect the machine as a slave.
Your test should run fine after that.
If it does just create a batch file to connect the machine as slave whenever it is logged in.
I tried that. But in any case, Jenkins does not open the browser, so Tests from Execution List and I do not know why.
We use Tosca 10.

DC/OS installation failure during preflight

I am using 5 cloud-based VMs to install DC/OS
1 mesos master
3 mesos agent
1 launching VM
I have installed Docker on my launching VM and start installing DC/OS. It is running successfully during install_prereqs stage without any errors. But it's failing during preflight with below errors for each of my VM system.
STDERR:
Connection to 129.114.18.235 closed.
STDOUT:
Running preflight checks /opt/dcos_install_tmp/dcos_install.sh: line 225: getenforce: command not found
Checking if docker is installed and in PATH: FAIL
Checking if unzip is installed and in PATH: FAIL
Checking if ipset is installed and in PATH: FAIL
Checking if systemd-notify is installed and in PATH: FAIL
/opt/dcos_install_tmp/dcos_install.sh: line 387: systemctl: command not found
Checking if systemctl is installed and in PATH: FAIL
Checking Docker is configured with a production storage driver: /opt/dcos_install_tmp/dcos_install.sh: line 285: docker: command not found
Do I need to install all the required software into my master and agents VMS? Please guide.
We have a similar setup but using straight vm's. We found docker needs to be running on all nodes, including masters, before running the install. Also, make sure you look at: /etc/sysconfig/docker-storageand have: DOCKER_STORAGE_OPTIONS= -s overlayset in the file on all nodes.
I don't believe this is the production setup but should get you running. You also may want to check the privilege of the user executing the install on the remote nodes, does it have permission to see/run systemctl?
I had the same error with the DC/OS web installer in version 1.9
I solved the error after double-checking the bootstraps machines's private key in the web form. To create the key, log into the bootstrap machine and run:
$ ssh-keygen -t rsa
$ for i in `cat dcos-ips.txt`; do ssh-copy-id root#$i; done
$ cat ~/.ssh/id_rsa

Nagios plugins - copy and execute?

I have a Nagios server installation up and running.
I'm starting to deploy check_mk out to all my client machines.
I am using mrpe for custom checks on my client machines.
As one of the checks, I would like to use the check_ssh plugin.
I tried to copy check_ssh from another machine to the client but it looks like it won't allow me to run it this way. Can I get away from actually installing the nagios agent and just stick to check_mk and be able to run Nagios plugins?
The exact error I am getting is:
ld.so.1: check_ssh: fatal: libintl.so.3: open failed: No such file or directory
thanks in advance
Most of the plugins in the standard nagios-plugins pack are compiled C, so if you're copying them to a different distribution or architecture they may not work. I would consider just downloading the nagios-plugins package or grabbing the latest source package for the client machines.
Nagios Plugins Source tarball
http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz
You can check SSH without nrpe plugin, it can be done from the Nagios server, just use the check_ssh plugin with this command (launched from the server):
./usr/local/nagios/libexec/check_ssh -H <client_ip>
If it's enabled it should print something like:
SSH OK - OpenSSH_6.0p1 Debian-4+deb7u1 (protocol 2.0) |
time=0,018154s;;;0,000000;10,000000
(That's because i'm using Debian Wheezy)
check_ssh comes with Nagios plugins tarball...
I'm currently using
nagios-plugins-2.0.2.tar.gz
Good luck...

Resources