remote deployment fails when server is running on machine with DHCP
-------------------------------------------------------------------

         Key: GERONIMO-1682
         URL: http://issues.apache.org/jira/browse/GERONIMO-1682
     Project: Geronimo
        Type: Bug
  Components: deployment  
    Versions: 1.0    
 Environment: Windows 2003
    Reporter: Song ZHANG


Remote deployment failed when I used IP address of a DHCP machine.

C:\>deploy --host 9.186.64.66  --verbose deploy hello-1.0.war
......
Username: system
Password:

    Uploading 1 file(s) to server

    Error: Unable to distribute hello-1.0.war: st68rts17h

    java.net.UnknownHostException: st68rts17h

        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)

        at java.net.Socket.connect(Socket.java:478)

        at java.net.Socket.connect(Socket.java:428)

        at sun.net.NetworkClient.doConnect(NetworkClient.java:158)

        at sun.net.www.http.HttpClient.openServer(HttpClient.java:434)

        at sun.net.www.http.HttpClient.openServer(HttpClient.java:648)

        at sun.net.www.http.HttpClient.<init>(HttpClient.java:338)

        at sun.net.www.http.HttpClient.<init>(HttpClient.java:299)

        at sun.net.www.http.HttpClient.New(HttpClient.java:371)

        at sun.net.www.http.HttpClient.New(HttpClient.java:352)

        at sun.net.www.http.HttpClient.New(HttpClient.java:347)

        at 
    
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:562)

        at
    
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:539)

        at
    
org.apache.geronimo.deployment.plugin.remote.RemoteDeployUtil.connectToServer(RemoteDeployUtil.java:117)

        at
    
org.apache.geronimo.deployment.plugin.remote.RemoteDeployUtil.uploadFilesToServer(RemoteDeployUtil.java:60)

        at
    
org.apache.geronimo.deployment.plugin.remote.DistributeCommand.massageFileNames(DistributeCommand.java:41)

        at
    
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:105)

        at
    
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:59)

        at java.lang.Thread.run(Thread.java:570)

"9.186.64.66" is the DHCP ip for remote host "st68rts17h". During remote 
deployment, following steps occur in turn:
1)Local server uses URI supplied from deployer tool (that is "9.186.64.66") to 
get connector for container on remote machine;
2)Remote machine replies the connectURL to itself, which is using short 
hostname(that is "st68rts17h");
3)Local server uses URL reply from remote machine to upload application archive 
file. But "st68rts17h" is not recognized by local server, so the error happens.

That's why URI specified in deployer tool, regardless long hostname or IP 
address,  is always converted to short hostname.

So the only workaround is to manually add shortname of remote host to hosts 
file on local machine.

After I switched remote machine(running the server) to static IP and changed 
the machine name to be the same as hostname which is resolvable by DNS, this 
problem went away.

I think the logic of remote deploy need to be enhanced. Simply using URI 
specified in the command line to connect to remote server runtime(step3 as I 
mentioned above) should be much more understandable and workable.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to