Unable to start gerrit.sh and thus unable to use gitweb - gerrit

I am unable to start the gerrit.sh script. while running this script, it says starting failed. Below is the error that i can see in the error_log:
[2018-09-10 02:05:13,886] ERROR com.google.gerrit.pgm.Daemon : Unable to start daemon
java.lang.IllegalStateException: Cannot bind to NewVoE-GIT01:29418
at com.google.gerrit.sshd.SshDaemon.start(SshDaemon.java:290)
at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:74)
at com.google.gerrit.pgm.Daemon.start(Daemon.java:258)
at com.google.gerrit.pgm.Daemon.run(Daemon.java:186)
at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:169)
at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:93)
at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:50)
at Main.main(Main.java:25)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:444)
at sun.nio.ch.Net.bind(Net.java:436)
Although my gerrit code review site is working fine but the gitweb option is not able to fetch the details from backend. Please suggest.
And thanks in advance for your help:)

The error message:
Address already in use
tells that there is already a service bound to port 29418 This prevents Gerrit's SSH daemon from starting up because it uses port 29418 by default.
You should check what is using that port, and stop it if possible, or configure Gerrit to listen to SSH on a different port. You can do the latter by setting sshd.listenAddress in the site's etc/gerrit.config file.

Related

Neo4j Could not apply the transaction to the store after written to log and application restart

At my Neo4j 3.1.3/SDN 4 project from time to time I'm facing with a following Neo4j exception:
Caused by: java.lang.RuntimeException: org.neo4j.ogm.exception.TransactionException: Could not apply the transaction to the store after written to log
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.executeRequest(BoltRequest.java:175)
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.execute(BoltRequest.java:89)
at org.neo4j.ogm.autoindex.AutoIndexManager.assertIndexes(AutoIndexManager.java:187)
at org.neo4j.ogm.autoindex.AutoIndexManager.build(AutoIndexManager.java:92)
at org.neo4j.ogm.session.SessionFactory.<init>(SessionFactory.java:45)
at org.neo4j.ogm.session.SessionFactory.<init>(SessionFactory.java:93)
at com.example.domain.api.configuration.Neo4jConfig.sessionFactory(Neo4jConfig.java:38)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$bcccfdf9.CGLIB$sessionFactory$2(<generated>)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$bcccfdf9$$FastClassBySpringCGLIB$$e2dbf1bb.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$bcccfdf9.sessionFactory(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
I use Bolt driver in order to connect to Neo4j.
In order to solve this situation I have to restart my Neo4j server and also I have to restart my application(restart Tomcat server).
Is it possible to configure my Bolt driver/datasource.. etc in order to get my application up and running with no needs to restart the application itself.. only restart neo4j server ?
Not sure this is related to OGM, it rather looks a problem on the db side.
Maybe report this on the neo4j gitub with relevant db logs.
Disabling index checks at application startup might help.
This can be done by removing indexes.auto entry from ogm.properties file (or equivalent java config).
see http://neo4j.com/docs/ogm-manual/current/reference/#reference:indexing

Unable to create a windows salve node for jenkins

I have setup a master on Ubuntu machine and want to create a salve on Windows 10. While launching the agent I am facing following issue. Can someone please help.
just before slave javed_pc gets launched ...
executing pre-launch scripts ...
[2017-04-21 10:26:54] [windows-slaves] Connecting to 172.26.152.23
Checking if Java exists
java -version returned 1.8.0.
[2017-04-21 10:26:56] [windows-slaves] Copying jenkins-slave.xml
[2017-04-21 10:26:56] [windows-slaves] Copying slave.jar
[2017-04-21 10:26:56] [windows-slaves] Starting the service
ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins
org.jinterop.dcom.common.JIException: Service Logon Failure
at org.jvnet.hudson.wmi.Win32Service$Implementation.start(Win32Service.java:149)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor206.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.kohsuke.jinterop.JInteropInvocationHandler.invoke(JInteropInvocationHandler.java:140)
Caused: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy64.start(Unknown Source)
at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:342)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:262)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Using the JENKINS Windows Slaves Plugin, check if one of the reason listed in "Windows slaves fail to start via DCOM" would apply in your case.
It lists a wide variety of reasons, from the Windows account used, to network, registry, security reasons.
Make sure you don't have a proxy issue, where Jenkins would try and use said proxy to access a machine (Windows here) on your LAN: the environment variable no_proxy should be used to exclude your local domain.
The OP Javed Ahmed reports having solve it with:
In 'Configure Global security' settings, when you check 'Enable Security' option, then it allows you to connect via java web start.
Otherwise It was not showing the the option to connect through java web start and connecting via windows service is a pain.

Unable to start SLAVE node in Jenkins

Unable to start SLAVE node in Jenkins.
Master machine showing error exception in log file.
[12/01/14 16:21:44] [SSH] Opening SSH connection to
10.0.11.120:22.
Connection refused: connect
ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
java.lang.IllegalStateException: Connection is not established!
at com.trilead.ssh2.Connection.getRemainingAuthMethods(Connection.java:1030)
at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPasswordAuthenticator.canAuthenticate(TrileadSSHPasswordAuthenticator.java:82)
at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:207)
at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:169)
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1173)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:701)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[12/01/14 16:21:45] Launch failed - cleaning up connection
[12/01/14 16:21:45] [SSH] Connection closed.
[12/01/14 16:23:44] [SSH] Opening SSH connection to 10.0.11.120:22.
If your slave machine is Mac then
Go to System Preferences -> Sharing and enable Remote Login then try again.
I had this problem too. I have trace the log of the slave.
tail -f /var/log/*.log
And I have seen this message.
Sep 20 14:51:43 clicrdv.aws-eu-west-01.batch-01.adm sshd[1035]: fatal: no matching mac found: client hmac-sha1-96,hmac-sha1,hmac-md5-96,hmac-md5 server hmac-sha2-512,hmac-sha2-256,hmac-ripemd160 [preauth]
Then, I have deleted this line in /etc/ssh/sshd_config
#MACs hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
And restart ssh.
Then no problem at all.
Eric
I suspect that you need to install the Java Cryptography Extension for your JVM. Without that the RSA key size is limited and authentication is not being established.
See https://issues.jenkins-ci.org/browse/JENKINS-26495 for more details.
I had this problem and resolved it by replacing the IP address with the host name.
Problem was solved for my by replacing host name by IP Adress.
See also: https://issues.jenkins-ci.org/browse/JENKINS-26379?focusedCommentId=249378&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-249378

Connecting slave to a jenkins master

I tried to connect slave to jenkins master through java web start but my efforts failed in the end.
I executed java -jar (jar file) (url) to connect and got the following errors.
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at hudson.remoting.Engine.connect(Engine.java:321)
at hudson.remoting.Engine.run(Engine.java:210)
Please help. Both Master and Slave use Ubuntu Linux.
First of all, SO is not bug tracker for Jenkins project nor developers.
The Jenkins JIRA is located here: https://issues.jenkins-ci.org/secure/Dashboard.jspa
Secondly, in the wiki pages:
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service
https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds
contains pretty sufficient information that might guide you to fix. Probobly not permanent, but at least temporary.
For your comfort, here is the first link that fits the stack trace:
Check that the JNLP port is opened if you are using a firewall on your server. You can configure its value in Jenkins configuration. By default it is set to use a random port.
Cheers and good luck!

YourKit Profile On Remote Grails App

I am trying to track down a memory leak that I am having with a Grails application and am using the Yourkit Profiler, but am running into a problem.
I have the Grails application running in Tomcat6 on the Production server and have unpacked the YourKit profiler and ran it according to the documentation using sudo bin/yjp.sh -attach, but I am getting the error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.yourkit.Main$2.run(a:19)
Caused by: com.yourkit.runtime.PresentableException: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
at com.yourkit.ui.s.n.a(a:170)
at com.yourkit.ui.s.n.a(a:176)
at com.yourkit.ui.s.j.a(a:250)
at com.yourkit.c.do(a:73)
at com.yourkit.Main0.entry(a:274)
... 5 more
I am using YourKit v10 and am on an Ubuntu 11.04 server. Any ideas?
It looks like I had to run as the user running the container. Changing sudo bin/yjp.sh -attach to sudo -u tomcat6 bin/yjp.sh -attach worked.
You need to have the Attach API working before you can continue:
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
See the JVisualVM FAQ - their troubleshooting can be used here too.

Resources