简而言之:有没有办法配置management-agent.jar
(在SonarQube 5.5中引入)使用的所有端口,甚至禁用它?
更多信息:我正在尝试在OpenShift(again)上运行SonarQube,这次是版本5.5 / 5.6。
在启动时,我收到以下错误:Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 0; nested exception is: java.net.BindException: Permission denied
。
到目前为止我发现的是
com.sun.management.jmxremote.port
和com.sun.management.jmxremote.rmi.port
)除了在OpenShift(端口15000-35530)上明确将端口设置为允许范围外,我还没试过-XX:+DisableAttachMechanism
选项。
任何想法如何解决这个问题? SonarQube可以在没有代理的情况下工作吗?
如何重现:
从this创建一个OpenShift应用,然后在SONAR_VERSION
5.5
更改为5.6
或.openshift/action_hooks/build
完整Stacktrace
2016.06.02 16:09:34 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: java -Djava.awt.headless=true -javaagent:jre/lib/management-agent.jar -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 0; nested exception is:
java.net.BindException: Permission denied
Exception in thread "main" java.lang.reflect.InvocationTargetException
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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:384)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
Caused by: java.lang.RuntimeException: Exception thrown by the agent
at sun.management.Agent.error(Agent.java:520)
at sun.management.Agent.error(Agent.java:511)
at sun.management.Agent.startAgent(Agent.java:268)
at sun.management.Agent.agentmain(Agent.java:134)
at sun.management.Agent.premain(Agent.java:116)
... 6 more
答案 0 :(得分:1)
不幸的是,这个反馈是在5.6版LTS发布之后发布的!没有解决方法。问题在https://jira.sonarsource.com/browse/SONAR-7730引用。