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

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

问题描述

我需要一些帮助.

我有一个带有 Karaf 服务器的 vmware 虚拟机和一些部署的 Java 应用程序.我已经用调试标志启动了 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天全站免登陆