sonarqube exception caught on transport layer

房东的猫 提交于 2020-08-27 07:07:09

问题


Good afternoon everyone, the problem is this I have a server with SonarQube, that when I try to start the windows service, it gets up but then it stops.

The following error appears in the sonarqube log:

2017.11.14 11:04:52 WARN  sea[o.e.transport.netty]  [sonar-1510653879773] exception caught on transport layer [[id: 0x346b46fb, /127.0.0.1:59330 => /127.0.0.1:9001]], closing connection
java.io.IOException: An existing connection was forcibly closed by the remote host
                at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[na:1.8.0_152]
                at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[na:1.8.0_152]
                at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_152]
                at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[na:1.8.0_152]
                at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[na:1.8.0_152]
                at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64) [elasticsearch-1.1.2.jar:na]
                at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) [elasticsearch-1.1.2.jar:na]
                at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) [elasticsearch-1.1.2.jar:na]
                at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) [elasticsearch-1.1.2.jar:na]
                at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [elasticsearch-1.1.2.jar:na]
                at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [elasticsearch-1.1.2.jar:na]
                at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [elasticsearch-1.1.2.jar:na]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_152]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_152]
                at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
2017.11.14 11:04:52 INFO  app[o.s.p.m.TerminatorThread] Process[search] is stopping
2017.11.14 11:04:52 INFO  sea[o.s.p.StopWatcher]  Stopping process

Do you know why this error? I have set the sonar.properties correctly, including set the value of the sonar.search.port property to 0 as this link suggests: Sonar launch error, but the problem persists.

I hope you can give me a hand...

Regards!!!


回答1:


I had the same problem and i could fix it like this:

  1. Go to this folder: sonarqube-x.x\conf
  2. Open this file: sonar.properties
  3. Find the word: #sonar.web.port
  4. Change the value from 9000 to another port, like 9002
  5. Save your changes
  6. Start again your sonarqube
  7. Access to the server with port 9000: http://localhost:9000



回答2:


UnComment below line in sonar property file and change port 9001 to 0

#sonar.search.port=9001
sonar.search.port=0



回答3:


I experienced this error when upgrading SonarQube from version 5.6.7 to 6.7.1.

Originally I thought this was due to the port number but upon checking the web.log I noticed that there was an error relating to the LDAP plugin (2.2.0.608).

    ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube org.sonar.plugins.ldap.LdapException: The property 'ldap.url' is empty and no realm configured to try auto-discovery.

Updating the sonar.properties file with the correct configuration allowed SonarQube to start.




回答4:


The reason could be the port number of sonarQube OR the one of elasticSearch instance used by sonarQube (I had a similar problem before), so the step to change both/one of those ports are :

  1. Go to this folder: sonarqube-x.x\conf
  2. Open this file: sonar.properties
  3. For sonarQube port:
  • Find: #sonar.web.port
  • Change the value from 9000 to another port, like 9123; and un-comment the line (remove # in the beginning) sonar.web.port=9123
  1. For sonarQube's elasticSearch instace port:
  • Find: #sonar.search.port
  • change this line To sonar.search.port=0 (this means that he will search for any available port and bind it)
  1. Save your changes
  2. Start again your sonarqube

Access to the server with the new specified sonarQube-port: http://localhost:9123



来源:https://stackoverflow.com/questions/47294700/sonarqube-exception-caught-on-transport-layer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!