Bug 198271 - Headless deployment is broken
Headless deployment is broken
Status: NEW
Product: serverplugins
Classification: Unclassified
Component: GlassFish
7.0.1
All All
: P4 (vote)
: 7.4
Assigned To: Vince Kraemer
issues@serverplugins
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-03 08:16 UTC by Jiri Skrivanek
Modified: 2013-01-04 12:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2011-05-03 08:16:42 UTC
Headless deployment used to work for Tomcat and GlassFish servers. Now it doesn't work for anymore. To reproduce follow test specification below or these steps:

- add Tomcat or GlassFish server instance to IDE and start it
- create web application
- open system command line and go to project folder
- start 'ant run-deploy' command. It should build and deploy web application to target server but it ends with errors.

http://qa.netbeans.org/modules/webapps/promo-g/headlessdeployment/headlessdeployment.html

Product Version: NetBeans IDE Dev (Build 201105020000)
Java: 1.7.0-ea; Java HotSpot(TM) Client VM 21.0-b10
System: Windows XP version 5.1 running on x86; Cp1250; en_US (nb)
Comment 1 Petr Hejl 2011-05-03 09:19:26 UTC
Fix for tomcat: a96b2382b0a4.
Comment 2 Petr Hejl 2011-05-03 13:51:50 UTC
Project fix: eb26706b49d4.
Tomcat - better message: 8f2f1a2944df.
Comment 3 Petr Hejl 2011-05-03 13:54:14 UTC
It should now work ok for tomcat and GF. One problem I observe with GF is when I register password protected domain it always put "admin" as username in property file regardless of real value.

Perhaps it would be also nice to inform a user which property to set to configure the password.
Comment 4 Quality Engineering 2011-05-05 06:10:22 UTC
Integrated into 'main-golden', will be available in build *201105050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a96b2382b0a4
User: phejl@netbeans.org
Log: #198271 - Headless deployment is broken - tomcat
Comment 5 Vince Kraemer 2011-05-05 23:23:56 UTC
The username and password are not stored for 'v3' servers.... so the trick is to replace the BUILD FAILURE http auth message with something 'better' that can point to the 'right places'
Comment 6 Jiri Skrivanek 2011-05-09 11:30:27 UTC
For Tomcat it works only for 7.0 server. For 6.0 and 5.5 it fails on Windows XP with message:

BUILD FAILED
D:\Development\builds\nbUserdir-20110509130735\WebApplicationTomcat6.0\nbproject\ant-deploy.xml:24: taskdef class org.apache.catalina.ant.DeployTask cannot be found
 using the classloader AntClassLoader[]
Comment 7 Petr Hejl 2011-05-11 19:16:56 UTC
Tomcat fixed in web-main 2b3e139223c2.
Comment 8 Quality Engineering 2011-05-13 05:44:46 UTC
Integrated into 'main-golden', will be available in build *201105130000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2b3e139223c2
User: phejl@netbeans.org
Log: #198271 Headless deployment is broken
Comment 9 Vince Kraemer 2011-10-26 19:21:47 UTC
remaining issue is p4
Comment 10 TomasKraus 2012-11-27 15:30:10 UTC
In 7.3 it's possible to register username and password for asadmin interface in GF plugin.
When I run 'ant run-deploy' command from linux shell I'm getting following exception:

-deploy-without-pw:
     [echo] Deploying dist/WebApplication1.war
      [get] Getting: http://127.0.0.1:4848/__asadmin/deploy?path=/tmp/WebApplication1/dist/WebApplication1.war&force=true&name=WebApplication1
      [get] To: /tmp/gfv3793112050
      [get] http://127.0.0.1:4848/__asadmin/deploy?path=/tmp/WebApplication1/dist/WebApplication1.war&force=true&name=WebApplication1 moved to https://127.0.0.1:4848/__asadmin/deploy?path=/tmp/WebApplication1/dist/WebApplication1.war&force=true&name=WebApplication1
      [get] Error getting http://127.0.0.1:4848/__asadmin/deploy?path=/tmp/WebApplication1/dist/WebApplication1.war&force=true&name=WebApplication1 to /tmp/gfv3793112050

BUILD FAILED
/tmp/WebApplication1/nbproject/ant-deploy.xml:72: The following error occurred while executing this line:
/tmp/WebApplication1/nbproject/ant-deploy.xml:81: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1731)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:235)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1206)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:136)
        at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
        at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:925)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1170)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1197)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1181)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)
        at org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:660)
        at org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:684)
        at org.apache.tools.ant.taskdefs.Get$GetThread.get(Get.java:579)
        at org.apache.tools.ant.taskdefs.Get$GetThread.run(Get.java:569)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:323)
        at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:217)
        at sun.security.validator.Validator.validate(Validator.java:218)
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1185)
        ... 14 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174)
        at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
        at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:318)
        ... 20 more
Comment 11 TomasKraus 2012-11-27 15:33:51 UTC
I passed https://127.0.0.1:4848/__asadmin/deploy?path=/tmp/WebApplication1/dist/WebApplication1.war&force=true&name=WebApplication1 manually into firefox, supplied username and password and command was completed without any error:

GlassFish deploy AdminCommand command report

Exit Code : SUCCESS
Application deployed with name WebApplication1.
name 	WebApplication1
There are 1 sub operations
Comment 12 TomasKraus 2013-01-04 12:43:18 UTC
I did some changes to store admin user and password for V3. But it's not fully implemented in NetBeans 7.3 yet. Targeting to next release after full admin commands integration from GF Tooling SDK will be finished.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo