[INFRAUTILS-64] Infrautils imposes restriction on cluser hostname to be IP address Created: 28/Feb/19  Updated: 08/Mar/19  Resolved: 08/Mar/19

Status: Resolved
Project: infrautils
Component/s: diagstatus, ready
Affects Version/s: None
Fix Version/s: Fluorine-SR2

Type: Bug Priority: Medium
Reporter: Richard Kosegi Assignee: Richard Kosegi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Fluorine-SR2 (https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/opendaylight/0.9.2-SNAPSHOT/opendaylight-0.9.2-20190228.031617-1411.tar.gz)

OpenJDK Runtime Environment (build 1.8.0_201-b09)

 



 Description   

When configured hostname in akka.conf instead of IP address, infrautils' ready service fail during startup:

 

2019-02-28T08:14:18,317 | ERROR | SystemReadyService-0 | SystemReadyImpl                  | 123 - org.opendaylight.infrautils.ready-impl - 1.4.2.SNAPSHOT | Thread terminated due to uncaught exception: SystemReadyService-0
java.lang.IllegalArgumentException: 'b5400' is not an IP string literal.
        at com.google.common.net.InetAddresses.formatIllegalArgumentException(InetAddresses.java:989) ~[?:?]
        at com.google.common.net.InetAddresses.forString(InetAddresses.java:140) ~[?:?]
        at org.opendaylight.infrautils.diagstatus.MBeanUtils.isIpv6Address(MBeanUtils.java:167) ~[?:?]
        at org.opendaylight.infrautils.diagstatus.MBeanUtils.constructJmxUrl(MBeanUtils.java:72) ~[?:?]
        at org.opendaylight.infrautils.diagstatus.MBeanUtils.getJMXUrl(MBeanUtils.java:67) ~[?:?]
        at org.opendaylight.infrautils.diagstatus.MBeanUtils.startRMIConnectorServer(MBeanUtils.java:81) ~[?:?]
        at org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceMBeanImpl.lambda$onSystemBootReady$0(DiagStatusServiceMBeanImpl.java:73) ~[?:?]
        at java.util.Optional.ifPresent(Optional.java:159) [?:?]
        at org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceMBeanImpl.onSystemBootReady(DiagStatusServiceMBeanImpl.java:71) [114:org.opendaylight.infrautils.diagstatus-impl:1.4.2.SNAPSHOT]
        at org.opendaylight.infrautils.ready.internal.SystemReadyImpl.run(SystemReadyImpl.java:112) [123:org.opendaylight.infrautils.ready-impl:1.4.2.SNAPSHOT]
        at java.lang.Thread.run(Thread.java:748)

[?:?]

 

in configuration/initial/akka.conf, I just replaced "127.0.0.1" with hostname configured in /etc/hosts (it's "b5400" in my case)

 



 Comments   
Comment by Michael Vorburger [ 07/Mar/19 ]

rkosegi will you cherry-pick this from fluorine to neon and mater sodium as well?

Comment by Michael Vorburger [ 07/Mar/19 ]

> rkosegi will you cherry-pick this from fluorine to neon and mater sodium as well?

FYI it does not cherry pick (button) cleanly and needs manual work..

k.faseela FYI you may want to review this...

Comment by Richard Kosegi [ 07/Mar/19 ]

It might not be needed for Neon and master as there has been some work in MbeanUtils (like this https://github.com/opendaylight/infrautils/commit/187e2d8aa6a44cb7008fc99eb7d566c2305993a5#diff-de1a078b91618f94d928a72ff5f22de8). Let me re-test it on 0.10.0 and 0.11.0 tomorrow.

Comment by Richard Kosegi [ 08/Mar/19 ]

vorburger k.faseela I just tested against karaf-0.10.0-20190307.185404-2972.tar.gz and karaf-0.11.0-20190307.184817-460.tar.gz.

No problem observed, so I think no changes to stable/neon nor master are required.

Generated at Wed Feb 07 20:02:10 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.