[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
java.net.MalformedURLException: Bad host  XML
Forum Index -> Terracotta for Web Sessions
Author Message
vilacova

neo

Joined: 09/27/2007 00:28:48
Messages: 2
Offline

Hello!

I'm getting the following error, because "_" on my computer name. Unfortunately i can't change hostname beucase my computer is attached to a windows domain.

2007-09-26 18:13:43,138 [WorkerThread(jmxremote_connect_stage,0)] ERROR com.tc.management.remote.connect.ClientConnectEventHandler - Unable to construct a JMX service URL using DSO client channel from host[192.168.2.52:4684]; tunneled JMX connection will not be established
java.net.MalformedURLException: Bad host: "andre_cova"
at javax.management.remote.JMXServiceURL.validateHost(Unknown Source)
at javax.management.remote.JMXServiceURL.validateHost(Unknown Source)
at javax.management.remote.JMXServiceURL.validate(Unknown Source)
at javax.management.remote.JMXServiceURL.<init>(Unknown Source)
at javax.management.remote.JMXServiceURL.<init>(Unknown Source)
at com.tc.management.remote.connect.ClientConnectEventHandler.addJmxConnection(ClientConnectEventHandler.java:103)
at com.tc.management.remote.connect.ClientConnectEventHandler.handleEven

What can I do to solve this problem?

Thanks a lot
André
tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

Hi,

We'll look into this further, but as a temporary workaround I'm sure you could use the ipaddress.

On windows, type ipconfig -a to get the ipaddress of your machine.
[WWW]
vilacova

neo

Joined: 09/27/2007 00:28:48
Messages: 2
Offline

Well, but where i can setup IP? I didn't setup my hostname in no one file!
hhuynh

cherubim

Joined: 06/16/2006 11:54:06
Messages: 761
Offline

There are several bug reports to Sun regarding this problem:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5083594
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6587184

As Taylor suggested, you can use IP address in place of hostname, or "localhost" if you're testing out locally (look up "host" in tc-config.xml file)

If you ever want to change your box hostname, here is a guide:

http://comm.ncifcrf.gov/networking/dhcp/changehost.html

Hung-
ari

seraphim

Joined: 05/24/2006 14:23:21
Messages: 1665
Location: San Francisco, CA
Offline

The problem might be that our comms implementation looked up the local machine's hostname when andré doesn't expect it to?!?

So far we know that you cannot change your hostname because you do not have permissions. But as the others on this thread pointed out, we haven't seen this issue before largely because the TC client libraries are using your tc-config.xml to decide where to connect and YOU are in control of your tc-config.

If you are running your TC Server on the same machine as your app, then make sure your <servers> block says:

<servers>
...
<server host="localhost" ...
</servers>
...

If localhost doesn't work, try 127.0.0.1. Just make sure it does not say "%h". If you are running your TC Server on another host (such as andre_cova), then try using its IP as returned by ipconfig using the command prompt in Windows (as Taylor stated).


Read more about config variables here:
http://www.terracotta.org/confluence/display/docs1/Configuration+Guide+and+Reference#ConfigurationGuideandReference-ConfigurationVariables
[WWW]
teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1128
Offline

Unfortunately if the TC server is on another hosts, none of those suggestions will work. That code in question is always going to resolve the hostname (doing a reserve lookup if it is numeric IP)

That particular error isn't fatal I believe. Certain monitoring capabilities will not be available, but the your shared objects and the terracotta server should still be functional.

I'm going to look into not doing any name resolution in that code path, and I will post a followup if that change is indeed made.

In the meantime, it is maybe possible to fake out your hosts/lmhosts file to return a different name for tc server IP address. You'd then use this alternate name in your tc-config.xml

Tim Eck (terracotta engineer)
teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1128
Offline

I forget to mention this -- Underscores are not legal in DNS hostsnames. This gets problematic because windows (and the naming methods and services that go along with it) do allow underscores.

Tim Eck (terracotta engineer)
teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1128
Offline

Turns out that the hostname (or even the IP address) is completely unused in this particular context. I changed the code to not do any name resolution here

The fix is present in trunk (revision 5716 or greater). Nightly builds from trunk can be found here:

http://www.terracotta.org/confluence/display/orgsite/Download#Download-Trunk

Tim Eck (terracotta engineer)
 
Forum Index -> Terracotta for Web Sessions
Go to:   
Powered by JForum 2.1.7 © JForum Team