提交 2d3972eb 编写于 作者: D dsamersoff

8014420: Default JDP address does not match the one assigned by IANA

Summary: JDP protocol defaults changed to IANA assigned values
Reviewed-by: dholmes, jbachorik, hirt
Contributed-by: fweimer@redhat.com
上级 7a23cad9
...@@ -77,7 +77,7 @@ public class Agent { ...@@ -77,7 +77,7 @@ public class Agent {
private static final String SNMP_ADAPTOR_BOOTSTRAP_CLASS_NAME = private static final String SNMP_ADAPTOR_BOOTSTRAP_CLASS_NAME =
"sun.management.snmp.AdaptorBootstrap"; "sun.management.snmp.AdaptorBootstrap";
private static final String JDP_DEFAULT_ADDRESS = "239.255.255.225"; private static final String JDP_DEFAULT_ADDRESS = "224.0.23.178";
private static final int JDP_DEFAULT_PORT = 7095; private static final int JDP_DEFAULT_PORT = 7095;
// The only active agent allowed // The only active agent allowed
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
* *
* - `INSTANCE_NAME` -- The user-provided name of the running instance * - `INSTANCE_NAME` -- The user-provided name of the running instance
* *
* The protocol sends packets to 239.255.255.225:7095 by default. * The protocol sends packets to 224.0.23.178:7095 by default.
* *
* The protocol uses system properties to control it's behaviour: * The protocol uses system properties to control it's behaviour:
* - `com.sun.management.jdp.port` -- override default port * - `com.sun.management.jdp.port` -- override default port
......
...@@ -44,6 +44,9 @@ _lockFileName="JdpDoSomething.lck" ...@@ -44,6 +44,9 @@ _lockFileName="JdpDoSomething.lck"
_logname=".classes/output.txt" _logname=".classes/output.txt"
_last_pid="" _last_pid=""
_ip="224.0.23.178"
_port="7095"
_jmxport="4545"
_do_compile(){ _do_compile(){
# If the test run without JTReg, we have to compile it by our self # If the test run without JTReg, we have to compile it by our self
...@@ -68,7 +71,7 @@ _do_compile(){ ...@@ -68,7 +71,7 @@ _do_compile(){
if [ ! -f ${_testclasses}/JdpDoSomething.class -o ! -f ${_testclasses}/JdpClient.class -o ! -f ${_testclasses}/JdpUnitTest.class ] if [ ! -f ${_testclasses}/JdpDoSomething.class -o ! -f ${_testclasses}/JdpClient.class -o ! -f ${_testclasses}/JdpUnitTest.class ]
then then
echo "ERROR: Can't compile" echo "ERROR: Can't compile"
exit -1 exit 255
fi fi
} }
...@@ -84,10 +87,10 @@ _app_start(){ ...@@ -84,10 +87,10 @@ _app_start(){
npid=`_get_pid` npid=`_get_pid`
if [ "${npid}" = "" ] if [ "${npid}" = "" ]
then then
echo "ERROR: Test app not started" echo "ERROR: Test app not started. Please check machine resources before filing a bug."
if [ "${_jtreg}" = "yes" ] if [ "${_jtreg}" = "yes" ]
then then
exit -1 exit 255
fi fi
fi fi
} }
...@@ -115,8 +118,8 @@ _testme(){ ...@@ -115,8 +118,8 @@ _testme(){
${TESTJAVA}/bin/java \ ${TESTJAVA}/bin/java \
-cp ${_testclasses} \ -cp ${_testclasses} \
$* \ $* \
-Dcom.sun.management.jdp.port=7095 \ -Dcom.sun.management.jdp.port=${_port} \
-Dcom.sun.management.jdp.address=239.255.255.225 \ -Dcom.sun.management.jdp.address=${_ip} \
JdpClient JdpClient
} }
...@@ -139,8 +142,8 @@ test_01(){ ...@@ -139,8 +142,8 @@ test_01(){
_echo "**** Test one ****" _echo "**** Test one ****"
_app_start JdpUnitTest \ _app_start JdpUnitTest \
-Dcom.sun.management.jdp.port=7095 \ -Dcom.sun.management.jdp.port=${_port} \
-Dcom.sun.management.jdp.address=239.255.255.225 \ -Dcom.sun.management.jdp.address=${_ip} \
-Dcom.sun.management.jdp.pause=5 -Dcom.sun.management.jdp.pause=5
res=`_testme` res=`_testme`
...@@ -162,10 +165,10 @@ test_02(){ ...@@ -162,10 +165,10 @@ test_02(){
_echo "**** Test two ****" _echo "**** Test two ****"
_app_start JdpDoSomething \ _app_start JdpDoSomething \
-Dcom.sun.management.jdp.port=7095 \ -Dcom.sun.management.jdp.port=${_port} \
-Dcom.sun.management.jdp.address=239.255.255.225 \ -Dcom.sun.management.jdp.address=${_ip} \
-Dcom.sun.management.jdp.pause=5 \ -Dcom.sun.management.jdp.pause=5 \
-Dcom.sun.management.jmxremote.port=4545 \ -Dcom.sun.management.jmxremote.port=${_jmxport} \
-Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.ssl=false
...@@ -190,10 +193,10 @@ test_03(){ ...@@ -190,10 +193,10 @@ test_03(){
_app_start JdpDoSomething _app_start JdpDoSomething
_jcmd ManagementAgent.start\ _jcmd ManagementAgent.start\
jdp.port=7095 \ jdp.port=${_port} \
jdp.address=239.255.255.225 \ jdp.address=${_ip} \
jdp.pause=5 \ jdp.pause=5 \
jmxremote.port=4545 \ jmxremote.port=${_jmxport} \
jmxremote.authenticate=false \ jmxremote.authenticate=false \
jmxremote.ssl=false jmxremote.ssl=false
...@@ -217,7 +220,7 @@ test_04(){ ...@@ -217,7 +220,7 @@ test_04(){
_app_start JdpDoSomething \ _app_start JdpDoSomething \
-Dcom.sun.management.jmxremote.autodiscovery=true \ -Dcom.sun.management.jmxremote.autodiscovery=true \
-Dcom.sun.management.jmxremote.port=4545 \ -Dcom.sun.management.jmxremote.port=${_jmxport} \
-Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.ssl=false
...@@ -243,7 +246,7 @@ test_05(){ ...@@ -243,7 +246,7 @@ test_05(){
_jcmd ManagementAgent.start\ _jcmd ManagementAgent.start\
jmxremote.autodiscovery=true \ jmxremote.autodiscovery=true \
jmxremote.port=4545 \ jmxremote.port=${_jmxport} \
jmxremote.authenticate=false \ jmxremote.authenticate=false \
jmxremote.ssl=false jmxremote.ssl=false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册