Set preferred listen address in weblogic 11g
Asked Answered
D

2

0

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?

Deportation answered 19/5, 2011 at 7:21 Comment(0)
S
2

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.

Steelman answered 19/5, 2011 at 8:33 Comment(7)
No, because it will listen only to one ip address. But I stil would like it to listen to all local address, but in different order :)Deportation
Well heck if you are REALLY desperate, compile your own hardcoded implementation of the class, and use the command line prebootclass (I that's it) to load it in preference. Now THAT's a hack! :)Steelman
I'm not that desperate yet, but if it does not any other way I will have to hack.Deportation
I looked around and if you google for linux enumeration network interfaces, there is indication that the order is not very predictable but a few random suggestions popped up for editing various config files to force it.Steelman
If you update your answer with links relelvant to red hat I will vote it up :)Deportation
Gave a stab at it, O Delphi :)Steelman
I ended up configuring single listen address.Deportation
A
1

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);
        }
    }
}
Algorism answered 19/7, 2012 at 6:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.