GlassFish不起作用。错误:java.BindException

问题描述 投票:1回答:2

我已经在StackOverflow的问题中找到了这个错误“java.BindException”,我试图杀死持有GlassFish使用的端口8080但没有任何改变的PID。我还尝试重新安装GlassFish 4.1.1和GlassFish 4.1。没有!

我给你服务器日志。请帮助我,我需要它来学习。我正在使用GlassFish进行Servlet练习。

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0

Launching GlassFish on Felix platform

nov 03, 2017 3:33:36 PMcom.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner

INFORMAZIONI: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.

nov 03, 2017 3:33:37 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations

AVVERTENZA: Skipping entry  because it is not an absolute URI.

nov 03, 2017 3:33:37 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations

AVVERTENZA: Skipping entry  because it is not an absolute URI.

nov 03, 2017 3:33:40 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner startBundles

AVVERTENZA: Can not start bundle file:/Users/raffaelegiuliano/GlassFish_Server/glassfish/modules/core.jar because it is not contained in the list of installed bundles.

Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@6619302 in service registry.

#!## LogManagerService.postConstruct : rootFolder=/Users/raffaelegiuliano/GlassFish_Server/glassfish
#!## LogManagerService.postConstruct : templateDir=/Users/raffaelegiuliano/GlassFish_Server/glassfish/lib/templates
#!## LogManagerService.postConstruct : src=/Users/raffaelegiuliano/GlassFish_Server/glassfish/lib/templates/logging.properties
#!## LogManagerService.postConstruct : dest=/Users/raffaelegiuliano/GlassFish_Server/glassfish/domains/domain1/config/logging.properties

Informazioni:   Running GlassFish Version: GlassFish Server Open Source Edition  4.1.1  (build 1)
Informazioni:   Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Informazioni:   Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Informazioni:   Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Informazioni:   Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.

Informazioni:   Authorization Service has successfully initialized.

Informazioni:   HV000001: Hibernate Validator 5.1.2.Final

Informazioni:   Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry

Avvertenza:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn

Avvertenza:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn

Avvertenza:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn

Informazioni:   GlassFish Server Open Source Edition  4.1.1  (1) startup time : Felix (39.140ms), startup services(2.144ms), total(41.284ms)

Grave:   Shutting down server due to startup exception

java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:131)
    at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:88)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:248)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:237)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:86)
    at org.glassfish.grizzly.config.GenericGrizzlyListener.start(GenericGrizzlyListener.java:184)
    at com.sun.enterprise.v3.services.impl.GlassfishNetworkListener.start(GlassfishNetworkListener.java:109)
    at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start0(GrizzlyProxy.java:267)
    at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start(GrizzlyProxy.java:241)
    at com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:567)
    at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:490)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:228)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Informazioni:   Server shutdown initiated
Informazioni:   Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@270d43a7 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@f1266c6.
Informazioni:   Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@270d43a7 from service registry.
Informazioni:   FileMonitoring shutdown
Completed shutdown of Log manager service
Informazioni:   Shutdown procedure finished
java servlets netbeans glassfish
2个回答
0
投票

对我来说,听起来有些进程已经在侦听端口8080.你说你已经杀了glassfish,所以也许它是一个正在运行的tomcat实例正在侦听端口8080.尝试使用“ps aux | grep 8080”来查找更多信息这个过程。


0
投票

Glassfish不仅使用8080端口。

例如,管理端口默认为4848。

尝试使用工具查看工作站中正在使用的端口。例如在Windows TCPView

在Glassfish中打开文本编辑器文件:

\域\ domain1的\配置\ domain.xml中

并搜索标签:

<network-listeners>
.......
</network-listeners>

您可以找到Glassfish的http-listener使用的所有端口。与TCPView的结果合并,您可以尝试找到问题。

© www.soinside.com 2019 - 2024. All rights reserved.