java - rmi 注册表绑定(bind)问题

标签 java rmi distribution distributed-system rmiregistry

我在 IP 为 192.168.133.2 的虚拟机(运行 Windows XP)上运行 RMI Regitry 并尝试绑定(bind) RMI 服务器(在不同的 vm XP IP 上运行:192.168.133.3) 通过使用此代码:

Naming.rebind("//192.168.133.2/rmi.2", new RMI());

在哪里

public class RMI extends UnicastRemoteObject

但我得到了这个异常(exception):

    java.rmi.AccessException: Registry.Registry.rebind disallowed; origin /192.168.133.3 is non-local host

我认为 RMI 注册表不接受任何不在同一服务器上运行的 rmi 服务器 RMI Registry运行机。

但是如何让这个注册表接受我的 rmi 服务器呢?

p.s:我使用 JBuilder X 作为 IDE。

I'm trying to implement a mobile agent which will run on some rmi servers to do some work on them and return the results to the starting station so RMI servers implements the environment that hosts this agent to do its work and send it to the next station which it'll locate through the registry

最佳答案

trying to bind an RMI server (running on different vm XP IP: 192.168.133.3)

停在那里。你不能那样做。您只能将 RMI 服务器绑定(bind)到与执行绑定(bind)的代理在同一主机上运行的注册表。

请注意,这并不一定意味着与运行远程对象本身的主机相同。例如,客户端可以查找远程注册表并将检索到的 stub 绑定(bind)到本地注册表。但是您不能将任何内容绑定(bind)到远程注册表。

关于java - rmi 注册表绑定(bind)问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13849277/

相关文章:

java - Hibernate OneToMany 关系是 PersistentBag 而不是 List

ios - iOS:临时配置

java - 导航 View : Mark menu as dirty

java - 如何让数组中的所有卡片都显示出来?

java - Java 静态方法没有 RMI

python - scipy中通过mean和std对负二项式进行参数化

tensorflow - 伯努利样本的梯度

java - 使用 Apache POI 在 Word 表中使用单倍行距

java - 按 Enter 键后 Eclipse 向导关闭

没有 RMI 注册表的 Java RMI