在weblogic 11g中设置首选监听地址

发布于 2024-11-07 20:57:16 字数 348 浏览 5 评论 0原文

我有一个 WebLogic 11g 域,其中有 1 台管理服务器和 4 台托管服务器在 2 台计算机上运行。每台机器都有 3 个 IP 地址,但另一台机器只能看到其中一个地址。每台机器都运行一个节点管理器,它似乎在彼此和管理服务器之间通信良好。尽管当托管服务器在第二台计算机上启动时,它无法与管理服务器通信,因为它使用了错误的 IP 地址。看起来,当 weblogic 启动时,它会将自身映射到所有 IP 地址,但选择了错误的第一个 IP 地址(即默认值)。这就是托管服务器从节点管理器收到错误信息的原因。

有没有办法在 weblogic 11g 中设置首选监听地址,但仍然允许它监听所有其他地址? weblogic如何获取ip地址列表?它们的顺序取决于操作系统吗?

I have a WebLogic 11g domain with 1 admin server and 4 managed servers running on 2 machines. Each machine has 3 ip addresses, but only one of those addresses is seen by another machine. Each machine is running a node manager which seems to communicate fine between each other and admin server. Though when managed server starts on the second machine it can't communicate to admin server because it uses wrong ip address. It appears that when weblogic starts it maps itself to all ip addresses, but selects wrong one as the first one i.e. default. That's why managed servers recieve wrong information from node manager.

Is there a way to set preffered listen address in weblogic 11g, but still allow it to listen to all other addresses either? How does weblogic get list of ip addresses? Is the order of them OS-dependent?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无所谓啦 2024-11-14 20:57:16

是否回答了问题?我相信如果您使用 /etc/sysconfig 中的脚本,您将影响加载顺序,从而影响枚举顺序。我必须承认,我这里没有 RH 盒子来证实这一怀疑。

Does this answer the question? I believe if you play with the scripts in /etc/sysconfig, you'll affect the loading order and thence the enumeration order. I must admit, I don't have a RH box here to confirm that suspicion.

鹿童谣 2024-11-14 20:57:16

Weblogic 使用 NetworkInterface.getNetworkInterfaces( ) 方法和他自己的逻辑来设置监听地址的顺序。此逻辑从 10.3.2 更改为 10.3.4。

相关代码在weblogic.jar中weblogic.server.channels.AddressUtils$AddressMaker类的getAllAddresses方法中,

可以通过简单的测试来查看顺序:

import java.net.*;
import weblogic.server.channels.*;

public class TestIP_WLS {

    public static void main(String args[]) throws UnknownHostException {
        System.out.println("=== AddressUtils.getIPAny()");
        InetAddress addrs[] = AddressUtils.getIPAny();
        for (InetAddress addr : addrs) {
            System.out.println("*** " + addr);
        }
    }
}

Weblogic uses the NetworkInterface.getNetworkInterfaces() method and his own logic to set the order of the listen addresses. This logic is changed from 10.3.2 to 10.3.4.

The relevant code is in the method getAllAddresses of the class weblogic.server.channels.AddressUtils$AddressMaker in weblogic.jar

You can check the order with a simple test:

import java.net.*;
import weblogic.server.channels.*;

public class TestIP_WLS {

    public static void main(String args[]) throws UnknownHostException {
        System.out.println("=== AddressUtils.getIPAny()");
        InetAddress addrs[] = AddressUtils.getIPAny();
        for (InetAddress addr : addrs) {
            System.out.println("*** " + addr);
        }
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文