I encontered this problem when was trying to connect jenkins agent trough the ssh. I've passed all the steps as described here: https://acloudguru.com/blog/engineering/adding-a-jenkins-agent-node, except one - instead yum install java-1.8.0-openjdk I've used apt install default-jre, which in the end has gave me openjdk 11.0.13 2021-10-19. After the all trying launch the agent I am getting error:
java.io.IOException: Malformed SSH byte string.
at com.trilead.ssh2.packets.TypesReader.readByteString(TypesReader.java:132)
at com.trilead.ssh2.packets.TypesReader.readMPINT(TypesReader.java:117)
at com.trilead.ssh2.signature.RSAKeyAlgorithm.decodePublicKey(RSAKeyAlgorithm.java:113)
at com.trilead.ssh2.signature.RSAKeyAlgorithm.decodePublicKey(RSAKeyAlgorithm.java:28)
at com.trilead.ssh2.KnownHosts.addHostkey(KnownHosts.java:108)
at com.trilead.ssh2.KnownHosts.initialize(KnownHosts.java:410)
at com.trilead.ssh2.KnownHosts.initialize(KnownHosts.java:438)
at com.trilead.ssh2.KnownHosts.<init>(KnownHosts.java:87)
at hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationStrategy.getPreferredKeyAlgorithms(KnownHostsFileKeyVerificationStrategy.java:108)
at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:425)
at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:421)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
[01/04/22 15:30:12] Launch failed - cleaning up connection
[01/04/22 15:30:12] [SSH] Connection closed.
Please, help me to understand, what happens and how can it be resolved. I am newbuy with jenkins and not familiar with java. Googling of this problem did not supply some sensible result to me.
Thank you.
This is most likely due to incorrect content of the KnownHosts file. Therefore, make sure that the KnownHosts file is correct with the content of id_rsa.pub(public file), if it is incorrect, you will need to add it after Host name or IP address. Such as;
HOSTNAME ssh-rsa AAAAB3NzaC1yc...
Related
I have installed ONOS 2.3.0 on an Ubuntu Server 18.04.4 virtual machine running on Hyper-V following this steps (taken from here and here):
Firstly, I have installed Java 11 (openjdk-11-jdk and openjdk-11-jre), maven and curl;
then I have downloaded ONOS 2.3.0 from here and extracted it with tar xzf onos-2.3.0.tar.gz;
lastly, I exported the required environment variable export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64.
When I try to launch it using the command ./onos-service start (tested both from a normal user and sudo), it gives me the following errors:
21:54:57.869 ERROR [onos-core-net] FrameworkEvent ERROR - org.onosproject.onos-core-net
org.osgi.framework.ServiceException: Service factory returned null. (Component: org.onosproject.store.cfg.DistributedComponentConfigStore (6))
at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:380)
at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247) org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
[...]
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) at java.base/java.lang.Thread.run(Thread.java:834)
[...]
21:54:57.881 WARN [NettyMessagingService] Failed to bind TCP server to port 0.0.0.0:9876 due to {}
java.net.BindException: Address already in use
at java.base/sun.nio.ch.Net.bind0(Native Method)
[...]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:834)
21:54:57.899 ERROR [onos-core-primitives] bundle org.onosproject.onos-core-primitives:2.3.0 (192)[org.onosproject.store.atomix.impl.AtomixManager(115)] : The activate method has thrown an exception
java.util.concurrent.CompletionException: java.net.BindException: Address already in use
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
[...]
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.BindException: Address already in use
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Net.java:455)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:132)
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:563)
... 12 more
Connecting to karaf instance with ssh -p 8101 karaf#localhost confirm that ONOS is working (at least partially), the web interface login loads, but after login it hangs saying that ONOS GUI not ready yet... please stand by....
Does anyone has an idea about how to solve this problem?
Thanks in advance.
UPDATE 19-03-2020: I have prepared another virtual machine following exactly the same steps on another PC using VirtualBox and lower virtual resources assigned, and it works. Honestly i don't understand why it fails on the Hyper-V configuration.
UPDATE 20-03-2020: I have reinstalled Ubuntu configuring the network directly from the installer, and prerequisites and dependecies of ONOS offline (downloaded on another machine via sudo apt install --download-only <package-name>) and it worked. I think the problem was related to something in the network configuration that didn't let him recognize its own process on port 9876 (see the WARN above).
Hope this can be helpful for others.
I had this problem. ONOS is locked to the IP at first install. I grepped for my IP in the /onos folder and was able to reset the binding by deleting the following files that contained the IP. They were rebuilt at next ONOS run.
grep -rl 192.168. --exclude=*.log ~/onos
rm ~/onos/apache-karaf-4.2.9/data/db/partitions/data/partitions/1/raft-partition-1.conf
rm ~/onos/apache-karaf-4.2.9/data/db/partitions/data/partitions/1/raft-partition-1.meta
rm ~/onos/apache-karaf-4.2.9/data/db/partitions/data/partitions/1/.raft-partition-1.lock
rm ~/onos/apache-karaf-4.2.9/data/db/partitions/system/partitions/1/.system-partition-1.lock
rm ~/onos/apache-karaf-4.2.9/data/db/partitions/system/partitions/1/system-partition-1.conf
rm ~/onos/apache-karaf-4.2.9/data/db/partitions/system/partitions/1/system-partition-1.meta
I have faced this issue after changing the IP address of the controller (Host machine).
The quick way to solve it is to set the IP controller as it was (Static)
then reboot your machine
after putting the URL (YourIP:8181/onos/ui/index.html)
Karaf will ask you for login in credentials, use (username:karaf/password:karaf)
then on ONOS's login page, use onos/rocks as credentials.
Good luck..
I want to install bamboo agent on my working computer. I have downloaded the jar file and try to run it with following syntax
java -jar atlassian-bamboo-agent-installer-5.7.0.jar https://bamboo.xxxxx.org/agentServer/
I got error javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated.
The source of this error is clear to me - we have a self-signed SSL sertificate. I tried to run with following parameters
java -Dbamboo.agent.ignoreServerCertName=true -jar atlassian-bamboo-agent-installer-5.7.0.jar https://bamboo.xxxxx.org/agentServer/
but it does not work as well.
I tried to add the certificate using this link Java keytool easy way to add server cert from url/port
The sertificate seems to be installed, but it does not help. I still have the following error.
Do you know how can I fix it?
The problem was that bamboo did not obtained (for some reason) the keystorage created by keytool.
I needed to manually set the keystore in the bamboo configuration. In config/wrapper.conf you need to add following lines
wrapper.java.additional.3=-Djavax.net.ssl.keyStore=/#MODIFY_ME_TO_MY_HOME#/bamboo-agent-home/keystores/client.ks
wrapper.java.additional.4=-Djavax.net.ssl.keyStorePassword=#MY_AWESOME_PASSWORD#
wrapper.java.additional.5=-Djavax.net.ssl.trustStore=/#MODIFY_ME_TO_MY_HOME#/bamboo-agent-home/keystores/client.ts
This can be caused if you are running Bamboo behind Apache with SSL, if your default SSL VirtualHost is not returning the same SSLCertificate as your Bamboo VirtualHost. We had a similar problem, because I didn't know /etc/httpd/conf.d/ssl.conf created a VirtualHost.
I'm trying to install JavaBridge as I want to make connections between my php files and Java files.
I need my php request a GET method to Java file, and Java file will get the ID and run some script and return with an ARRAY.
I tried to install JavaBridge, but I get errors while trying to excess to localhost:8080/JavaBridge
javax.servlet.ServletException: php.java.bridge.http.FCGIConnectException: Could not connect to server
php.java.bridge.http.FCGIConnectException: Could not connect to server
java.io.IOException: File \\.\pipe\C:\apache-tomcat-7.0.39\temp\JavaBridge939398813756155712.socket not writable
java.io.IOException: PHP not found. Please install php-cgi. PHP test command was: [php-cgi, -v]
I didn't show out all the errors here, I showed only the first line of each root cause.
I will give more details in my setup.
I'm using XAMPP all the time, with PHP, MySQL in the XAMPP.
Then I just installed Tomcat inorder to install JavaBridge.
I copied JavaBridge.war into c:/tomcats/webapps, copied JavaBridge.jar and php-servlet.jar into c:/tomcats/lib
I assume the problems should lies with the PHP, but I don't know how to fix it as well.
Install PHP again? but I'm not sure too.
Whats the problem with my setup?
Or is there others way to make connections between PHP and Java as what I stated above?
Thank you.
Have you enabled php-cgi?
Here's how u can do it. Go to: xampp\apache\conf\extra\httpd-xampp.conf and uncomment this:
<FilesMatch "\.php$">
SetHandler application/x-httpd-php-cgi
</FilesMatch>
<IfModule actions_module>
Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"
</IfModule>
Restart Apache & Tomcat.
We are using the Ganymed-SSH library and facing this error while doing SSH to another machine.
[root#XXXX test]# java -classpath .:ganymed-ssh2-build210.jar Basic
ERROR:java.io.IOException: There was a problem while connecting to 10.X.X.X:22
java.io.IOException: There was a problem while connecting to 10.X.X.X:22
at ch.ethz.ssh2.Connection.connect(Connection.java:699)
at ch.ethz.ssh2.Connection.connect(Connection.java:490)
at Basic.main(Basic.java:27)
Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
at ch.ethz.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:91)
at ch.ethz.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:229)
at ch.ethz.ssh2.Connection.connect(Connection.java:655)
... 2 more
Caused by: java.io.IOException: Cannot read full block, EOF reached.
at ch.ethz.ssh2.crypto.cipher.CipherInputStream.getBlock(CipherInputStream.java:81)
at ch.ethz.ssh2.crypto.cipher.CipherInputStream.read(CipherInputStream.java:108)
at ch.ethz.ssh2.transport.TransportConnection.receiveMessage(TransportConnection.java:231)
at ch.ethz.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:669)
at ch.ethz.ssh2.transport.TransportManager$1.run(TransportManager.java:468)
at java.lang.Thread.run(Thread.java:636)
Can anyone explain what could be the issue here? Where should we start to debug from?
SSH access from normal shell works correctly.
Probably there is some problem with your public key
ssh failed after 141742-01/02 patch on solaris 10 !
Enabled aes192/aes256 support in ssh/sshd does not work on S10u3 or older released
A workaround is to disable the use of aes192/aes256 ciphers for ssh and sshd. Change the two config files /etc/ssh/ssh_config and /etc/ssh/sshd_config and add the following line:
Ciphers aes128-ctr,aes128-cbc,arcfour,3des-cbc,blowfish-cbc
You’ll have to restart sshd to pickup the change (“svcadm restart ssh”).
Source:
http://blog.mydream.com.hk/howto/matching-cipher-is-not-supported-aes256-cbc
I am trying to run a jenkins build. The below is my configuration.
Jenkins Version : 1.445
Deployment : as a WAR
Java : 1.7 (Server 64 bit)
Tomcat Ver : 7.0.23
It gives the following error:
Started by user jenkins-admin
Updating https://myrepo.mycompany.com/svn/repos/myrepo
ERROR: Failed to update https://myrepo.mycompany.com/svn/repos/myrepo
org.tmatesoft.svn.core.SVNException: svn: OPTIONS /svn/repos/myrepo failed
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:298)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:283)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:271)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:533)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1011)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRepositoryUUID(DAVRepository.java:148)
at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:342)
at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:330)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.update(SVNUpdateClient.java:535)
at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:401)
at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:135)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:136)
at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:787)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:768)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:752)
at hudson.FilePath.act(FilePath.java:783)
at hudson.FilePath.act(FilePath.java:765)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:742)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:684)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:571)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:460)
at hudson.model.Run.run(Run.java:1404)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS /svn/repos/myrepo failed
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:200)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:146)
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:89)
... 27 more
Caused by: org.tmatesoft.svn.core.SVNException: svn: OPTIONS request failed on '/svn/repos/myrepo'
svn: unknown host
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
The problem is it does NOT fail all the time. However, it fails 70-80% of the time.
The credentials and the URL for svn repo are correct.
UPDATE: I have tried every possibility now. The problem persists.
I tried with JDK 6 (both 32 and 64 bit). The problem does NOT go.
I am working on RHEL 5.6. Can anybody please help?
I noticed this line:
Caused by: org.tmatesoft.svn.core.SVNException: svn: OPTIONS request failed on '/svn/repos/myrepo'
svn: unknown host
Whenever I have a problem with Jenkins, I log into the Jenkins system as the user running Jenkins, go to the working directory inside Jenkins, and from a command line, try to do whatever Jenkins is attempting to do (like update my working directory). That usually will help you point out a particular error.
Try running an update a few times from the Jenkin's job's working directory and see if you get the same error. If you do, it could point out a network issue (unknown host).
If you can run updates from the working directory on your Jenkins server in your job's working directory, then the problem may lie with SVNKit itself. What version of Subversion and SVNKit are you using?
Try deleting the working directory and see if a clean checkout helps.
I noticed this error after upgrading my "Jenkins Subversion Plugin" from v1.42 to v1.44.
To Fix:
Please check the version of "Jenkins Subversion plugin" if it v1.44, downgrade to lower version.
Seems like we have some issues with the new Subversion Plugin.
The node running the build can not resolve the host name. Possibly a fully qualified name is required: rather than mysvnbox something like mysvnbox.mydomain.com; Or possibly the node is blocked by a firewall. The fact that it works sometimes would seem to indicate at least one node has visibility or can use an abbreviated domain specification. Good luck.
I have faced the same issue in Jenkins. It was kept on failing during checking out the code. I tried to increase Jenkins work space but it was prompted for the crowd authentication. It was failed to update and I tried clear the authentication date from subversion and restarted my build server (You can log out with your credentials and log-in). This will work.