In Chapter 16.2 of the Sonatype books for Nexus 3 it is stated that you can start the Karaf console by pressing enter after the nexus run command:
Bundles can be loaded via the Karaf console. To enable the console, set karaf.startLocalConsole in bin\nexus.vmoptions to true. This allows you to access the Karaf console by pressing enter after starting the repository manager with the run option.
However doing so results in a
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.exe4j.runtime.WinLauncher$1.run(WinLauncher.java:80)
and the system is shutting down immediately.
Turning on the Karaf debug logging does not reveal any further hints.
Related
In my scenario Jenkins master is available in Linux machine and i can access this in my Local windows machine also.
I created one windows slave using launch method as "Launch agent by connecting to the master".As per guidelines , i created one folder in my windows and i pasted that slave and agent jars in that folder.
While I am trying to run the slave-agent i am getting error like below. (Screenshot attached)
I tried with 2nd option as well i.e i took the provided command in Jenkins slave and i pasted that into command. again it is giving failed to connect error message. Please find below error message.
I am new to this configuration.
Do i need provide my slave machine ip into the master machine or do i need to install any other things related to this. can someone please help me out.
Failed to obtain http://ip:7394839:computer/winslave1/slave-agent.jnlp?encrypt=true
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown....etc
Slave-agent error
Issue resolved. In my case whenever we are creating new slave it is generating new IP which is not having server. Here just we are creating another node for the existing server.
Whenever we are launching the slave using agent.jar with the slave IP we are getting timed out error. Instead of going with slave IP if we go with master IP , agent is launching successfully.
Please find below example.
If i try with slave IP(Below IP)
java -jar D:\Jenkins\agent.jar -jnlpUrl we are getting error
http://120.231.140:8080/computer/My_slave_node_name_Windows10/slave-agent.jnlp -secret anHexadecimal_Long_Number5d094b1f577bc772b65b7277ac57 -workDir "D:\Jenkins"
Below IP is master IP. Agent launched successfully.
java -jar D:\Jenkins\agent.jar -jnlpUrl http://120.241.141:8080/computer/My_slave_node_name_Windows10/slave-agent.jnlp -secret anHexadecimal_Long_Number5d094b1f577bc772b65b7277ac57 -workDir "D:\Jenkins"
There is change in IP for slave and master. If i launch the slave ip from the cmd we are getting a timed out error.
The other three possibilities are
Whitelist slave IP in master Instance security groups level(all traffic or required ports).
By default windows server will block with IE security settings so diable by following below.
"Enter Server Manager in Windows search to start Server manager application. Select Local Server. Navigate to the IE Enhanced Security Configuration property, select the current setting to open the property page, select the Off option button for the desired users, and then select OK"
Configure a port number for TCP JNLP connection and whitelist it on instance security groups.
Manage Jenkins > Configure Global Security > Enable security > TCP port for JNLP agents: Fixed.
This question already has answers here:
SonarQube - Unable to load the Wrapper's native library 'wrapper.dll'
(5 answers)
Closed 3 months ago.
I'm installing SonarQube v5.0.1.
I'm running Windows Server 2012 64-bit, Java 1.8 64-bit, and the SonarQube windows-x86-64 wrapper.
SonarQube keeps throwing the following error:
WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: Temp directory is not writable: C:\Windows\system32\config\systemprofile\AppData\Local\Temp\
java.lang.IllegalStateException: Temp directory is not writable: C:\Windows\system32\config\systemprofile\AppData\Local\Temp\
at org.sonar.process.MinimumViableSystem.checkWritableDir(MinimumViableSystem.java:60)
at org.sonar.process.MinimumViableSystem.checkWritableTempDir(MinimumViableSystem.java:52)
at org.sonar.process.MinimumViableSystem.check(MinimumViableSystem.java:45)
at org.sonar.application.App.main(App.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(Unknown Source)
at org.sonar.process.MinimumViableSystem.checkWritableDir(MinimumViableSystem.java:57)
... 9 more
<-- Wrapper Stopped
Why does SonarQube keep trying to write to C:\Windows\System32\config\systemprofile\AppData\Local instead of C:\Windows\SysWOW64\config\systemprofile\AppData\Local?
To get rid of this error in previous installations, I've had to create a Temp folder in C:\Windows\System32\config\systemprofile\AppData\Local and fiddle with the read/write settings and or permissions to get SonarQube to stop complaining.
UPDATE: This is a huge problem, because I can't start SonarQube as a Windows Service. What's weird is that I already had SonarQube installed and running as a Windows Service. Today, I stopped the service, and now I can't start the service anymore. I've set the Temp folder's permissions to be not Read-Only and so that Everyone has Full Control (not ideal, I know...)
Still, the Temp error prevents SonarQube from starting.
This can also be fixed by setting the java.io.tmpdir java property to a writable directory.
e.g., in conf/wrapper.conf change
wrapper.java.additional.1=-Djava.awt.headless=true
to
wrapper.java.additional.1=-Djava.awt.headless=true -Djava.io.tmpdir=E:/sonarqube-5.1/temp
I had the same error in my sonar log when trying to start the service after I had installed it.
I had JAVA_HOME and x64 all correctly set up.
I managed to resolve the issue in the log above by changing the 'Log On As' for the installed service to 'NETWORK SERVICE' (without a password), then started the service. By default it had set the Log On As to Local System.
Probably another thing worth mentioning is if you're setting up SonarQube for the first time it may be best to get the website working before installing the service, otherwise debugging is a bit of a pain.
I had the same issue today with sonarqube 5.6 and Windows Server 2008 R2. Nothing of the above worked for me but what fixed the issue was defining a system variable TMPDIR pointing to another temp-directory e.g. C:\TMP
I had the same error when running some sonar analysis.
It turned out that in wrapper.conf I had to add
set.TMPDIR=c:/tmp
with path to the existing tmp directory and of course service needed to be reinstalled (UninstallNTService.bat / InstallNTService.bat)
In case of Windows (specifically Windows 10), delete the file under temp folder [under sonar folders] and run startSonar.bat. It should work.
I have downloaded apache karaf2.3.3 (on felix) on several CentOS6.4 machines. I see this issue only in a few machines. When I try to install a feature using the following commands
$KARAF_HOME/bin/start
$KARAF_HOME/bin/client "features:install myfeature"
I get the following stack trace:
WARN org.apache.sshd.client.session.ClientSessionImpl - Exception caught
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:273)
at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:44)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:690)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Looks like client fails to connect to karaf. Firewall is shutdown on all of the machines. Anyone knows why this could be failing? The feature gets happily installed if run karaf in console mode with /bin/karaf and type in the same command
My guess is that the port you defined for the remote Karaf console was already in use by another application before the Karaf installation. As such the wrong application accepts the link, cannot make anything of the data and resets the connection. I would suggest to stop Karaf, check with netstat or via telnet localhost <port> whether the port Karaf is configured to listen on is already in use, and find the related application. As an alternative, you can configure Karaf to use a different (not used) port. See for example this page
I set up Jenkins on a Windows 7 64 bit PC, and installed a Jenkins slave service on another Win7 64 PC.
The master PC gives this error:
Connection was broken
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at hudson.remoting.Channel$ReaderThread.run(Channel.java:1127)
What can I do to diagnose the problem?
[Update]
The error is shown when I go to the Nodes page. The added slave is displayed as being disconnected. And when I click on the node Name, the above error is displayed.
[Update 2]
When a job was forced to run on the slave, it just worked. And afterwards, the slave was displayed as being connected in the node page.
Now I come to think of it, I did not try to queue multiple jobs. Perhaps that would have triggered the execution to the slave as well?
Anyway, I've got my CI farm up & running now :-)
I suggest you to start the slave via browser, log as administrator to the slave machine and go to the node page on jenkins, if you are logged as jenkins admin you'll see a slave start icon, this will download and execute the slave process.
start slave screenshot
Once you get this working you can update it as a windows service via the slave java application menu “File->Install as Windows Service”.
If you're running jenkins through a HTTPS connection using a self signed certificate open jenkins-slave.xml and add -noCertificateCheck to the arguments list.
Look in your $JENKINS_HOME folder for the slave logs, they might contain more information.
I am deploying a WAR file with Hudson 2.1.2 Post Maven Build which fails with this error message. I have the Hudson deploy plugin installed
Deploying
C:\Users\Admin\workspace_astra\astra-maven\target\astra-maven-0.0.1-SNAPSHOT.war
to container Tomcat 7.x Remote The property cargo.tomcat.manager.url
has been deprecated, please use cargo.remote.uri instead. ERROR:
Publisher hudson.plugins.deploy.DeployPublisher aborted due to
exception org.codehaus.cargo.container.ContainerException: Failed to
redeploy
[C:\Users\Dieter\workspace_astra\astra-maven\target\astra-maven-0.0.1-SNAPSHOT.war]
at
org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:191)
at
hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:62)
at
hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:92)
at
hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:75)
at hudson.FilePath.act(FilePath.java:758) at
hudson.FilePath.act(FilePath.java:740) at
hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:75)
at
hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at
hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:630)
at
hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:608)
at
hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:584)
at hudson.model.Build$RunnerImpl.post2(Build.java:159) at
hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:553)
at hudson.model.Run.run(Run.java:1391) at
hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at
hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145) Caused by:
java.io.FileNotFoundException: http://localhost:8080/manager/list at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source) at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:507)
at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:644)
at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:657)
at
org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:172)
... 17 more java.io.FileNotFoundException:
http://localhost:8080/manager/list at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source) at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:507)
at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:644)
at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:657)
at
org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:172)
at
hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:62)
at
hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:92)
at
hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:75)
at hudson.FilePath.act(FilePath.java:758) at
hudson.FilePath.act(FilePath.java:740) at
hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:75)
at
hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at
hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:630)
at
hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:608)
at
hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:584)
at hudson.model.Build$RunnerImpl.post2(Build.java:159) at
hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:553)
at hudson.model.Run.run(Run.java:1391) at
hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at
hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
Where do I change this cargo.tomcat.manager.url to cargo.remote.uri within my hudson environment, as this is what is doing the deployment?
I found the answer. There is a bug in the deploy plugin for tomcat 7, so Dominique Righetto kindly rewrote it for everyone an placed it online at Google Docs here https://docs.google.com/#folders/0B7SAopRfWOagNjk5MjBjYTMtODEyYy00ZGRiLTgxZWQtODk1ZDdmN2M4Nzc2.
They speak about it here on the Hudson Wiki
http://wiki.hudson-ci.org/display/HUDSON/Deploy+Plugin
Hope that helps
I had the same problem. I was confused with the problem. There was not manager app running in my tomcat. In your tomcat, inside the webapps folder you should have a folder called manager(this is the one to see manager app). If this is not available "http://localhost:8080/manager/list" this link does not work.
There are two ways to solve this.
1) install new tomcat and make sure this has manager folder.
2) copy the manager folder from some other place, if you have zipped version of tomcat.
once manager folder is copied, restart the server. Before doing restart, you may need to have manager-* roles enabled to the user that you are trying to access the manager app.