Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have inherited a web-service that was written in Netbeans and runs on Glassfish (version 3) and used to talk between a Redhat server and a Windows7 machine.

These can be started manually, by using Netbeans (6.9) to start the Glassfish Server and deploy the Java script, and they communicate securely quite happily

Of course, manually deploying the system like this is far from ideal, so I have arranged for Glassfish to be deployed via the command line interface of Redhat;

  1. Create a user

    groupadd glassfish

    useradd -s /bin/bash -d /home/glassfish -m -g glassfish glassfish

  2. Copy from CD to glassfish directory

    mkdir cdrom

    chmod 777 /cdrom

    mount /dev/cd0 /cdrom

    cp glassfish-v3.zip /home/glassfish/glassfish-v3.zip

  3. Login as the new user in a terminal window

    sudo -i -u glassfish

  4. Install GlassFish V3 using user glassfish

    cd ~

    unzip glassfish-v3.zip

    rm glassfish-v3.zip

  5. Exit the shell from step 2

Then the .war file (as in the Java script) is put into


(As described in; http://download.oracle.com/docs/cd/E19798-01/821-1757/geyvr/index.html)

Then to run Glassfish I just log in as glassfish user, and launch glassfish

sudo -i -u glassfish
sudo glassfishv2/glassfish/bin/asadmin start-domain

(Which automatically deploys the .war file from earlier, as it’s in the “auto-deploy” directory)

All of the above works without any problems at all, the two machines chatter away happily over a non-secure connection.

The problem is that a secure connection is required, and this has been put into the script, and it works perfectly fine when glassfish is started through Netbeans.

However, when applying the above procedure, the secure network connection complains about the certificates due to them being “self signed”. I’d say that this must be something in the code, but as it works fine when started through Netbeans I’d say that it was something to do with how I’m starting Glassfish, and deploying the .war file.

Currently Glassfish and the Java are manually started through Netbeans on the Windows box.

Any ideas?

Many Thanks

share|improve this question

migrated from stackoverflow.com May 21 '11 at 21:13

This question came from our site for professional and enthusiast programmers.

You have a lot of content about the Redhat side of the story but very little about the Windows 7 side of the story. How do you start Glassfish on your Windows box? –  vkraemer May 20 '11 at 17:14
The filer added some additional info about the windows side of conversation.... Then for the Windows 7 machine… Glassfishv3 is unpacked to C:\glassfishv3 Then to start it I type, 'C:\glassfishv3\glassfish\bin\asadmin.bat start-domain' –  vkraemer May 23 '11 at 18:42
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.