List Info

Thread: Re: Hostname problem when starting JB AS TRUNK




Re: Hostname problem when starting JB AS TRUNK
user name
2007-10-11 10:21:05
OK, I just verified and this is explicitly disallowed in the
JDK version 
of JMXSerivceURL (IMO a bug). It is however allowed in URL.

The JBoss implementation of JMXServiceURL does allow it, so
the problem 
is that it is not in endorsed libs.

-Jason

Jason T. Greene wrote:
> No escaping should be needed. The JDK allows
underscores in hostnames. 
> In reality there is nothing wrong with them, they just
aren't allowed in 
> DNS.
> 
> Tim Fox wrote:
>>
>>
>> Dimitris Andreadis wrote:
>>> Am I missing the point, or this is JDK code
being executed 
>>> (javax.management...). How escaping the
hostname could help?
>>
>> AFAICT the string is just a JMX service name, it
doesn't *have to* 
>> contain the actual hostname AFAICT:
>>
>> String serviceURL = "service:jmx:rmi://"
+ bindAddress + 
>> "/jndi/rmi://" + bindAddress +
":" + registryPort + jndiPath;
>>
>> So should be to escape it before passing it to the
JDK code.
>>
>> Maybe someone from the remoting team should
comment, since this is 
>> remoting code...
>>
>>>
>>> java.net.MalformedURLException: Bad URL path: 
>>>
_laptop/jndi/rmi://tims_laptop:1090/jmxconnector
>>>         at 
>>>
javax.management.remote.JMXServiceURL.validate(JMXServiceURL
.java:348)
>>>         at 
>>>
javax.management.remote.JMXServiceURL.<init>(JMXServic
eURL.java:208)
>>>         at 
>>>
org.jboss.mx.remoting.service.JMXConnectorServerService.star
t(JMXConnectorServerService.java:106) 
>>>
>>>
>>> This looks like a non-issue to me. Better
change your hostname 
>>>
>>> Tim Fox wrote:
>>>> I'm not familiar with that code, but I'm
assuming that whoever is 
>>>> generating the URLs should be able to
escape any occurences of '_' 
>>>> pretty easily....
>>>>
>>>>
>>>> Dimitris Andreadis wrote:
>>>>> So, is this a JDK problem, or not?
>>>>>
>>>>>
_______________________________________________
>>>>> jboss-development mailing list
>>>>> jboss-developmentlists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/jboss-develop
ment
>>>>
>>>
_______________________________________________
>>> jboss-development mailing list
>>> jboss-developmentlists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-develop
ment
>>
> 
> 


-- 
Jason T. Greene
JBoss, a division of Red Hat
_______________________________________________
jboss-development mailing list
jboss-developmentlists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-develop
ment

Re: Hostname problem when starting JB AS TRUNK
user name
2007-10-13 01:43:51
Sorry, I wasn't following this thread.&nbsp; Mostly, I'm going to plead ignorance - I've never touched JBoss jmx-remoting.  However, Jason seems to be on the right track.&nbsp; The line numbers in Tim's stack trace don't match the JBoss implementation of javax.management.remote.JMXServiceURL.

-Ron

Jason T. Greene wrote:
redhat.com" type="cite">OK, I just verified and this is explicitly disallowed in the JDK version of JMXSerivceURL (IMO a bug). It is however allowed in URL.

The JBoss implementation of JMXServiceURL does allow it, so the problem is that it is not in endorsed libs.

-Jason

Jason T. Greene wrote:
No escaping should be needed. The JDK allows underscores in hostnames. In reality there is nothing wrong with them, they just aren't allowed in DNS.

Tim Fox wrote:


Dimitris Andreadis wrote:
Am I missing the point, or this is JDK code being executed (javax.management...). How escaping the hostname could help?

AFAICT the string is just a JMX service name, it doesn't *have to* contain the actual hostname AFAICT:

String serviceURL = "service:jmx:rmi://" + bindAddress + "/jndi/rmi://" + bindAddress + ":" + registryPort + jndiPath;

So should be to escape it before passing it to the JDK code.

Maybe someone from the remoting team should comment, since this is remoting code...


java.net.MalformedURLException: Bad URL path: _laptop/jndi/rmi://tims_laptop:1090/jmxconnector
 &nbsp;   ; &nbsp; at javax.management.remote.JMXServiceURL.validate(JMXServiceURL.java:348)
 &nbsp;   ; &nbsp; at javax.management.remote.JMXServiceURL.&lt;init>(JMXServiceURL.java:208)
 &nbsp;   ; &nbsp; at org.jboss.mx.remoting.service.JMXConnectorServerService.start(JMXConnectorServerService.java:106)

This looks like a non-issue to me. Better change your hostname

Tim Fox wrote:
I'm not familiar with that code, but I'm assuming that whoever is generating the URLs should be able to escape any occurences of '_' pretty easily....


Dimitris Andreadis wrote:
So, is this a JDK problem, or not?

_______________________________________________
jboss-development mailing list
lists.jboss.org">jboss-developmentlists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-development

_______________________________________________
jboss-development mailing list
lists.jboss.org">jboss-developmentlists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-development






--
JBoss, a Division of Red Hat
"My company's smarter than your company."
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )