# Shutting down server due to startup exception (Payara5)

**URL:** <https://forum.payara.fish/t/shutting-down-server-due-to-startup-exception-payara5/582>\
**Category:** Technical Discussion\
**Created:** [March 29, 2023, 5:35pm UTC](https://forum.payara.fish/t/shutting-down-server-due-to-startup-exception-payara5/582 "2023-03-29T17:35:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![david77](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@david77](https://forum.payara.fish/u/david77)\
**Post date:** [March 29, 2023, 5:35pm UTC](https://forum.payara.fish/t/shutting-down-server-due-to-startup-exception-payara5/582/1 "2023-03-29T17:35:15Z")

</div>

Hey, Payara community.

I encountered a problem when deploying my web app project with Payara server 5.

The server log shows errors, “Shutting down server due to startup exception” and “Failed to start, exiting”.

The detailed log is copied and pasted below.

> Launching Payara Server on Felix platform  
> Mar. 29, 2023 9:57:55 A.M. com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner  
> INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.  
> Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@2128ee5a in service registry.  
> #!## LogManagerService.postConstruct : rootFolder=/Users/xinzhao/Payara\_Server/glassfish  
> #!## LogManagerService.postConstruct : templateDir=/Users/xinzhao/Payara\_Server/glassfish/lib/templates  
> #!## LogManagerService.postConstruct : src=/Users/xinzhao/Payara\_Server/glassfish/lib/templates/logging.properties  
> #!## LogManagerService.postConstruct : dest=/Users/xinzhao/Payara\_Server/glassfish/domains/domain1/config/logging.properties  
> INFO: Running Payara Version: Payara Server 5.2022.3 #badassfish (build 308)  
> INFO: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter  
> INFO: Registered fish.payara.ha.hazelcast.store.HazelcastBackingStoreFactoryProxy for persistence-type = hazelcast in BackingStoreFactoryRegistry  
> INFO: Grizzly 2.4.4 started in: 54ms - bound to [http-listener-1:8080, http-listener-2:8181, admin-listener:4848]  
> INFO: Hazelcast Instance Bound to JNDI at payara/Hazelcast  
> INFO: JSR107 Caching Provider Bound to JNDI at payara/CachingProvider  
> INFO: JSR107 Default Cache Manager Bound to JNDI at payara/CacheManager  
> INFO: HV000001: Hibernate Validator 6.1.5.Final  
> INFO: Payara Server 5.2022.3 #badassfish (308) startup time : Felix (1,118ms), startup services(2,093ms), total(3,211ms)  
> SEVERE: Shutting down server due to startup exception  
> java.net.BindException: Address already in use  
> at java.base/sun.nio.ch.Net.bind0(Native Method)  
> at java.base/sun.nio.ch.Net.bind(Net.java:459)  
> at java.base/sun.nio.ch.Net.bind(Net.java:448)  
> at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)  
> at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80)  
> at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:107)  
> at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:64)  
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:215)  
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:204)  
> at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:53)  
> at org.glassfish.grizzly.config.GenericGrizzlyListener.bindTransport(GenericGrizzlyListener.java:211)  
> at org.glassfish.grizzly.config.GenericGrizzlyListener.configure(GenericGrizzlyListener.java:339)  
> at com.sun.enterprise.v3.services.impl.GrizzlyProxy.initialize(GrizzlyProxy.java:126)  
> at com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:673)  
> at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:595)  
> at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:303)  
> at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:351)  
> at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)  
> at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)  
> at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)  
> at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)  
> at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)  
> at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)  
> 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 org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:762)  
> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)  
> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)  
> at java.base/java.lang.Thread.run(Thread.java:834)
> 
> SEVERE: Failed to start, exiting  
> INFO: Data Grid Status  
> Payara Data Grid State: DG Version: 4 DG Name: development DG Size: 1  
> Instances: {  
> DataGrid: development Name: server Lite: false This: true UUID: bcf6449d-0954-407e-a18b-d4bb84f0f121 Address: /fe80:0:0:0:7c88:61ff:fe37:8b2a%anpi0:4900  
> }  
> INFO: FileMonitoring shutdown  
> INFO: Hazelcast Instance Unbound from JNDI at payara/Hazelcast  
> INFO: JSR107 Caching Provider Unbound from JNDI at payara/CachingProvider  
> INFO: JSR107 Cache Manager Unbound from JNDI at payara/CacheManager  
> INFO: Shutdown Hazelcast  
> Completed shutdown of Log manager service  
> INFO: Shutdown procedure finished  
> Exception in thread “main” java.lang.reflect.InvocationTargetException  
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)  
> at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:121)  
> at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)  
> Caused by: org.glassfish.embeddable.GlassFishException: Server failed to start  
> at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:240)  
> at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:219)  
> at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:84)  
> at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)  
> at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.start(EmbeddedOSGiGlassFishImpl.java:75)  
> at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)  
> at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:71)  
> at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:142)  
> … 6 more  
> Completed shutdown of GlassFish runtime  
> We are in non-embedded mode, so fish.payara.server.internal.core.glassfish [363] has nothing to do.

I desire to hear your opinions.

Thanks!  
David

---

<div class="post-metadata">

**Author:** ![chrjohn](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.payara.fish/chrjohn/32/57_2.png) [@chrjohn](https://forum.payara.fish/u/chrjohn)\
**Post date:** [March 30, 2023, 3:43pm UTC](https://forum.payara.fish/t/shutting-down-server-due-to-startup-exception-payara5/582/2 "2023-03-30T15:43:27Z")

</div>

> [@david77](#):
>
> java.net.BindException: Address already in use

Basically it was tried to use a port which was already in use. Try to choose other ports.

---

<div class="post-metadata">

**Author:** ![david77](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@david77](https://forum.payara.fish/u/david77)\
**Post date:** [March 30, 2023, 5:08pm UTC](https://forum.payara.fish/t/shutting-down-server-due-to-startup-exception-payara5/582/3 "2023-03-30T17:08:47Z")

</div>

Thanks, chrjohn! I will try to choose another port.

I think this step is likely easy for most users. But I am a beginner of java. Do you mind show me where and how to change ports? Any references I can look up?

Thanks!  
David

---

<div class="post-metadata">

**Author:** ![chrjohn](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.payara.fish/chrjohn/32/57_2.png) [@chrjohn](https://forum.payara.fish/u/chrjohn)\
**Post date:** [March 31, 2023, 9:38am UTC](https://forum.payara.fish/t/shutting-down-server-due-to-startup-exception-payara5/582/4 "2023-03-31T09:38:34Z")

</div>

Check the docs here:  
[https://docs.payara.fish/enterprise/docs/documentation/payara-server/server-configuration/http/network-listeners.html](https://docs.payara.fish/enterprise/docs/documentation/payara-server/server-configuration/http/network-listeners.html)

---

<div class="post-metadata">

**Author:** ![david77](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@david77](https://forum.payara.fish/u/david77)\
**Post date:** [March 31, 2023, 4:14pm UTC](https://forum.payara.fish/t/shutting-down-server-due-to-startup-exception-payara5/582/5 "2023-03-31T16:14:54Z")

</div>

Thanks, chrjohn! Very helpful information.

Have a good weekend.

Best regards,  
David

---

<div class="post-metadata">

**Author:** ![chrjohn](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.payara.fish/chrjohn/32/57_2.png) [@chrjohn](https://forum.payara.fish/u/chrjohn)\
**Post date:** [March 31, 2023, 5:22pm UTC](https://forum.payara.fish/t/shutting-down-server-due-to-startup-exception-payara5/582/6 "2023-03-31T17:22:55Z")

</div>

You are welcome. Just realised i gave you the link to the enterprise version of payara. The free edition is the community edition:

[https://docs.payara.fish/community/docs/5.2021.8/documentation/payara-server/server-configuration/http/network-listeners.html](https://docs.payara.fish/community/docs/5.2021.8/documentation/payara-server/server-configuration/http/network-listeners.html)

Have a good weekend.  
Cheers  
Chris
