How to allow remote conection with Karaf (for doing remote debugging)?

℡╲_俬逩灬. 提交于 2019-12-08 07:33:19

问题


I need some help.

I have a vmware virtual machine with a Karaf server and some java applications deployed. I've started karaf with debug flag and it opened port 5005 for debugging.

What I want to do is connect to this port with eclipse to do remote debugging, but I am always refused to connect.

I can access to the virtual from an external firefox using the VM IP, but when I enter the karaf port 8181 I'm not able to connect.

Do you know how to enable Karaf to accept remote connections?

Thanks a lot in advance!


回答1:


I've found the troubles, it was a combination of things.

First of all, I used Bridged Network in the VM-Ware configuration.

I started karaf with debug flag. It has enabled port 5005 for debugging. It is:

bin/karaf debug

My pom.xml was configured with debugger flags. Like:

<groupId>org.apache.maven.plugins</groupId>
<configuration>
  ...
  <!-- Necessary in order for the debug levels to be considered-->
  <debug>true</debug>
  <debugLevel>lines,vars,source</debugLevel>
</configuration>

And the last thing, I had to stop the firewall. In my case was iptables, doing the following:

service iptables stop

Doing all above steps allows me to perform java remote debugging successfully.

Thanks all for the comments.



来源:https://stackoverflow.com/questions/19937828/how-to-allow-remote-conection-with-karaf-for-doing-remote-debugging

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