Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Glassfish-无法更新http端口。服务器关闭_Java_Eclipse_Jakarta Ee_Glassfish - Fatal编程技术网

Java Glassfish-无法更新http端口。服务器关闭

Java Glassfish-无法更新http端口。服务器关闭,java,eclipse,jakarta-ee,glassfish,Java,Eclipse,Jakarta Ee,Glassfish,我在尝试启动Glassfish 4时遇到问题。 我只搜索了此错误,但没有找到类似的情况。 以下是错误日志: Unable to update http port. Server shut down. org.eclipse.core.runtime.CoreException: Could not save to L/Servers/GlassFish 4 at localhost [myDomain].server. 但即使我有这个错误,在Eclipse中,Glassfish服务器的状态被称


我在尝试启动Glassfish 4时遇到问题。
我只搜索了此错误,但没有找到类似的情况。

以下是错误日志:

Unable to update http port. Server shut down.
org.eclipse.core.runtime.CoreException:
Could not save to L/Servers/GlassFish 4 at localhost [myDomain].server.
但即使我有这个错误,在Eclipse中,Glassfish服务器的状态被称为[已启动,重新发布],我可以访问Glassfish管理控制台

你知道那里发生了什么事吗


谢谢您的考虑。

您使用的是8080端口吗

确保没有其他进程正在侦听,如果是,请杀死它们

netstat -a -n -o | find "8080"

这是一个老问题,但这个问题仍然发生在Eclipse2019-09上,所以下面是我的发现和解决方法

这是由点击服务器属性上的
开关位置
按钮引起的

这将删除
/.metadata/.plugins/org.eclipse.wst.server.core/servers.xml

<server auto-publish-setting="1" 
  glassfish.adminserverportnumber="4948" 
  glassfish.debugport="4909"
  glassfish.serverportnumber="4980" 
  glassfish.domainpath="/home/luis.munoz/projects/bin/glassfish3/glassfish/domains/domain-test/domain-test-1" 
  hostname="localhost"
  id="GlassFish 3.1 [domain-test-1]" 
  name="GlassFish 3.1 [domain-test-1]" 
  runtime-id="GlassFish 3.1" 
  server-type="glassfish.server" 
  server-type-id="glassfish.server"
  start-timeout="240" stop-timeout="240" timestamp="0" />

运行时id
必须与
.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs中的id匹配

解决方法

  • 关闭Eclipse,因为缓存了
    servers.xml
  • 将元素添加回
    servers.xml
    以修复错误。根据需要更改详细信息
  • 启动Eclipse

服务器属性将再次显示
Location:[工作区元数据]
,启动Glassfish时不会出现错误消息。

Hi@Drahos,感谢您的回答。我实际上使用的是8080端口,没有其他进程监听该端口。