Skip to main content

Glassfish 3.0.1 and Netbeans 6.9 - How to deploy to remote Server?

21 replies [Last post]
nabizamani
Offline
Joined: 2005-05-08
Points: 0

Hi,

"Ease of use" is important for any developer. And I am missing a Deploy mechanism to a remote Glassfish Server. Or am I just wrong and Netbeans is already supporting this feature?

I have already added a remote server, but Netbeans cannot handle it...

Any hints?

Thanks,
Nabi

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
thetrash
Offline
Joined: 2010-12-09
Points: 0



Ensure that both versions match. Glassfish version on server must be the same than version on the client.

It makes a difference whether you installed the client version using the installer and the server version using the zip-file.

Therefore: if you have trouble: Download the same glassfish version as on the server and use the same deployment package (ml,zip,msi, etc).

This solved my issue temporarily

Had glassfish MSI on client and glassfish zip on server. After downloading the .zip version to the client it worked. versions hab been the same before.
After this it worked for a while. Then it stopped working again. After I refresh the server it workes for a short time... :(((

nabizamani
Offline
Joined: 2005-05-08
Points: 0

Could you find out anything?

vbkraemer
Offline
Joined: 2003-09-03
Points: 0
shahid_raza
Offline
Joined: 2010-07-19
Points: 0

1. Close Netbeans IDE and all running servers.
2. Open command proompt and Run Derby Database manually as
$ asadmin --host 193.10.55.200 --port 1527 start-database
(You should be in glassfish->bin directory)
3. Run glassfish server as
$ asadmin --host 193.10.55.200 --port 4848 start-domain domain1
(Here 193.10.65.200 can be replaced with any hostname or IP address)
4. Now, open Netbeans. Open services tab on left. Right click on server and click Add Server. Add a Remote Server with above IP address and port. I will be added.
5. Try to start this new added server. You cannot do so as the start button is disabled. Now right click on it and click Refresh. You will see that the Server node is now expandable and it may contain some object.
6. Clean, Build, and Run you project. The server is running and your project is deployed. Access your project from anywhere in the world.
7. If you later want to stop the database or glassfish server, use following commands, respectively.
$ asadmin --host 193.10.55.200 --port 1527 stop-database
$ asadmin --host 193.10.55.200 --port 4848 stop-domain
8. Enjoy

Message was edited by: shahid_raza

lft
Offline
Joined: 2010-04-07
Points: 0

And what if i don't use Derby Database. And is 1527 port is secure ?

Message was edited by: lft

nabizamani
Offline
Joined: 2005-05-08
Points: 0

Hi,

I suggest to wait a little more. Although I did not try the hint with the derby db I don'tthink this could be a reason.

The current status on this thread is:
- jclingan could reproduce the issue and I hope he forwarded it to the right people as he mentioned (see above).

- vbkraemer obviously could also reproduce the issue and he opened a bug at http://netbeans.org/bugzilla/show_bug.cgi?id=188799
The current status seems to be fixed - and the fix is mentioned to be available in some nightly build.

I will wait until my netbeans offers and update. As soon as I see the problem is really fixed, I will let you guys know it over here.

Please also post any news or problems you face regarding this issue.

Thanks,
Nabi

Message was edited by: nabizamani

vbkraemer
Offline
Joined: 2003-09-03
Points: 0

Hi,

While you are welcome to wait for an update that includes the fix, the fix may not be the correct one... since I may have reproduced a problem that LOOKS LIKE the issue you are running into, but ISN'T the issue that you are running into.

If the fix doesn't get verified by somebody, the code will not get pushed into a 6.9 update release. It will ship at the next major release of NetBeans. There isn't a real schedule for when that release will ship at this point.

vbk

j_f_k
Offline
Joined: 2010-07-18
Points: 0

Hello, a face the same problem - using NetBeans 6.9 and Glassfish 3.0.1. When security is disabeled, i can run the project in Netbeans (start GlassFish) without any problems. But if I enable security on adminlistener - getting lots of errors on Netbeans.

lft
Offline
Joined: 2010-04-07
Points: 0

Hi, did you resolve this problem? I faced the same limitation of netbeans (6.9) deployment tool when migrating to secure console. Previously I used not secure console.

nabizamani
Offline
Joined: 2005-05-08
Points: 0

Hi,

no, I am still facing the same problem. Unfortunately nobody from the Netbeans or Glassfish guys feel responsible for this problem or for this thread!

I mean come on guys - 699 people have watched this thread so far!!!!
Isn't that worth to help a little more?????

To make it clear: this thread is not solved yet!

jclingan
Offline
Joined: 2003-06-12
Points: 0

I duplicated this problem using NetBeans 6.9 and a remote GlassFish 3 server. I'll let the plugin developers know.

John Clingan
Oracle Principal Product Manager

vbkraemer
Offline
Joined: 2003-09-03
Points: 0

I opened a bug at http://netbeans.org/bugzilla/show_bug.cgi?id=188799.

It looks like the issue being described in this thread.

There is info on how to get a nightly build that includes the fix in the issue...

vbk

jclingan
Offline
Joined: 2003-06-12
Points: 0

Thanks Vince!

Ludovic Champenois

On 6/19/10 2:17 PM, glassfish@javadesktop.org wrote:
> Hi,
>
> "Ease of use" is important for any developer. And I am missing a Deploy mechanism to a remote Glassfish Server. Or am I just wrong and Netbeans is already supporting this feature?
>
> I have already added a remote server, but Netbeans cannot handle it...
>
Cannot handle it?
Yes, it can... What do you really see? Which error? How did you register
this remote server? Which server version? Is it up and running?
Ludo
> Any hints?
>
> Thanks,
> Nabi
> [Message sent by forum member 'nabizamani']
>
> http://forums.java.net/jive/thread.jspa?messageID=474954
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

nabizamani
Offline
Joined: 2005-05-08
Points: 0

Hi,

cool, then I must definitely be doing something wrong.

What I use:
- Mac OS 10.6 with latest updates installed on my local machine
- Netbeans 6.9 + Glassfish 3.0.1 (local installation ==> works fine)
- Glassfish 3.0.1 Remote Server on Ubuntu Server (Hardy)
- Ubuntu Firewall is open
- Remote Port is 4848 and only accessable via https

Here is what I try in detail in Netbeans for setting up the Remote Server:
1. Choose Tools -> Servers in the menu bar
2. Click on "Add Server..." button
3. Choose "Glassfish Server 3" in the opening dialog
4. Click on "next" button
5. Choose the local installation location of the local Glassfish 3.0.1 installation (for me: "/Applications/NetBeans/glassfish-3.0.1")
6. Click on "next" button
7. Choose radio button "Register Remote Domain"
8. Enter the remote hostname: (i.e, mydomain.com)
9. Enter the corresponding admin port (i.e. 4848)
10. now click on "finish" button

After this I can see the following in my Server list for the Server I just added:
- Location : "mydomain.com:8080"
- Domain Folder : ""
- Domain Name : ""
- Checkboxes set: "Preserver Sessions Across Redeployment" (editable checkbox) + "Enable JDBC Driver Deployment" (non editable checkbox), all other checkboxes are disabled and not set

As you see both Domain Folder and Domain Name is empty.
Furthermore I cannot change any of Location, Domain Folder or Domain Name settings anymore (==> non editable fields).

Now I should actually be able to connect to the server, start it, stop it, etc.
What I do to test this:

11. Go to the "Services" tab on the left sinde of Netbeans IDE
12. Open the "Servers" list (as I see my remote Glassfish server I just added is listed besides my local Glassfish server)
13. Right-Click on the remote Server:
- Start, Stop, Restart, etc. is disabled ==> I cannot start it from Netbeans
- Refresh is enabled, but doesn't change anything
- Clicking on "View Admin Console" leads to the message: "The server must be running for this actoin to succeed."
- In the properties I cannot change anything (see above)

So what to do now? It seems Netbeans cannot establish any connection to my remote server. Netbeans did not even ask for my admin credentials for the remote server. How should it then be able to connect?

If I choose the remote server I added in my Project settings under "Run" and try to run/deploy my application afterwards I get the following message:

[i]"Deployment error:
Starting of server GlassFish Server 3 (1) is not supported. Please, start the server manually.
See the server log for details.
BUILD FAILED (total time: 0 seconds)"
[/i]

Do you see anything I am doing wrong?
I think this might be an issues for Netbeans on Mac OS...

Thanks,
Nabi

Ludovic Champenois

On 6/20/10 12:25 AM, glassfish@javadesktop.org wrote:
> Hi,
>
> cool, then I must definitely be doing something wrong.
>
> What I use:
> - Mac OS 10.6 with latest updates installed on my local machine
> - Netbeans 6.9 + Glassfish 3.0.1 (local installation ==> works fine)
> - Glassfish 3.0.1 Remote Server on Ubuntu Server (Hardy)
> - Ubuntu Firewall is open
> - Remote Port is 4848 and only accessable via https
>
> Here is what I try in detail in Netbeans for setting up the Remote Server:
> 1. Choose Tools -> Servers in the menu bar
> 2. Click on "Add Server..." button
> 3. Choose "Glassfish Server 3" in the opening dialog
> 4. Click on "next" button
> 5. Choose the local installation location of the local Glassfish 3.0.1 installation (for me: "/Applications/NetBeans/glassfish-3.0.1")
> 6. Click on "next" button
> 7. Choose radio button "Register Remote Domain"
> 8. Enter the remote hostname: (i.e, mydomain.com)
> 9. Enter the corresponding admin port (i.e. 4848)
> 10. now click on "finish" button
>
> After this I can see the following in my Server list for the Server I just added:
> - Location : "mydomain.com:8080"
> - Domain Folder : ""
> - Domain Name : ""
> - Checkboxes set: "Preserver Sessions Across Redeployment" (editable checkbox) + "Enable JDBC Driver Deployment" (non editable checkbox), all other checkboxes are disabled and not set
>
> As you see both Domain Folder and Domain Name is empty.
> Furthermore I cannot change any of Location, Domain Folder or Domain Name settings anymore (==> non editable fields).
>
> Now I should actually be able to connect to the server, start it, stop it, etc.
> What I do to test this:
>
> 11. Go to the "Services" tab on the left sinde of Netbeans IDE
> 12. Open the "Servers" list (as I see my remote Glassfish server I just added is listed besides my local Glassfish server)
> 13. Right-Click on the remote Server:
> - Start, Stop, Restart, etc. is disabled ==> I cannot start it from Netbeans
> - Refresh is enabled, but doesn't change anything
> - Clicking on "View Admin Console" leads to the message: "The server must be running for this actoin to succeed."
> - In the properties I cannot change anything (see above)
>
> So what to do now? It seems Netbeans cannot establish any connection to my remote server. Netbeans did not even ask for my admin credentials for the remote server. How should it then be able to connect?
>
> If I choose the remote server I added in my Project settings under "Run" and try to run/deploy my application afterwards I get the following message:
>
> [i]"Deployment error:
> Starting of server GlassFish Server 3 (1) is not supported. Please, start the server manually.
> See the server log for details.
> BUILD FAILED (total time: 0 seconds)"
>
Can you confirm the remote server is up and running (for ex, try to
access its admin gui remotely.
NetBeans cannot start remote servers for obvious reasons.
Also, how did you configure https access on the remote server?
Ludo
> [/i]
>
> Do you see anything I am doing wrong?
> I think this might be an issues for Netbeans on Mac OS...
>
> Thanks,
> Nabi
> [Message sent by forum member 'nabizamani']
>
> http://forums.java.net/jive/thread.jspa?messageID=474995
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

nabizamani
Offline
Joined: 2005-05-08
Points: 0

> Can you confirm the remote server is up and running
> (for ex, try to
> access its admin gui remotely.
> NetBeans cannot start remote servers for obvious
> reasons.
> Also, how did you configure https access on the
> remote server?
> Ludo

Yes, i can definitely confirm the remote Glassfish Server is definitely running. The firewall on the remote Server is also open. I can login to the admin gui via browser by typing https://www.mydomain.com:4848 ==> works just fine! I can easily login to the admin gui by using my admin credentials.

How I enabled https:
After login to the admin gui I have activated the security checkbox for the admin-listener. I don't see anything I did wrong here. I have also changed the "s1as" cert in order to use my own cert (see below) for https. But even changing this back to s1as doesn't help at all.
I have also tried deactivating https on the remote glassfish server for the admin-listener ==> then I can still (of course) login via browser, but in Netbeans I still have the same issue (nothing changed).

Here is another Thread I opened regarding the CipherSuites in Glassfish: http://forums.java.net/jive/message.jspa?messageID=474952#474952
There I have described how I created my own https cert.

Nabi

ana.peric
Offline
Joined: 2011-03-03
Points: 0

Hi All,
I'm facing the same problems.
I have NetBeans 6.9.1 and Glassfish 3.0.1 running on Centos 5.4.
I definatelly have connection ty http://myServerIP:4848, but I can not connect to Glassfish server from Netbeans, nor deploy my project to remote server...
BR,
Ana

ana.peric
Offline
Joined: 2011-03-03
Points: 0

Hi All,
I'm facing the same problems.
I have NetBeans 6.9.1 and Glassfish 3.0.1 running on Centos 5.4.
I definatelly have connection ty http://myServerIP:4848, but I can not connect to Glassfish server from Netbeans, nor deploy my project to remote server...
BR,
Ana

709 Guest
Offline
Joined: 2011-03-30
Points: 0

Hi,

this is a known bug. I have opened a ticket at
http://java.net/jira/browse/GLASSFISH-12889 which has been fixed with FGF 3.1
So my suggestion is to updrage to GF 3.1.
Maybe you sould also try with Netbeans 7.
Nabi

--

[Message sent by forum member 'nabizamani']

View Post: http://forums.java.net/node/704432

nabizamani
Offline
Joined: 2005-05-08
Points: 0

Hi,
this is a known bug. A ticket at http://java.net/jira/browse/GLASSFISH-12889 has been opened (see above) and it has been fixed with GF 3.1
Unfortunately i cannot tell you anything about the status of the ticket.

Can anyone else answer?

Nabi