Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
240 views
in Technique[技术] by (71.8m points)

java - Webstart https: works with server on certificate and not on loadbalancer

I'm trying to create a https secure connection for my Java webstart application. All I did was to configure my Tomcat to use a certificate and I was done. I could just do

"https://nsjns:8443/abc/xyz.jnlp" and it downloaded my application and worked fine.

for production, we purchased a certificate and this cert was kept on the load balancer with the actual web server behind the load balancer. If I use the browser I can see the server and can download my jnlp file by typing the url in the browser. However, I cannot execute the jnlp file using Java webstart as I get the below exception.

Java.io.IOException: Server returned HTTP response code: 503 for URL: "http://test.tec.com/abc.jnlp"
                at sun.reflect.GeneratedConstructorAccessor13.newInstance(Unknown Source)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
                at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674)
                at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1672)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1670)
                at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243)
                at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
                at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
                at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
                at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
                at com.sun.deploy.net.DownloadEngine._downloadCacheEntry(Unknown Source)
                at com.sun.deploy.cache.ResourceProviderImpl.getResourceCacheEntry(Unknown Source)
                at com.sun.deploy.cache.ResourceProviderImpl.getResourceCacheEntry(Unknown Source)
                at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
                at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
                at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
                at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
                at com.sun.javaws.Launcher.launch(Unknown Source)
                at com.sun.javaws.Main.launchApp(Unknown Source)
                at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
                at com.sun.javaws.Main.access$000(Unknown Source)
                at com.sun.javaws.Main$1.run(Unknown Source)
                at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://test.tec.com/abc.jnlp
                at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
                at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
                ... 17 more

It is resolving my url from https to http. I'm new to all this. Please help me with your ideas and suggestions. What am I missing to do?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Unlikely to have anything to do with your certificate. Try using the IP address instead of the hostname in the webstart URL.

You don't say what platform you are running webstart on, but if the IP address works then launch the webstart control panel: javaws -viewer and go to Network Settings on the Java tab. Assuming it doesn't already say so, select Direct Connection (i.e. no proxy) and tell us if it works after that.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...