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...
(Adding this here as I did not find an answer anywhere)
I configured Jenkins to automatically install JDK from the "Global Tools Configuration" > "JDK Installation" menu. The option works across all 14 nodes (various Windows and Linux) but one.
A server Windows Server 2012 R2 (amd64) with 20 executors, which has been running without issue for just under 3 years.
The log file references in the build's console (i.e. ...tools\hudson.model.JDK\install1873722508778839961log) is empty.
The build's console shows the following:
[EnvInject] - Loading node environment variables. Installing
E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191\jdk.exe
[Oracle_Java_8.0_191] $
E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191\jdk.exe
/s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress
INSTALLDIR=E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191
/L
E:\Jenkins_APA_8080\tools\hudson.model.JDK\install1873722508778839961log
Failed to install JDK. Exit code=-1 ERROR: SEVERE ERROR occurs
org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException
at
org.jenkinsci.plugins.envinject.util.RunHelper.getBuildVariables(RunHelper.java:137)
at
org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:235)
at
org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:51)
at
hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:542)
at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:462)
at hudson.model.Run.execute(Run.java:1810) at
hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at
hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429) Caused by:
hudson.AbortException at
hudson.tools.JDKInstaller.install(JDKInstaller.java:292) at
hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:157)
at
hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
at
hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
at
hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at hudson.model.JDK.forNode(JDK.java:148) at
org.jenkinsci.plugins.envinject.util.RunHelper.getJDKVariables(RunHelper.java:111)
at
org.jenkinsci.plugins.envinject.util.RunHelper.getBuildVariables(RunHelper.java:135)
... 8 more
I logged onto the server as a local admin and attempted to run the JDK installation line shown in the build console:
E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191\jdk.exe
/s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress
INSTALLDIR=E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191
/L E:\Jenkins_APA_8080\tools\hudson.model.JDK
The installation seemed to run and this time the log file contained text. I double checked the owner and permissions on the Jenkins folders and they were owned by a local admin and not a domain admin (this is normal for our Jenkins installation).
However, the login credentials of the Jenkins service on this machine were set to a domain admin (not local admin).
Changing the Jenkins Services Log On credentials resolved the issue. Even though this node has been running for over a couple years without issue, its credentials were not correct.
I am using Ubuntu 14.04 and I have installed Openfire 4.1 in that and that was working fine.
But on another day when I have started openfire with following command its not working
sudo /opt/openfire/bin/openfire start
and tried to open it like htp://localhost:9090
I have also checked the status with following command
sudo /opt/openfire/bin/openfire status
and it shows : The daemon is running.
I have also followed following link to setup a Java_home : http://www.wikihow.com/Install-Oracle-Java-JRE-on-Ubuntu-Linux
So whats wrong with my openfire and how can I debug it ?
For Debugging, you should take look at the logs located under /opt/openfire/logs directory.
Check info.log, error.log for clues.
Thanks Shoaib.
I have checked error log and found the error like :
2016.03.23 10:09:37 org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager - Error creating server socket
java.net.BindException: Cannot assign requested address
and I think that error was due to my domain was changed.
Now we are working in one office and assigned dynamic IP to all machines, so its changing IP each and every time and thats the reason its stopped working.
I have changed by IP to previous once,which I have added at the time of installing openfire, and it works...
I am trying to install the Docker-client Remote API library ( https://github.com/spotify/docker-client ) to do some image searches and inspect image data (all in public repositories). I have the boot2docker VM downloaded, installed and running. Commands such as "Docker pull ubuntu" work fine but I would like to do this via a Java program now. I used the Eclipse IDE Egit plugin to import the github project and created a Maven/Java project from the existing Master branch. The source code is completely imported and no errors reported. I then tried writing a simple test:
final DockerClient docker = DefaultDockerClient.fromEnv().build();
//docker.pull("busybox");
List<ImageSearchResult> results = docker.searchImages("ubuntu");
for (ImageSearchResult res : results) {
System.out.println(res.getName());
}
However, when running the code in Eclipse I get the following error:
Exception in thread "main" com.spotify.docker.client.DockerException: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:1109)
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:1028)
at com.spotify.docker.client.DefaultDockerClient.searchImages(DefaultDockerClient.java:653)
at com.spotify.docker.client.main.Test.main(Test.java:28)
I tried setting up an apache server on that port but then I get:
Exception in thread "main" com.spotify.docker.client.DockerRequestException: Request error: GET http://localhost:2375/v1.12/images/search?term=ubuntu: 404
at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:1100)
at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:1028)
at com.spotify.docker.client.DefaultDockerClient.searchImages(DefaultDockerClient.java:653)
at com.spotify.docker.client.main.Test.main(Test.java:28)
Can anyone tell me what I am supposed to do here to make my search/pull call work? This is my first try with Docker and I've searched through the documentation and googled the problem but can't find anyone with a similar problem.
Thank you!
EDIT: I am running docker in Windows 7 via the pre-built VM Boot2Docker. Maybe the Docker daemon running inside that is not accessible from programs outside of the VM such as Eclipse?
EDIT: solved it by upgrading to v1.6 instead of v1.5 which makes the daemon available in the Windows host. Current problem is that all my API calls are returning "The server failed to respond with a valid HTTP response"
I encountered a similar issue and I managed to solve this issue by using the following way, to build up the DockerClient:
final DockerClient docker = DefaultDockerClient.builder()
.uri(URI.create("unix:///var/run/docker.sock"))
.build();
I had been getting the same exception but adding the above URI part helped me to solve the issue.
A better explanation for a issue similar to the above and how to solve it has been provided in the following issue tracker.
https://github.com/spotify/docker-maven-plugin/issues/61
The Java program does essentially a docker search: that can only work in an environment where the docker engine is present.
Either in the boot2docker VM.
Or in a full Linux host.
I did encounter the same problem on Mac with eclipse and Docker version 1.10.3, I did search for a solution before I settled for a workaround - Using docker CLI docker-manager to create a new virtualbox and get the DOCKER_HOST and DOCKER_CERT_PATH values of that virtualbox and create a new builder.
In my case: I have created a virtual box default2 using docker CLI command docker-machine create -d virtualbox default2
Docker CLI
$ docker-machine env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.103:2376"
export DOCKER_CERT_PATH="/Users/XXXX/.docker/machine/machines/default2"
export DOCKER_MACHINE_NAME="default2"
Docker-client JAVA
DockerCertificates defaultCertificates = new DockerCertificates(Paths.get("/Users/XXXX/.docker/machine/machines/default2"));
DockerClient docker = DefaultDockerClient.builder()
.uri("https://192.168.99.103:2376")
.dockerCertificates(defaultCertificates)
.build();
I can't start Glassfish 3.1 on Eclipse Indigo with "Oracle Glassfish Server Tools" plugin on Windows 7. After installing the plugin, I've chosen "New" -> "Server" in the server view and clicked on GlassFish 3.1 and downloaded the installation through Eclipse.
Every time I try to start it, I've the following message:
The Eclipse plugin cannot communicate with the GlassFish server,
status is :CREDENTIAL_ERROR
I've found out that the initial password is 'changeit' and I've changed it to my own, on the command line:
bin/asadmin change-master-password domain1
Enter the current master password>
Enter the new master password>
Enter the new master password again>
Command change-master-password executed successfully.
I've changed it accordingly in GlasshFish 3.1 configuration screen within Eclipse in the section Application Server (Admin Password).
The ports listed (8080, 4848) seems compatible with domain.xml configuration:
<network-listeners>
<network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
<network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
<network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>
However, in my .log I find the following:
!ENTRY oracle.eclipse.tools.glassfish 4 1 2011-08-04 11:38:43.925
!MESSAGE GlassFish: error
!STACK 0
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
at com.sun.enterprise.jst.server.sunappsrv.commands.CommandRunner.call(CommandRunner.java:607)
at com.sun.enterprise.jst.server.sunappsrv.commands.CommandRunner.call(CommandRunner.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
!ENTRY oracle.eclipse.tools.glassfish 4 150 2011-08-04 11:38:43.928
!MESSAGE The Eclipse plugin cannot communicate with the GlassFish server, status is :CREDENTIAL_ERROR
!STACK 0
java.lang.RuntimeException: The Eclipse plugin cannot communicate with the GlassFish server.Status is :CREDENTIAL_ERROR
at com.sun.enterprise.jst.server.sunappsrv.SunAppServerLaunch.launch(SunAppServerLaunch.java:163)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:696)
at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3404)
at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3342)
at org.eclipse.wst.server.core.internal.Server$StartJob.run(Server.java:363)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
So it seems that the error message shown in the interface is misleading, it should be a connection problem, not password problem, as far as I understand. Anyone knows how to solve this problem?
I got the "The Eclipse plugin cannot communicate with the GlassFish server,
status is :CREDENTIAL_ERROR" error too.
I found a solution to my problem by ensuring that no other process was listening at port 8080.
To find processes that listens to port 8080, bring up a command prompt and type in the following:
netstat -a -n -o | find "8080"
In the far right column, you'll see a process identifier.
Bring up the windows task manager (hit ctrl+alt+delete and select
"Start Task Manager") and go to the processes tab.
Look for the column named "PID" (if it is not present already go to
view -> select columns... -> check PID) and find the process with
the PID you found using netstat.
-> kill the process -> try again.
It worked for me.
On Mac OS 10.6 I had many of the same problems described above:
First I had the CREDENTIAL_ERROR.
I tried creating a new server, as suggested in answer 2. However, I accidentally added the wrong password (it should be left blank), and started getting "wrong user name or password" messages. I was not able to change the password.
I then started getting the CREDENTIAL_ERROR again.
The solution was suggested by answer 3, that there is another process running. I decided to try completely deleting all of the servers on my Eclipse setup, and then adding a new server, as described in answer 2.
That worked beautifully, and I was immediately up and running (remembering to leave the password blank this time through)
The reason your port swapping probably worked, is because when 8080 was the http listener it was likely that your anti-virus was scanning the port for http traffic, which causes the Credential Error.
I removed the 8080 entry from my AV settings under web scanning and the server started up fine. Only took my a week and a half and a PC Rebuild before I found that one!!!!!
Regards
Chris
Update: It turns out that I had to disable the HTTP Scanner entirely to stop this issue. As soon as it was re-enabled the CREDENTIAL_ERROR returned. I've tried adding all sorts of exceptions to the AV settings, but none worked.
The issue with another process occupying the port 80, check for other webservers or app servers running on that port, stop them and re-try
After disabling ZoneAlarm firewall I could successfully start GlassFish on Windows. However, I then started to have many kind of unrelated and annoying problems and as Mico suggested, I switched back using Linux, which is my usual development platform, and everything went fine.
To document the process:
with Eclipse Indigo, GlassFish connector is not present by default. In WTP's server tab, right click and choose New -> Server and click on the link "Download additional server adapters", choose GlassFish and press Next, accept the license and Finish.
This time I downloaded GlassFish myself from http://glassfish.java.net/ and choose the open source edition full platform for Unix in the flavour of .sh file.
On the command line I moved the archive in the parent folder where I wanted it installed and called "sh glassfish-3.1.1-unix.sh", which brings up a graphical configuration. I choose Typical configuration.
If you choose the auto upgrade option, be prepared to wait several minutes. It's a known bug since 3.0.1, that seems they preferred to document, rather than fix it. It's not necessary to follow the advice to cancel the install, just grab a coffee or read some news, it will get through.
Once GlassFish is installed, in Eclipse server tab, choose New -> Server and choose "GlassFish" -> "GlassFish Server Open Source Edition 4 (Java EE 6)", browse domain1 directory of Glassfish, leave admin password blank.
At this point it's possible to deploy projects on Glassfish, just like I used to do in Tomcat. In my first day experience, hot redeployment sort of work, but not always, quite often a server stop + start has been necessary.
I got the "The Eclipse plugin cannot communicate with the GlassFish server, status is :CREDENTIAL_ERROR" error too.
For me it was a Firewall problem. -- For some reason the Firewall (configured by the IT) blocks eclipse to communicate with Glassfish on port 4848, by default used as "Admin Server Port".
But port 8080 is not blocked.
My workaround was to switch the ports in the domain.xml
<network-listeners>
<network-listener port="4848" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
<network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
<network-listener port="8080" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>
Now I can start the server from eclipse. And access the normal pages in the browser (because 4848 is not blocked for the browser).
I want to improve the answer from Andreas.
Yes, This is important to check your port:
netstat -a -n -o | find "8080"
If you are using Windows 7 make sure your proxy host is not active. Please check your host list file and open using notepad then restart your PC after comment all unnecessary host. Here is the tutorial.
\%systemroot%\system32\drivers\etc\host
In my case jmx failed to start because current host is using activate.adobe.com not your computer-name nor localhost.
service:jmx:rmi://activate.adobe.com:8686/jndi/rmi://activate.adobe.com:8686/jmxrmi
The host should be "localhost" or "127.0.0.1" or your computer-name
service:jmx:rmi://My-PC-Name:8686/jndi/rmi://My-PC-Name:8686/jmxrmi
Last thing is to check your processes list from Task Manager, end the anti virus proxy service process, like mine is using Trend Micro Internet Security then end process tmproxy.exe *32.
Go back to your eclipse double click your GlassFish server in server list tab, please uncheck "Use Anonymous Connection for Admin Console" then make sure to fill "Admin Name" and "Admin Password" for example user admin and password adminadmin as GlassFish default admin login.
Now you can run the GlassFish server from your eclipse. It's worked.
Try this : kill java process from task manager if it not show java process then restart your pc >> it work for me
Ensure that you have JDK set as JRE in your eclipse.
On Windows set it to
window>preferences>java>installed jres
On Mac set it to
eclipse>preferences>java>installed jres
These should point to the JDK location.