简体   繁体   中英

GlassFish server unable to start in NetBeans IDE 8.0

I'm using NetBeans IDE 8.0 to create Java Web Applictions . It was working perfectly , but today whenever I try to run my project , it displays the error :-

Could not start GlassFish Server: HTTP or HTTPS listener port is occupied while server is not running See the server log for details.

What can I do to get the server started . I recently installed Oracle XE 10g and this is the first time I opened NetBeans after doing so .

What could be wrong ? Please explain how to resolve this problem with steps. Immediate help would be appreciated ! Thanks !

默认情况下,GlassFish和Oracle XE 10g都使用http 8080端口,请尝试更改其中任何一个。

First Debug that is problem with Oracle xe or not/ Stop oracle xe : if you are using windows 7 directly from programmer file you can stop it After that start glass Fish server.. if the gF is started successfully that is problem with Oracle XE Start Menu >> Programs >> Oracle Database 10G Express Edition >> stop oracle xe Then change port of oracle xe

from cmd give this

CONNECT system
admin
BEGIN
DBMS_XDB.sethttpport('9090');
END;
/

如果需要Oracle运行,则可以更改Glassfish使用的端口-请参见此处的说明。

Even mine case was the same. What I did to get the problem fixed was as::

Find the program(it's PID) which is using port on which GlassFish Server will run(default 1527). To do so use command netstat -ano | find "1527" netstat -ano | find "1527" . Now find the details about given process and stop the services related to it. In mine case it was Oracle Database services. Disable them from there if they are not required. Else if you can't disable the services( assuming they are important) you can make GlassFish server to open on a different port by editing it's domain.xm file located inside Glassfish installation folders.

  <network-listener port="1527" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>

Change 1527 to other port which is free.

Hope this fixed your problem.

Happy Coding :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM