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.
I also had this problem, it is because there is an application LISTENING to 8080 port. To solve this problem I followed the below steps:
Open cmd.exe then type
netstat -aon | find ":8080" | find "LISTENING"
You will see like this result
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 1464
Copy PID "1464".
Open Task Manager (Ctrl+Alt+del), go to the details tag, then find the program or service via PID that is listening to the port 8080 then STOP it or End process.
you can easily resolve this problem by changing the port number of glassfish.
Go to glassfich configuration File domain.xml
which is located under GlassFish_Server\glassfish\domains\domain1\config
.
Open this file, then change the following line:
<network-listener port="8080" protocol="http-listener-1" transport="tcp"
name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
replace 8080
by 9090
for example, then save file and run glassfish again.
it should nicely work.
I have the same problem. Mine is caused by a vmware installation. It is vmware worstation v8 on windows 7 and was a default installation.
Running netstat -aon | find ":80" | find "LISTENING" from cmd showed PID of the service causing the problem, this related to vmware. Going to services, I manually stopped all of the running vmware services (did not change their start up type, just a manual stop - I want them to work again after the next reboot) I could immediately test my webservice, glassfish 4 started as it should.
Hope it helps
Following are the steps that will definitely work:
netstat -aon | find ":8080" | find "LISTENING"
Ctrl+Shift+Esc
)end process
NOTE : If you are running your program for the first time in Netbeans, it takes some time. So don't worry if it takes time.