This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Need better info message when enable-secure-admin needed on remote server | ||
---|---|---|---|
Product: | serverplugins | Reporter: | Jiri Skrivanek <jskrivanek> |
Component: | GlassFish | Assignee: | TomasKraus |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | vkraemer |
Priority: | P3 | ||
Version: | 7.2 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Jiri Skrivanek
2012-02-14 09:45:40 UTC
i can reproduce this. Will take care of this after Tooling SDK will be finished. org.netbeans.modules.glassfish.common.CommonServerSupport.isReady and also __locations admin command will be moved to this new library so we should verify this scenario using this new code anyway. Assigning to myself. Yes, this is problem also in 7.3 - popup window says nothing. Problem is in command runner output which returned empty message. I did some deep investigation to see how to verify that server is running with secure admin (HTTPS listener) disabled. Actual code distinguish local and remote server. Local server has domain directory set while remote has not. * Local server query uses HTTP first and if secure admin is enabled, it's redirected to HTTPS. * Remote server query uses HTTPS. And here is the problem when there is no HTTPS listener listener enabled. Connect is trying to do some SSL handshake but it ends up waiting on socket read for 5 minutes. After that SSL handshake exception is thrown. There is also another timeout in [CommonServerSupport].isReallyRunning() method which is 30 seconds only. With remote server and HTTPS listener disabled [HttpsURLConnection].connect() call is blocked on soclet read for 5 minutes but this task is killed with java.util.concurrent.TimeoutException after 30 seconds. Unfortunately this timeout has 2 possible meainings: * server is not responding at all (probavbly not running) * there is an issue with SSL handshake because of HTTPS listener is not enabled And there is no way to verify which option is the right one with current framework (sun.net.www.protocol.https.HttpsURLConnectionImpl) being used. I have only 2 options: * Raise __locations command timeout to be longer than HttpsURLConnection].connect() timeout -> more than 5 minutes. * Display error message pointing to both possible problems - server not responding or secure administration was not enabled I have some idea how to resolve it in much better way but it would require large changes in admin commands execution framework. Unfortunately this is not possible in 7.3. Vince, Jiri, if you have a chance to read this comment, please let me know which option sounds better to you. Is there a way to just see if the port is occupied... not http/https... just not connection refused. If so... Keep the shorter __locations timeout. After the timeout, use this 'is the port occupied' test to determine if something is on that port. If the port is completely empty, then give the server not running message OTHERWISE print the 'did you enable-secure-admin' message There is a slight possibility that there is something that isn't GF running on the port... I do not think we need to dig that deep though. Remote port availability test means to try TCP/IP connect. It depends if we'll get ICMP or TCP RST back or there will be just black hole. I have no idea what's default timeout here in Java but it may be around minutes again. I can cut in in some 15 seconds saying there is nothing listening so user will have response in 45 seconds in worst case. First of all I changed content of popup window which contains just server name. Now it should say much more about exception that was thrown in command runner. Integrated into 'main-golden', will be available in build *201210100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/38d3e8f59863 User: Tomas Kraus <TomasKraus@netbeans.org> Log: #208376 - Popup window should display better messages. NetBeans web-main: ------------------ changeset: 236592:bf00d0871844 summary: #20837 - Complete isReady() method refactoring, added admin port check and missing enable-secure-admin command warning This will introduce missing info dialog again. I also did complete isReady() method refactoring to split it into more methods and added a lot of javadocs there. Hope it will be more human readable now. Unfortunately isReady() method is still quite long. I would like to rewrite this code from scratch in next releae to run all those port checks and admin commands in parallel and make significant total timeout decrease. Pushed to web-main, closing this bug. NetBeans web-main: ------------------ changeset: 237538:cf3edeac6ae9 summary: #208376 - enable-secure-admin info message will show for remote server only This message makes no sense for local server where secure admin is not required. Integrated into 'main-golden', will be available in build *201210300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/cfe386de862e User: Tomas Kraus <TomasKraus@netbeans.org> Log: #208376 - Info message makes sense only for remote servers. |