2016-06-03 3 views
0

В кратком: Есть ли способ настройки всех портов, используемых management-agent.jar (введена в SonarQube 5.5) или даже отключить его?Конфигурация управления агентом по SonarQube 5.5

Дополнительная информация: Я пытаюсь запустить SonarQube на OpenShift (again), на этот раз версию 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.

То, что я узнал, до сих пор является то, что

  • the agent opens three ports,
  • где два могут быть сконфигурированы (системные свойства com.sun.management.jmxremote.port и com.sun.management.jmxremote.rmi.port)
  • , но один из них является by design always the ephemeral port (port 0), который не кажется работать в OpenShift.

В дополнение к настройке портов явно разрешенного диапазона на OpenShift (порты 15000-35530), я попробовал -XX:+DisableAttachMechanism вариант без везения.

Любые идеи, как обойти это? Может ли SonarQube работать без агента?

Как воспроизвести: Создать приложение OpenShift из this, а затем изменить 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 

ответ

Смежные вопросы