Glassfish服务器未连接。部署不可用intelliJ

时间:2015-05-10 03:39:23

标签: java intellij-idea glassfish-4.1

我不知道为什么,但我的玻璃鱼服务器不再连接了 昨晚我打开了Netbeans,并指向相同的gf(自制软件),看看示例EE应用程序。我甚至没有最终运行它们,只是查看代码 这是我在智能工作的一个项目,一切正常。后来似乎gf在我的iJ项目中没有正确连接。 我做了代码更改,但没有任何东西可以阻止服务器启动。
我刚刚用GF服务器创建了另一个空白的EE项目,我得到了相同的结果。 我检查了我的主机文件:

127.0.0.1   localhost   computer.name
#127.0.0.1  ghconduit.com
255.255.255.255 broadcasthost
::1             localhost 
fe80::1%lo0 localhost 

由于某种原因,我的主机名设置为我的计算机/网络名称:' computer.ispname`。 这似乎是我在Eclipse中创建项目的一个问题,但是当我搬到iJ时它不是。但也许它又来了。 我可以ping并且似乎解决得很好:

  jm:~ jsky$ ping computer.name
    PING localhost (127.0.0.1): 56 data bytes
    64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.059 ms
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.060 ms

但不是在4848端口:

Application Server was not connected before run configuration stop, reason: Unable to ping server at localhost:4848

lsof -i:4848
    jm:~ jsky$ ping localhost:4848
    ping: cannot resolve localhost:4848: Unknown host

跑步时:

jm:~ jsky$ lsof -i:4848
COMMAND  PID       USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
idea     941 jsky  105u  IPv4 0x45cc6637d4636f39      0t0  TCP localhost:50790->localhost:appserv-http (ESTABLISHED)
java    1449 jsky  379u  IPv6 0x45cc6637ce5b8619      0t0  TCP *:appserv-http (LISTEN)
java    1449 jsky  387u  IPv6 0x45cc6637ce5b5fd9      0t0  TCP localhost:appserv-http->localhost:50790 (ESTABLISHED)
jm:~ jsky$ ping localhost:4848
ping: cannot resolve localhost:4848: Unknown host

我有一个发布者和订阅者通过jms主题工作,现在服务器没有启动,我需要尽快完成这个任务。 我甚至尝试使用时间机器将我的机器恢复到以前的快照,但仍然得到相同的错误。 它告诉我使用相同的端口4848还有另一个进程。 但我不知道(额外的)过程来自哪里。 有任何想法吗?一旦我锻炼了,我将尝试在另一个领域开始。

启动日志显示我认为正确的连接:
Grizzly Framework 2.3.15 started in: 16ms - bound to [/0.0.0.0:4848]]] ... Created HTTP listener admin-listener on host/port 0.0.0.0:4848|#]

其余的启动日志显示:

[2015-05-10T13:03:51.400+1000] [] [INFO] [NCLS-GFLAUNCHER-00005] [javax.enterprise.launcher] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1431227031400] [levelValue: 800] [[
  JVM invocation command line:
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java
-cp
/usr/local/Cellar/glassfish/4.1/libexec/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-XX:MaxPermSize=192m
-Xmx512m
-javaagent:/usr/local/Cellar/glassfish/4.1/libexec/glassfish/lib/monitor/flashlight-agent.jar
-client
-Djavax.xml.accessExternalSchema=all
-Djavax.net.ssl.trustStore=/usr/local/Cellar/glassfish/4.1/libexec/glassfish/domains/domain1/config/cacerts.jks
-Djdk.corba.allowOutputStreamSubclass=true
-Dfelix.fileinstall.dir=/usr/local/Cellar/glassfish/4.1/libexec/glassfish/modules/autostart/
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall
-Dcom.sun.aas.installRoot=/usr/local/Cellar/glassfish/4.1/libexec/glassfish
-Dfelix.fileinstall.poll=5000
-Djava.endorsed.dirs=/usr/local/Cellar/glassfish/4.1/libexec/glassfish/modules/endorsed:/usr/local/Cellar/glassfish/4.1/libexec/glassfish/lib/endorsed
-Djava.security.policy=/usr/local/Cellar/glassfish/4.1/libexec/glassfish/domains/domain1/config/server.policy
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.bundles.startTransient=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dfelix.fileinstall.log.level=2
-Djavax.net.ssl.keyStore=/usr/local/Cellar/glassfish/4.1/libexec/glassfish/domains/domain1/config/keystore.jks
-Djava.security.auth.login.config=/usr/local/Cellar/glassfish/4.1/libexec/glassfish/domains/domain1/config/login.conf
-Dfelix.fileinstall.disableConfigSave=false
-Dfelix.fileinstall.bundles.new.start=true
-Dcom.sun.aas.instanceRoot=/usr/local/Cellar/glassfish/4.1/libexec/glassfish/domains/domain1
-Dosgi.shell.telnet.port=6666
-Dgosh.args=--nointeractive
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Dosgi.shell.telnet.ip=127.0.0.1
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Djava.awt.headless=true
-Dcom.ctc.wstx.returnNullForDefaultNamespace=true
-Djava.ext.dirs=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/ext:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext:/usr/local/Cellar/glassfish/4.1/libexec/glassfish/domains/domain1/lib/ext
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djava.library.path=/usr/local/Cellar/glassfish/4.1/libexec/glassfish/lib:/Users/jsky/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:/usr/local/Cellar/glassfish/4.1/libexec/glassfish/bin
com.sun.enterprise.glassfish.bootstrap.ASMain
-upgrade
false
-domaindir
/usr/local/Cellar/glassfish/4.1/libexec/glassfish/domains/domain1
-read-stdin
true
-asadmin-args
[2015-05-10T13:03:59.919+1000] [glassfish 4.1] [INFO] [NCLS-LOGGING-00009] [javax.enterprise.logging] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1431227039604] [timeMillis: 1431227039919] [levelValue: 800] [[
  Running GlassFish Version: GlassFish Server Open Source Edition  4.1  (build 13)]]

[2015-05-10T13:03:59.931+1000] [glassfish 4.1] [INFO] [NCLS-LOGGING-00010] [javax.enterprise.logging] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1431227039604] [timeMillis: 1431227039931] [levelValue: 800] [[
  Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter]]

[2015-05-10T13:04:01.301+1000] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227041301] [levelValue: 800] [[
  Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]

[2015-05-10T13:04:01.305+1000] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227041305] [levelValue: 800] [[
  Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]

[2015-05-10T13:04:01.315+1000] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227041315] [levelValue: 800] [[
  Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.]]

[2015-05-10T13:04:02.785+1000] [glassfish 4.1] [INFO] [SEC-SVCS-00100] [javax.enterprise.security.services] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227042785] [levelValue: 800] [[
  Authorization Service has successfully initialized.]]

[2015-05-10T13:04:03.045+1000] [glassfish 4.1] [INFO] [] [org.glassfish.ha.store.spi.BackingStoreFactoryRegistry] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227043045] [levelValue: 800] [[
  Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry]]

[2015-05-10T13:04:03.725+1000] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1431227039604] [timeMillis: 1431227043725] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 206ms - bound to [/0.0.0.0:8080]]]

[2015-05-10T13:04:03.865+1000] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1431227039604] [timeMillis: 1431227043865] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 4ms - bound to [/0.0.0.0:8181]]]

[2015-05-10T13:04:03.907+1000] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1431227039604] [timeMillis: 1431227043907] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 16ms - bound to [/0.0.0.0:4848]]]

[2015-05-10T13:04:04.058+1000] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227044058] [levelValue: 800] [[
  visiting unvisited references]]

[2015-05-10T13:04:04.143+1000] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1431227039604] [timeMillis: 1431227044143] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 8ms - bound to [/0.0.0.0:3700]]]

[2015-05-10T13:04:05.812+1000] [glassfish 4.1] [INFO] [NCLS-SECURITY-01002] [javax.enterprise.system.core.security] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227045812] [levelValue: 800] [[
  Java security manager is disabled.]]

[2015-05-10T13:04:05.813+1000] [glassfish 4.1] [INFO] [NCLS-SECURITY-01010] [javax.enterprise.system.core.security] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227045813] [levelValue: 800] [[
  Entering Security Startup Service.]]

[2015-05-10T13:04:05.833+1000] [glassfish 4.1] [INFO] [NCLS-SECURITY-01143] [javax.enterprise.system.core.security] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227045833] [levelValue: 800] [[
  Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.]]

[2015-05-10T13:04:06.489+1000] [glassfish 4.1] [INFO] [NCLS-SECURITY-01011] [javax.enterprise.system.core.security] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227046489] [levelValue: 800] [[
  Security Service(s) started successfully.]]

[2015-05-10T13:04:08.095+1000] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227048095] [levelValue: 800] [[
  Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080]]

[2015-05-10T13:04:08.112+1000] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227048112] [levelValue: 800] [[
  Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181]]

[2015-05-10T13:04:08.123+1000] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227048123] [levelValue: 800] [[
  Created HTTP listener admin-listener on host/port 0.0.0.0:4848]]

[2015-05-10T13:04:08.237+1000] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00200] [javax.enterprise.web] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227048237] [levelValue: 800] [[
  Created virtual server server]]

[2015-05-10T13:04:08.246+1000] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00200] [javax.enterprise.web] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227048246] [levelValue: 800] [[
  Created virtual server __asadmin]]

[2015-05-10T13:04:09.312+1000] [glassfish 4.1] [INFO] [AS-WEB-CORE-00306] [javax.enterprise.web.core] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227049312] [levelValue: 800] [[
  Setting JAAS app name glassfish-web]]

[2015-05-10T13:04:09.315+1000] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00201] [javax.enterprise.web] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227049315] [levelValue: 800] [[
  Virtual server server loaded default web module ]]

[2015-05-10T13:04:13.211+1000] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227053211] [levelValue: 800] [[
  visiting unvisited references]]

[2015-05-10T13:04:13.219+1000] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227053219] [levelValue: 800] [[
  visiting unvisited references]]

[2015-05-10T13:04:16.235+1000] [glassfish 4.1] [INFO] [] [javax.enterprise.resource.jms] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227056235] [levelValue: 800] [[
  addresslist.setjmsservice.provider]]

[2015-05-10T13:04:16.235+1000] [glassfish 4.1] [INFO] [] [javax.enterprise.resource.jms] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227056235] [levelValue: 800] [[
  jms.connection.url]]

[2015-05-10T13:04:17.390+1000] [glassfish 4.1] [INFO] [NCLS-JMX-00005] [javax.enterprise.system.jmx] [tid: _ThreadID=54 _ThreadName=Thread-13] [timeMillis: 1431227057390] [levelValue: 800] [[
  JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://computer.name:8686/jndi/rmi://computer.name:8686/jmxrmi]]

[2015-05-10T13:04:18.225+1000] [glassfish 4.1] [INFO] [] [org.hibernate.validator.internal.util.Version] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227058225] [levelValue: 800] [[
  HV000001: Hibernate Validator 5.0.0.Final]]

[2015-05-10T13:04:19.851+1000] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.monitor] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227059851] [levelValue: 800] [[
  Successfully got INSTRUMENTATION: sun.instrument.InstrumentationImpl@4017f2ce]]

[2015-05-10T13:04:20.140+1000] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227060140] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 2ms - bound to [/0.0.0.0:7676]]]

[2015-05-10T13:04:20.153+1000] [glassfish 4.1] [INFO] [] [javax.resourceadapter.mqjmsra.lifecycle] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227060153] [levelValue: 800] [[
  MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter: Version:  5.1  (Build 9-b) Compile:  July 29 2014 1229]]

[2015-05-10T13:04:20.155+1000] [glassfish 4.1] [INFO] [] [javax.resourceadapter.mqjmsra.lifecycle] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227060155] [levelValue: 800] [[
  MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter starting: broker is EMBEDDED, connection mode is Direct]]

[2015-05-10T13:04:24.069+1000] [glassfish 4.1] [INFO] [] [javax.resourceadapter.mqjmsra.lifecycle] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1431227039629] [timeMillis: 1431227064069] [levelValue: 800] [[
  MQJMSRA_RA1101: GlassFish MQ JMS Resource Adapter Started:EMBEDDED]]

这是服务器无法连接的日志:

/usr/local/Cellar/glassfish/4.1/libexec/glassfish/bin/asadmin start-domain domain1
[2015-05-10 01:03:49,582] Artifact AdminAuditingConsole:war exploded: Server is not connected. Deploy is not available.
Detected server admin port: 4848
[2015-05-10 01:03:49,584] Artifact EEApp:war exploded: Server is not connected. Deploy is not available.
Detected server http port: 8080
Waiting for domain1 to start .......................................................................................................................................

3 个答案:

答案 0 :(得分:4)

域名很可能被Netbeans改变,不再正确 解决方案是首先使用管理端口(4848)杀死所有进程,如@Jarrod Robertson的回答建议,然后删除域(删除整个文件夹)并重新制作它:
./asadmin create-domain domain1

答案 1 :(得分:1)

检查凭据

检查部署网络应用程序的用户名/密码是否正确。使用您用于登录Web服务器的用户名/密码。

在IntelliJ上:

修改配置>> "选择web-sever" >> "更正用户名/密码"

答案 2 :(得分:0)

终止持有4848

的过程
#menu > li {
    ...
    padding: 0 25px 3px 25px;
    ...}


#menu > li:hover {
    ...
    padding-bottom: 0px;
    ....}

这将找到并终止系统上的所有kill $(ps aux | grep 'java' | awk '{print $2}') 进程。

您可以将java替换为该端口上挂起的glassfish实例更具体的内容。