简体   繁体   中英

GlassFish doesn't work. Error: java.BindException

i already looked for this error "java.BindException" in StackOverflow's questions and i tried to kill PID who holds the port 8080 used by GlassFish but nothing changed. I also tried to reinstall GlassFish 4.1.1 and GlassFish 4.1. Nothing!

I give you the server log. Please help me I need it for studying. I'm using GlassFish for Servlet exercise.

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

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

Glassfish don't use only 8080 port.

For example, admin port is 4848 by default.

Try to use a tool to see port in use in your workstation. For example in Windows TCPView

In Glassfish open with a text editor file:

\\domains\\domain1\\config\\domain.xml

And search for tag:

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

You can find all ports used by http-listener of Glassfish. Merged with the result of TCPView, you can try to find the problem.

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