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.

Bug 206224 - [71cat] cannot deploy to remote GF
Summary: [71cat] cannot deploy to remote GF
Status: RESOLVED DUPLICATE of bug 206946
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P2 normal with 4 votes (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-10 21:25 UTC by muellermi
Modified: 2012-02-01 21:22 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
<no description> (58.30 KB, application/octet-stream)
2011-12-10 21:26 UTC, muellermi
Details
click to readable message.log file (58.30 KB, text/plain)
2011-12-12 18:32 UTC, Vince Kraemer
Details
screenshot (6.49 KB, image/png)
2011-12-12 20:16 UTC, muellermi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description muellermi 2011-12-10 21:25:58 UTC
Product Version = NetBeans IDE 7.1 (Build 201112051121)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 21.0-b17

- Run GF on a different machine
- run "asadmin enable-secure-admin"
- Within NB add this server
- When NB asks for, enter credentials for this server, eg. "admin" and <password>
- Create Web App
- Set server to the remote one
- call deploy
--> deploy fails
- watch remote server's log:

[#|2011-12-10T21:57:44.488+0100|INFO|glassfish3.1.1|javax.enterprise.system.tools.admin.com.sun.enterprise.container.common|_ThreadID=1022;_ThreadName=Thread-2;|
User [] from host MMUELLER-PC does not have administration access|#]

- Take a look into your application settings, eg. C:\Users\mmueller\.netbeans\7.1\config\GlassFishEE6\Instances\.nbattrs
    <fileobject name="instance_2">
        <attr name="adminPort" stringvalue="4848"/>
        <attr name="debugPort" stringvalue=""/>
        <attr name="derbyStartOn" stringvalue="false"/>
        <attr name="displayName" stringvalue="GlassFish Server 3+ Win2008"/>
        <attr name="driverDeployOn" stringvalue="true"/>
        <attr name="homefolder" stringvalue="D:\GlassFish\glassfish"/>  ##### 1 #####
        <attr name="host" stringvalue="192.168.1.20"/>   ##### 2 #####
        <attr name="httphostname" stringvalue="192.168.1.20"/>   ##### 2 #####
        <attr name="httpportnumber" stringvalue="8080"/>
        <attr name="installfolder" stringvalue="D:\GlassFish"/>  ##### 1 #####
        <attr name="java.platform" stringvalue=""/>
        <attr name="jvmMode" stringvalue="normalMode"/>
        <attr name="password" stringvalue="adminadmin"/>  ##### 4 #####
        <attr name="preserveSessionsOn" stringvalue="true"/>
        <attr name="url" stringvalue="[D:\GlassFish\glassfish]deployer:gfv3ee6wc:192.168.1.20:4848"/>   ##### 3 #####
        <attr name="use.shared.mem" stringvalue="false"/>
        <attr name="useIDEProxyOn" stringvalue="true"/>
        <attr name="username" stringvalue="admin"/>
    </fileobject>

##### 1 #####
 this is a path to a local installation. NB needs this to register the server. But why can't I simply ad a server by just it's address?

##### 2 #####
remote address = name

##### 3 #####
some local and some rermote parts. Whats happening here?

##### 4 #####
regradles of the entered credentials, this is allways adminadmin, which is the former default password of GF

- Change remote GF's admin password to "adminadmin"
- Deploy again
--> same failure

It seems. NB does not deploy with the credentials the user entered.

Annoying workarround: Develop on local GF, Deploy to remote GF manually.

refer to Issue #205522
Comment 1 muellermi 2011-12-10 21:26:46 UTC
Created attachment 114024 [details]
<no description>
Comment 2 muellermi 2011-12-10 21:30:49 UTC
This proble occurs at home (local Win7 64 bit, remote win 2008 server 64 bit) as well as in my office (local win xp 32 bit, remote win 2003 64 bit)
Comment 3 Vince Kraemer 2011-12-12 15:39:03 UTC
What command do you use to deploy to remote GF? Please provide the full command?

If you are using the web admin interface, does it require that you enter 'adminadmin' or <password> at the login page?

Do you have a proxy between your PCs and the win2008 server?
Comment 4 Vince Kraemer 2011-12-12 18:09:24 UTC
Are you running a 64 bit jvm on the remote host?

Do you see a difference if you start the remote server with a 32 bit jvm?
Comment 5 Vince Kraemer 2011-12-12 18:32:24 UTC
Created attachment 114064 [details]
click to readable message.log file
Comment 6 Vince Kraemer 2011-12-12 18:33:23 UTC
how did you start the remote server?

When did you restart the remote server?

You did enter 'asadmin enable-secure-admin' on the remote machine... right?
Comment 7 muellermi 2011-12-12 20:15:14 UTC
I created a new server entry and registered a remote GF. NB then queried the credentials, see screenshot. And it does every time I start the IDE.
The remote server is running as a service. After "enable-secure-admin" I restarted the service (and did again due to windows update last days)
When I start Firefox on my local machine and connect thru admin port (4848, no proxy betwenn the machines), I don't have any problem to deploy my apps.
When I right click the project and choose "deploy", GF logs missing administrative rights. It seems, no credentials are provided.

If I'll find some time, I'll install a logging proxy to investigate the network requests.
Comment 8 muellermi 2011-12-12 20:16:02 UTC
Created attachment 114067 [details]
screenshot
Comment 9 muellermi 2011-12-12 21:48:07 UTC
Some information captured by fresh installed proxy. I don't know whether this helps...

GET /__asadmin/__locations HTTP/1.1
Content-Type: image/png
User-Agent: hk2-agent
Cache-Control: no-cache
Pragma: no-cache
Host: 192.168.1.20:4848
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Authorization: Basic YWRtaW46T25seTRtZSE=
Comment 10 Vince Kraemer 2011-12-12 22:52:20 UTC
hmm... there is an auth header in the request....

It gives 'admin:Only4me!' as its decoded value.

Is that they right password for the server?
Comment 11 Vince Kraemer 2011-12-13 04:37:26 UTC
It looks like you have NB running inside the 'Server' VM instead of the Client VM.

Is that intentional?

Do you see a different behavior if NB is started in the client vm?

Do you see different behavior if GF is started with the client vm?
Comment 12 Vince Kraemer 2011-12-13 04:59:11 UTC
I am able to deploy win7 to mac os x and mac os x to win 7... but I do not have the hardware to create a win to win test environment.

More details from you would be helpful at this point.
Comment 13 muellermi 2011-12-13 08:02:02 UTC
It seems, for the keep alive, the right credentials are submitzted to the server.
At office, I may watch the network traffic too, but I can't provide this information, cause this productive server is not only for me ;-)
How can I decode the authentication?

In my institute I tried to deploy just now. Again, this is part of the server log:
[#|2011-12-13T08:43:59.731+0100|INFO|glassfish3.1.1|javax.enterprise.system.tools.admin.com.sun.enterprise.container.common|_ThreadID=84;_ThreadName=Thread-2;|User [] from host ws45.d1inek.local does not have administration access|#]

User[]

There is no user. Might this be the interesting part? Credentials provided for keep-alive but deploy?

My VM is simply the one Oracle provides on it's web site. Maybe the 64 bit version is server by default? The server option (as VM parameter) is not set (if the file "netbeans" beside netbeans.exe in bin is the correct configuration file)
In my office, this is my VM version:
Product Version = NetBeans IDE 7.1 (Build 201112051121)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.7.0_01
Runtime = Java HotSpot(TM) Client VM 21.1-b02
as stated above, same problem
Comment 14 muellermi 2011-12-13 08:05:03 UTC
Whilst the server reported "no administration access" this had been NB's run-deploy output:

Building jar: D:\projects\RequestServices\dist\RequestServices.war
Distributing D:\projects\RequestServices\dist\RequestServices.war to [GlassFish Server 3+]
Initializing...
Error writing request body to server
D:\projects\RequestServices\nbproject\build-impl.xml:727: The module has not been deployed.
See the server log for details.
Comment 15 muellermi 2011-12-13 08:15:20 UTC
I performed an additional test:
Developers machine: XP 32 bit (my machine as before)
Server: GF 3.1 on Debian
--> same problem
Comment 16 jamest 2012-01-08 21:20:20 UTC
I'm seeing the same issue deploying from 7.1NB on OS X Lion to remote GF 3.1.1 on Linux 32bit.  NB 7.0.1 deploys fine.
Comment 17 tzcole 2012-01-20 18:52:47 UTC
I've also encountered this with NB7.1 OS X Lion to Remote GF 3.1.1 (Linux).

From Deploy Log
-----
Building jar: /Users/tzcole/NetBeans Projects/<XXXX>/dist/<XXXX>.war
Distributing /Users/tzcole/NetBeans Projects/<XXXX>/dist/<XXXX>.war to [GlassFish Server 3.1.1 - <XXX>]
Initializing...
Error writing request body to server
/Users/tzcole/NetBeans Projects/<XXXX>/nbproject/build-impl.xml:730: The module has not been deployed.
See the server log for details.
-----

From Server Log
-----
[#|2012-01-20T12:25:19.830-0600|INFO|glassfish3.1.1|javax.enterprise.system.tools.admin.com.sun.enterprise.container.common|_ThreadID=198;_ThreadName=Thread-2;|User [] from host xxx.xxx.30.9 does not have administration access|#]
-----

Cheers,
Comment 18 refc 2012-01-21 19:45:32 UTC
I have the same problem with NB 7.1 on OS X Lion to Remote GF 3.1.1 (Debian x64).

Very very annoying.
Comment 19 sroughto 2012-01-24 22:30:43 UTC
Deployment fails from Lion NB 7.1 to GF 3.1.1 on Solaris 5.10/SPARC (T5120 zone) with a 2MB war file; smaller war files succeed, browser admin console deployment succeeds. On failure, the previously deployed war file is removed (causing client 404's, of course).

Could this be related to http://java.net/jira/browse/GLASSFISH-15773.
Comment 20 sroughto 2012-01-26 05:46:30 UTC
This seems to be a regression from NB 7.0.1, as I can deploy the same war file from NB 7.0.1 to GF 3.1.1.

(In reply to comment #19)
> Deployment fails from Lion NB 7.1 to GF 3.1.1 on Solaris 5.10/SPARC (T5120
> zone) with a 2MB war file; smaller war files succeed, browser admin console
> deployment succeeds. On failure, the previously deployed war file is removed
> (causing client 404's, of course).
> 
> Could this be related to http://java.net/jira/browse/GLASSFISH-15773.
Comment 21 FienZ 2012-02-01 13:05:03 UTC
I have the same issue, works on 7.0.1, fails with 7.1. It says on the server:


[#|2012-02-01T13:49:29.864+0100|INFO|glassfish3.1.1|javax.enterprise.system.tools.admin.com.sun.enterprise.container.common|_ThreadID=32;_ThreadName=Thread-2;|Benutzer [] von Host XX.XX.XX.XX verfügt über keinen Administrationszugriff oder die Angabe
n für Benutzername und Passwort sind falsch|#]
Comment 22 Vince Kraemer 2012-02-01 21:22:19 UTC
http://netbeans.org/bugzilla/show_bug.cgi?id=206224#c14 matches the key symptom of issue 206946

*** This bug has been marked as a duplicate of bug 206946 ***