On Windows 7 I downloaded the \'netbeans-8.0.1-javaee-windows.exe\' installer from this site https://netbeans.org/downloads/. The installer installs GlassFish 4.1, Java 1.8.
Your description is a little bit strange because the GlassFish server can even start if port 1527 is occupied, because the Java Derby database is a separate java process. So one option could be to just ignore the message in case that the real GlassFish server is indeed starting correctly (NetBeans displays the output for the GlassFish server and the Derby server in different tabs).
Nevertheless you can try to disable starting the registered Derby server for your GlassFish instance.
Make sure that the Derby server is shut down, it can even still run if you have closed NetBeans. If you are not sure kill every java process via the task manager and restart NetBeans.
Right-click your GlassFish instance in the Services tab and choose Properties.
If instead the real problem is that either port 8080 or 443 (if you activated the HTTPS listener) is in use (which would really prevent GlassFish from starting), you have to find out which application is using this port (maybe Tomcat or something similar) and shut it down.
The error message
'Could not start GlassFish Server 4.1: HTTP or HTTPS listener port is occupied while server is not running'
just points a little bit more in this direction...
Yes you can solve this error by changing the port number of glassfish because the WAMP SERVER or ORACLE database software uses a port number 8080, so there is a conflict of port number.
1)open a path like C:\GlassFish_Server\glassfish\domains\domain1\config\domain.xml.
2)find out the 8080 port number with the help of ctrl+F. You will get the following code...
<network-listener protocol="http-listener-1" port="8080" name="http-listener-1" thread-pool="http-thread-pool" transport="tcp">
3) Change that port number from 8080 to 9090 or 1234 or whatever you like..
4) Save it. Open a Netbeans IDE goto the glassfish server .
5) Right click on the server -> select refresh option.
6) to check the port no. which is given by u just right click on the server-> property.
7) Start the Glassfish server . Yehhh the error is gone...
I get the same error when I run Oracle XE instance on the same machine. As my database is Oracle, I preferred changing Glassfish's default port:
<network-listener port="9090" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
If you are using netbeans 7 and greater with oracle xe do the following on netbeans :
9090
for http accessGlassfish can use that one if available or some random port number is created
You will get like this error
Try the following steps
1. Open Command Prompt (Press Windows key and type "cmd" and hit Enter)
Then type this command as show in picture
netstat -aon | find ":8080" | find "LISTENING"
I found an easier way to go about this nagging problem. Register GlassFish Server without setting user/password the first time. Then right click GlassFish then to View Domain Admin Console. On the Glassfish admin page that appears, you will see Change Administrator Password under Administration on the GlassFish Console- Common Tasks. Click to set your password by changing the default password. The user is admin but the password is up to you to change it. Save your change. Go back to Netbeans and you will immediately see a popout screen asking you to enter your admin credentials. Enter admin for user and the password. That is it. If your Netbeans come with Glassfish, just right click the server then to View Domain Admin Console then follow the rest of the steps explained above