如何使用Karaf进行远程连接(用于进行远程调试)? [英] How to allow remote conection with Karaf (for doing remote debugging)?

查看:343
本文介绍了如何使用Karaf进行远程连接(用于进行远程调试)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些帮助.

我有一个带有Karaf服务器和一些Java应用程序部署的vmware虚拟机.我已经用调试标志启动karaf,它打开了端口5005进行调试.

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.

我想做的是使用eclipse连接到该端口以进行远程调试,但是我总是被拒绝连接.

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

我可以使用VM IP从外部firefox访问虚拟,但是当我输入karaf端口8181时,我无法连接.

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.

您知道如何使Karaf接受远程连接吗?

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

非常感谢!

推荐答案

我发现了麻烦,那是事情的综合.

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

首先,我在VM-Ware配置中使用了桥接网络.

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

我用调试标志启动karaf.它已启用端口 5005 进行调试.它是:

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

bin/karaf debug

我的pom.xml配置了调试器标志.喜欢:

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>

最后一件事,我必须停止防火墙.对于我来说是iptables,请执行以下操作:

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

service iptables stop

执行上述所有步骤可使我成功执行Java远程调试.

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

感谢所有评论.

这篇关于如何使用Karaf进行远程连接(用于进行远程调试)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆