I'm running Mac OS. I've set up the Payara server with NetBeans. And when I'll try to run the server it never shows the green 'dot' that indicates its online status, instead it shows the 'loading' dot forever.
However, I can access it on http://localhost:4848, but when I try to deploy an application to the server I get this error:
GlassFish Server is running.
Starting GlassFish Server
Initial deploying slit-ee to /Users/christian/slit/slit-ee/dist/gfdeploy/slit-ee
Completed initial distribution of slit-ee
GlassFish Server, deploy, null, false
/Users/christian/slit/slit-ee/nbproject/build-impl.xml:307: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 22 seconds)
And the full server log
objc[1865]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java (0x105e334c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x105efb4e0). One of the two will be used. Which one is undefined.
Launching GlassFish on Felix platform
nov 28, 2016 2:14:21 AM 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#18808234 in service registry.
#!## LogManagerService.postConstruct : rootFolder=/Users/christian/opt/payara41/glassfish
#!## LogManagerService.postConstruct : templateDir=/Users/christian/opt/payara41/glassfish/lib/templates
#!## LogManagerService.postConstruct : src=/Users/christian/opt/payara41/glassfish/lib/templates/logging.properties
#!## LogManagerService.postConstruct : dest=/Users/christian/opt/payara41/glassfish/domains/payaradomain/config/logging.properties
Info: Running Payara Version: Payara Server 4.1.1.164 #badassfish (build 28)
Info: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Info: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Info: Authorization Service has successfully initialized.
Info: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Info: Registered fish.payara.ha.hazelcast.store.HazelcastBackingStoreFactoryProxy for persistence-type = hazelcast in BackingStoreFactoryRegistry
Info: Registered Hazelcast BackingStoreFactory with persistence-type = hazelcast
Info: Grizzly Framework 2.3.28 started in: 47ms - bound to [/0.0.0.0:8080]
Info: Grizzly Framework 2.3.28 started in: 1ms - bound to [/0.0.0.0:8181]
Info: Grizzly Framework 2.3.28 started in: 2ms - bound to [/0.0.0.0:4848]
Info: Grizzly Framework 2.3.28 started in: 1ms - bound to [/0.0.0.0:3700]
Info: Payara Server 4.1.1.164 #badassfish (28) startup time : Felix (33 542ms), startup services(5 715ms), total(39 257ms)
Info: Payara Notification Service Started with configuration: NotificationExecutionOptions{enabled=true, notifierConfigurationExecutionOptionsList={LOG=NotifierConfigurationExecutionOptions{notifierType=LOG, enabled=true}}}
Info: Cleaning JarFileFactory Cache to prevent jar FD leaks
Info: HV000001: Hibernate Validator 5.1.2.Final
Info: Grizzly Framework 2.3.28 started in: 1ms - bound to [/0.0.0.0:7676]
Info: Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl#7bca6fac as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl#129fed45.
Info: /Users/christian/opt/payara41/glassfish/domains/payaradomain/autodeploy/bundles does not exist, please create it.
Info: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://192.168.0.183:8686/jndi/rmi://192.168.0.183:8686/jmxrmi
Is there any security mechanism that prevents this on Mac OS?
It seems that Netbeans cannot connect to the started Payara Server. Maybe your issue is similar to this one with Netbeans and Tomcat on a Mac after some system update: https://discussions.apple.com/thread/7680039?start=0&tstart=0
Here is a quote from that page:
Step 1: Go to system preference >Network>Select your wifi
connection>Advanced>select proxies tab.
There check 3 options 1) Auto proxy Discovery 2)Automatic Proxy
configuration 3) web proxy(http)
Step 2: Go to Netbeans>preferences>General> select use system proxy>
reload> test connection
I found an alternative solution for me:
Go to Netbeans-> Preference-> chose No Proxy.
Test the connection. should success, Press Ok. Then clean and run the application.
No need to change any network configuration on mac.
Related
I have tried for every solution on stackoverflow.com
But none of them worked with my system Windows 8.1 Netbeans 8.2 with jdk 8
Here are the log details!!! of Output of GlassFish Server. I have tried every normal solution but can't get into it, Please help me out with this! I have tried every setting with admin and password properties of server. Also edited build-impl.xml file by changing FALSE to TRUE in specified line. Also Netbeans is running in administrator mode. I have tried start:domain one method. Please tell me some effective method.
Listening for transport dt_socket at address: 9009
Launching GlassFish on Felix platform
Aug 09, 2018 11:00:17 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Aug 09, 2018 11:00:17 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.
Aug 09, 2018 11:00:17 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.
Aug 09, 2018 11:00:17 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner startBundles
WARNING: Can not start bundle file:/C:/Program%20Files/glassfish-4.1.1/glassfish/modules/core.jar because it is not contained in the list of installed bundles.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime#50fad361 in service registry.
#!## LogManagerService.postConstruct : rootFolder=C:\Program Files\glassfish-4.1.1\glassfish
#!## LogManagerService.postConstruct : templateDir=C:\Program Files\glassfish-4.1.1\glassfish\lib\templates
#!## LogManagerService.postConstruct : src=C:\Program Files\glassfish-4.1.1\glassfish\lib\templates\logging.properties
#!## LogManagerService.postConstruct : dest=C:\Users\Asus\personal_domain\config\logging.properties
Info: Running GlassFish Version: GlassFish Server Open Source Edition 4.1.1 (build 1)
Info: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Info: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Info: HV000001: Hibernate Validator 5.1.2.Final
Info: Authorization Service has successfully initialized.
Info: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Info: GlassFish Server Open Source Edition 4.1.1 (1) startup time : Felix (15,356ms), startup services(3,170ms), total(18,526ms)
Severe: Shutting down server due to startup exception
java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:94)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:61)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:171)
at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
at java.nio.channels.Pipe.open(Pipe.java:155)
at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:127)
at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
at org.glassfish.grizzly.nio.Selectors.newSelector(Selectors.java:62)
at org.glassfish.grizzly.nio.SelectorRunner.create(SelectorRunner.java:109)
at org.glassfish.grizzly.nio.NIOTransport.startSelectorRunners(NIOTransport.java:287)
at org.glassfish.grizzly.nio.NIOTransport.start(NIOTransport.java:506)
at org.glassfish.grizzly.config.GenericGrizzlyListener.start(GenericGrizzlyListener.java:185)
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 org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:762)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.BindException: Address already in use: bind
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 sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:121)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:76)
... 31 more
Info: Server shutdown initiated
Info: Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl#772861aa as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl#55a88417.
Info: Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl#772861aa from service registry.
Info: FileMonitoring shutdown
Completed shutdown of Log manager service
Info: Shutdown procedure finished
Check if glassfish server is already running. This error occurs when an instance of the server is already running.
Run below command in cmdprompt : netstat -ano
This will list down the list of the processes currently running along with the port on which they are running. Search for the processes running on the port on which GlasshFish server is supposed to run.
If there is such a process running, we need to kill. We can do it in many ways.
We can use below command to kill the process based on the PID(ProcessID). We will get the ProcessId from the last command we ran(netstat -ano). Let's say that the PID is 1234. So the command will be
Taskkill /PID 1234 /F
Or we can do Right click on window task bar -> 'Task Manager' -> Processes -> Search for the PID -> Select it and click on 'End Process' button at the bottom left corner-> Process is killed
If we don't see a PID column in 'Processes' tab, click on View menu-item->select columns and check-mark PID entry.
Once the process is killed, try running the server again. This issue should not occur
I want to create a basic Google Web Application project and i get an 404 Page not found error.
I followed several tutorials and what i do is this:
Open eclipse - File - New - Other - Web Application Project (under Google) - name it - (it doesn't matter if i check "Use GWT" or not the result is the same - Finish.
Right now i have a newly created web application project, so i can test it in localhost. I right click it, run as - web application project (with google icon). After it finishes in my console i have this:
Mar 22, 2017 10:13:58 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector#0.0.0.0:8888
Mar 22, 2017 10:13:58 AM com.google.appengine.tools.development.AbstractModule startup
INFO: Module instance default is running at http://localhost:8888/
Mar 22, 2017 10:13:58 AM com.google.appengine.tools.development.AbstractModule startup
INFO: The admin console is running at http://localhost:8888/_ah/admin
Mar 22, 2017 12:13:58 PM com.google.appengine.tools.development.DevAppServerImpl doStart
INFO: Dev App Server is now running
I open Chrome and go to localhost and i get:
HTTP ERROR: 404
Problem accessing /.
Reason:
NOT_FOUND
Powered by Jetty://
I must specify that i am deploying behind a proxy server. I tried also to run it without proxy, same result. All my settings are correct, because if i create a Dynamic Web Project and i deploy it on a Tomcat server, that one works fine.
The solution that worked for me is this. Check your Java facet. It has to be 1.7. Mine was 1.8.
Thank you.
I am getting the below error. Any help will be appreciated.
$ sudo glassfish4/glassfish/bin/asadmin start-domain Waiting for domain1 to start ..................Error starting domain domain1. The server exited prematurely with exit code 0. Before it died, it produced the following output:
Launching GlassFish on Felix platform Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime#72d53ac7 in service registry. Found populator: com.sun.enterprise.v3.server.GFDomainXml
#!## LogManagerService.postConstruct : rootFolder=/srv/glassfish4/glassfish
#!## LogManagerService.postConstruct : templateDir=/srv/glassfish4/glassfish/lib/templates
#!## LogManagerService.postConstruct : src=/srv/glassfish4/glassfish/lib/templates/logging.properties
#!## LogManagerService.postConstruct : dest=/srv/glassfish4/glassfish/domains/domain1/config/logging.properties Completed shutdown of Log manager service Completed shutdown of GlassFish runtime Watcher for /srv/glassfish4/glassfish/domains/domain1/autodeploy/bundles exiting because of interruption.: java.lang.InterruptedException java.lang.InterruptedException at java.lang.Object.wait(Native Method) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:226) Oct 27, 2014 8:57:08 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner. Oct 27, 2014 8:57:08 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations WARNING: Skipping entry because it is not an absolute URI. Oct 27, 2014 8:57:08 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations WARNING: Skipping entry because it is not an absolute URI. [#|2014-10-27T20:57:15.978-0700|INFO|glassfish
4.1|javax.enterprise.logging|_ThreadID=15;_ThreadName=RunLevelControllerThread-1414468635292;_TimeMillis=1414468635978;_LevelValue=800;_MessageID=NCLS-LOGGING-00009;| Running GlassFish Version: GlassFish Server Open Source Edition 4.1 (build 13)|#]
[#|2014-10-27T20:57:15.989-0700|INFO|glassfish
4.1|javax.enterprise.logging|_ThreadID=15;_ThreadName=RunLevelControllerThread-1414468635292;_TimeMillis=1414468635989;_LevelValue=800;_MessageID=NCLS-LOGGING-00010;| Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter|#]
[#|2014-10-27T20:57:17.173-0700|INFO|glassfish
4.1|org.hibernate.validator.internal.util.Version|_ThreadID=15;_ThreadName=RunLevelControllerThread-1414468635292;_TimeMillis=1414468637173;_LevelValue=800;| HV000001: Hibernate Validator 5.0.0.Final|#]
[#|2014-10-27T20:57:17.266-0700|INFO|glassfish
4.1|javax.enterprise.system.core.security|_ThreadID=14;_ThreadName=RunLevelControllerThread-1414468635273;_TimeMillis=1414468637266;_LevelValue=800;_MessageID=NCLS-SECURITY-01115;| Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]
[#|2014-10-27T20:57:17.320-0700|INFO|glassfish
4.1|javax.enterprise.system.core.security|_ThreadID=14;_ThreadName=RunLevelControllerThread-1414468635273;_TimeMillis=1414468637320;_LevelValue=800;_MessageID=NCLS-SECURITY-01115;| Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]
[#|2014-10-27T20:57:17.473-0700|INFO|glassfish
4.1|javax.enterprise.system.core.security|_ThreadID=14;_ThreadName=RunLevelControllerThread-1414468635273;_TimeMillis=1414468637473;_LevelValue=800;_MessageID=NCLS-SECURITY-01115;| Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.|#]
[#|2014-10-27T20:57:17.954-0700|INFO|glassfish
4.1|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=17;_ThreadName=RunLevelControllerThread-1414468635378;_TimeMillis=1414468637954;_LevelValue=800;| Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]
[#|2014-10-27T20:57:18.164-0700|INFO|glassfish
4.1|javax.enterprise.security.services|_ThreadID=14;_ThreadName=RunLevelControllerThread-1414468635273;_TimeMillis=1414468638164;_LevelValue=800;_MessageID=SEC-SVCS-00100;| Authorization Service has successfully initialized.|#]
[#|2014-10-27T20:57:18.406-0700|INFO|glassfish
4.1|javax.enterprise.system.core|_ThreadID=16;_ThreadName=RunLevelControllerThread-1414468635370;_TimeMillis=1414468638406;_LevelValue=800;_MessageID=NCLS-CORE-00087;| Grizzly Framework 2.3.15 started in: 113ms - bound to [/0.0.0.0:8181]|#]
[#|2014-10-27T20:57:18.982-0700|INFO|glassfish
4.1|javax.enterprise.system.core|_ThreadID=16;_ThreadName=RunLevelControllerThread-1414468635370;_TimeMillis=1414468638982;_LevelValue=800;_MessageID=NCLS-CORE-00087;| Grizzly Framework 2.3.15 started in: 129ms - bound to [/0.0.0.0:4848]|#]
[#|2014-10-27T20:57:19.308-0700|INFO|glassfish
4.1|javax.enterprise.system.core|_ThreadID=17;_ThreadName=RunLevelControllerThread-1414468635378;_TimeMillis=1414468639308;_LevelValue=800;_MessageID=NCLS-CORE-00087;| Grizzly Framework 2.3.15 started in: 11ms - bound to [/0.0.0.0:3700]|#]
[#|2014-10-27T20:57:20.181-0700|INFO|glassfish
4.1|javax.enterprise.system.core|_ThreadID=1;_ThreadName=main;_TimeMillis=1414468640181;_LevelValue=800;_MessageID=NCLS-CORE-00017;| GlassFish Server Open Source Edition 4.1 (13) startup time : Felix (9,542ms), startup services(4,931ms), total(14,473ms)|#]
[#|2014-10-27T20:57:20.183-0700|SEVERE|glassfish
4.1|javax.enterprise.system.core|_ThreadID=1;_ThreadName=main;_TimeMillis=1414468640183;_LevelValue=1000;_MessageID=NCLS-CORE-00019;| 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:444) at sun.nio.ch.Net.bind(Net.java:436) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:132) at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:88) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:236) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:225) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:85) at org.glassfish.grizzly.config.GenericGrizzlyListener.start(GenericGrizzlyListener.java:180) 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:329) at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:377) at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:461) at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:227) at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:84) at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2258) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:105) at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87) at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1162) at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1147) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) |#]
[#|2014-10-27T20:57:20.481-0700|INFO|glassfish
4.1|javax.enterprise.system.core|_ThreadID=55;_ThreadName=Thread-11;_TimeMillis=1414468640481;_LevelValue=800;_MessageID=NCLS-CORE-00092;| Server shutdown initiated|#]
[#|2014-10-27T20:57:20.498-0700|INFO|glassfish
4.1|javax.enterprise.bootstrap|_ThreadID=1;_ThreadName=main;_TimeMillis=1414468640498;_LevelValue=800;_MessageID=NCLS-BOOTSTRAP-00027;| Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl#2c3b2e73 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl#290bdbae.|#]
[#|2014-10-27T20:57:21.488-0700|INFO|glassfish
4.1|javax.enterprise.bootstrap|_ThreadID=55;_ThreadName=Thread-11;_TimeMillis=1414468641488;_LevelValue=800;_MessageID=NCLS-BOOTSTRAP-00028;| Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl#2c3b2e73 from service registry.|#]
[#|2014-10-27T20:57:21.503-0700|INFO|glassfish
4.1||_ThreadID=55;_ThreadName=Thread-8;_TimeMillis=1414468641503;_LevelValue=800;| FileMonitoring shutdown|#]
[#|2014-10-27T20:57:21.904-0700|INFO|glassfish
4.1|javax.enterprise.system.core|_ThreadID=55;_ThreadName=Thread-11;_TimeMillis=1414468641904;_LevelValue=800;_MessageID=NCLS-CORE-00013;| Shutdown procedure finished|#]
Command start-domain failed
The important line in the error log is this:
java.net.BindException: Address already in use at sun.nio.ch.Net.bind0
This is most likely due to there already being another service (Apache, an old Tomcat installation, etc) using GlassFish's default port of 8080. The port that GlassFish uses can be changed by following the instructions here.
Furthermore, to find out what is already using GlassFish's port so you can stop the service if necessary, use this for Windows and this for Linux.
I am using the GlassFish 3 server adapter with Eclipse Helios 3.6. I can start the server using the Servers view in Eclipse, and things run just fine - but I am not able to debug my code.
After using the GF Admin Console to enable debugging (Configuration → JVM Settings → Debug, then restart the server), clicking Debug (Ctrl+Alt+D) gives me an error window:
I'm guessing this is because Eclipse can't connect to the JVM's debug port (9009 by default).
What is the proper way to set up GlassFish 3 debugging in Helios?
Edit
Re: #The Elite Gentleman, there aren't any errors that show up in the console. Here's an example:
Nov 29, 2010 11:47:42 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
C:\Program Files\Java\jdk1.6.0_22\bin\java.exe
-cp
C:/glassfishv3/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-XX:+LogVMOutput
-XX:LogFile=C:\glassfishv3\glassfish\domains\myDomain/logs/jvm.log
-Xmx512m
-client
-javaagent:C:/glassfishv3/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true
-Dosgi.shell.telnet.maxconn=1
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=C:\glassfishv3\glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=C:\glassfishv3\glassfish\domains\myDomain/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=C:\glassfishv3\glassfish\domains\myDomain/config/server.policy
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=C:\glassfishv3\glassfish\domains\myDomain
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dosgi.shell.telnet.ip=127.0.0.1
-Djava.endorsed.dirs=C:\glassfishv3\glassfish/modules/endorsed;C:\glassfishv3\glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=C:\glassfishv3\glassfish
-Djava.ext.dirs=C:\Program Files\Java\jdk1.6.0_22/lib/ext;C:\Program Files\Java\jdk1.6.0_22/jre/lib/ext;C:\glassfishv3\glassfish\domains\myDomain/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=C:\glassfishv3\glassfish\domains\myDomain/config/cacerts.jks
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=C:\glassfishv3\glassfish\domains\myDomain/config/login.conf
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dfelix.fileinstall.debug=1
-Dorg.glassfish.web.rfc2109_cookie_names_enforced=false
-Djava.library.path=C:/glassfishv3/glassfish/lib;C:/Program Files/Java/jdk1.6.0_22/bin;C:/glassfishv3/glassfish;C:/Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;C:/Program Files/Java/jdk1.6.0_22/jre/bin/server;C:/Program Files/Java/jdk1.6.0_22/jre/bin;C:/Program Files/Java/jdk1.6.0_22/jre/lib/amd64;C:/Python26/Scripts;C:/Python26;C:/Windows/System32/wbem;C:/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static;C:/Program Files (x86)/Common Files/Roxio Shared/DLLShared;C:/Program Files (x86)/Common Files/Roxio Shared/10.0/DLLShared;C:/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn;C:/Program Files/Microsoft SQL Server/100/Tools/Binn;C:/Program Files/Microsoft SQL Server/100/DTS/Binn;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn/VSShell/Common7/IDE;C:/Program Files (x86)/Microsoft SQL Server/100/DTS/Binn;C:/Program Files (x86)/PuTTY;C:/Program Files (x86)/jboss-4.2.2.GA/bin;C:/Program Files/MySQL/MySQL Server 5.0/bin;C:/Program Files/IBM/SQLLIB/BIN;C:/Program Files/IBM/SQLLIB/FUNCTION;C:/Program Files/IBM/SQLLIB/samples/repl;C:/Program Files/TortoiseSVN/bin;C:/jboss-5.1.0.GA/bin;C:/Program Files (x86)/QuickTime/QTSystem;C:/Program Files (x86)/Git/cmd;C:/Program Files/SlikSvn/bin;C:/glassfishv3/glassfish/%APPDATA%/Python/Scripts;C:/Program Files (x86)/Apache/apache-ant-1.7.0/bin;C:/Program Files (x86)/CVSNT/C:/jboss-5.1.0.GA/bin;C:/Program Files (x86)/Java/jdk1.6.0_14;C:/Program Files (x86)/Apache/apache-maven-2.1.0/bin;C:/glassfishv3/glassfish/bin
com.sun.enterprise.glassfish.bootstrap.ASMain
-domainname
myDomain
-asadmin-args
start-domain,,,--domaindir,,,C:\glassfishv3\glassfish\domains,,,--debug,,,--verbose=true,,,myDomain
-instancename
server
-verbose
true
-debug
true
-asadmin-classpath
C:/glassfishv3/glassfish/modules/admin-cli.jar
-asadmin-classname
com.sun.enterprise.admin.cli.AsadminMain
-upgrade
false
-domaindir
C:/glassfishv3/glassfish/domains/myDomain
-read-stdin
true
Nov 29, 2010 11:47:43 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 4 msec.
INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.0.1 (build 22)
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Mon Nov 29 11:47:46 EST 2010
INFO: Starting Grizzly Framework 1.9.18-o - Mon Nov 29 11:47:46 EST 2010
INFO: Grizzly Framework 1.9.18-o started in: 40ms listening on port 7676
INFO: Grizzly Framework 1.9.18-o started in: 50ms listening on port 3700
INFO: Grizzly Framework 1.9.18-o started in: 90ms listening on port 80
INFO: Grizzly Framework 1.9.18-o started in: 60ms listening on port 4848
INFO: Grizzly Framework 1.9.18-o started in: 67ms listening on port 8181
INFO: The Admin Console is already installed, but not yet loaded.
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Realm jdbc of classtype com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Created HTTP listener http-listener-1 on port 80
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Created virtual server __asadmin
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
|#]
INFO: Virtual server server loaded system default web module
INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/richfaces-showcase'
INFO: Selected fallback cache factory
INFO: Creating LRUMap cache instance using parameters: {org.richfaces.enableControlSkinningClasses=false, javax.faces.PROJECT_STAGE=Development, com.sun.faces.validateXml=true, com.sun.faces.forceLoadConfiguration=true, javax.faces.STATE_SAVING_METHOD=server, org.richfaces.enableControlSkinning=true, javax.faces.FACELETS_LIBRARIES=/WEB-INF/app-tags.taglib.xml, org.richfaces.skin=#{skinBean.skin}}
INFO: Creating LRUMap cache instance of 512 items capacity
INFO: RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.0.0-SNAPSHOT SVN r.20127
INFO: Monitoring jndi:/server/richfaces-showcase/WEB-INF/faces-config.xml for modifications
INFO: Loading application richfaces-showcase at /richfaces-showcase
INFO: Loading application richfaces-showcase at /richfaces-showcase
INFO: Loading richfaces-showcase Application done is 7895 ms
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Portable JNDI names for EJB UserBean : [java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/UserBean, java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/UserBean!com.lapis.retailerportal.demo.ejb.UserBean]
INFO: Portable JNDI names for EJB DbTestBean : [java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/DbTestBean!com.lapis.retailerportal.demo.ejb.DbTestBean, java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/DbTestBean]
INFO: Portable JNDI names for EJB NewsBean : [java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/NewsBean!com.lapis.retailerportal.demo.ejb.NewsBean, java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/NewsBean]
INFO: Portable JNDI names for EJB GameConfigBean : [java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/GameConfigBean!com.lapis.retailerportal.demo.ejb.GameConfigBean, java:global/RetailerPortalDemo/RetailerPortalDemo_Bean/GameConfigBean]
INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/RetailerPortalDemo'
INFO: com.lapis.retailerportal.demo.entity.Retailer actually got transformed
INFO: Selected fallback cache factory
INFO: Creating LRUMap cache instance using parameters: {javax.faces.PROJECT_STAGE=Development, com.sun.faces.validateXml=true, com.sun.faces.forceLoadConfiguration=true, org.richfaces.skin=tweaked}
INFO: Creating LRUMap cache instance of 512 items capacity
INFO: RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.0.0.20101110-M4 SVN r.20021
INFO: com.lapis.retailerportal.demo.entity.GameConfig actually got transformed
INFO: com.lapis.retailerportal.demo.entity.NewsItem actually got transformed
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
INFO: file:/C:/glassfishv3/glassfish/domains/myDomain/eclipseApps/RetailerPortalDemo/RetailerPortalDemo_Bean_jar/_RPD_Persistence_CTX login successful
INFO: Loading application RetailerPortalDemo#RetailerPortalDemo_Web.war at RetailerPortalDemo
INFO: Loading application RetailerPortalDemo#RetailerPortalDemo_Web.war at RetailerPortalDemo
INFO: Loading RetailerPortalDemo Application done is 5656 ms
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(2386ms) startup services(14265ms) total(16651ms)
INFO: Binding RMI port to *:8686
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://192.168.5.10:8686/jndi/rmi://192.168.5.10:8686/jmxrmi
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\glassfishv3\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\mjball\AppData\Local\Temp\fileinstall-2104459395405070416, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\glassfishv3\glassfish\domains\myDomain\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\mjball\AppData\Local\Temp\fileinstall-286375592969619901, felix.fileinstall.filter = null}
INFO: Started bundle: file:/C:/glassfishv3/glassfish/modules/autostart/osgi-web-container.jar
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed C:\glassfishv3\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\glassfishv3\glassfish\domains\myDomain\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\mjball\AppData\Local\Temp\fileinstall--3209587030652226629, felix.fileinstall.filter = null}
Edit 2
I was able to successfully debug in Eclipse by starting GlassFish externally, e.g.
> asadmin start-domain myDomain
and then creating a custom Debug Configuration:
So why can't the GlassFish server adapter do this?
Edit 3 - Problem solved
Originally, I had added GlassFish support through the GlassFish Tools plugin. I uninstalled the plugin, and added GlassFish support using Servers → New → Server → Download additional server adapters. Now I can debug. Woohoo!
You should start Glassfish with the debug instead of the run option inside the Servers view.
Same problem that you and it was driving me crazy.
My configuration is eclipse indigo over windows 7 and glassfish 3.1.1. The jdk I'm using is 1.7x64. I downloaded the glassfish server tools through the new server window.
I have solved it (it currently works, who knows what's happening in the near future) downloading and installing jdk1.6.30. I haven't uninstalled jdk1.7, but I've configured my eclipse project to use jdk1.6 instead.
Hi all I found solution for debugging problem. In my case Eclipse Indigo and linux x64 it works. More details in other thread about the same error https://stackoverflow.com/a/14551690/1976844
When i try to debug my webapp it starts up the tomcat server and the application, but shuts down the debugger shortly before the app gets usable. I see the debugging toolbar for a second before it vanishes again, though the app keeps running.
Tomcat-log:
Listening for transport dt_socket at address: 11555
23.03.2010 01:24:35 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
23.03.2010 01:24:35 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8084
23.03.2010 01:24:35 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 847 ms
23.03.2010 01:24:35 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
23.03.2010 01:24:35 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
23.03.2010 01:24:41 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8084
23.03.2010 01:24:41 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
23.03.2010 01:24:41 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/78 config=null
23.03.2010 01:24:41 org.apache.catalina.startup.Catalina start
INFO: Server startup in 5855 ms
23.03.2010 01:24:42 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context []
23.03.2010 01:24:45 org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/] has already been started
Debugging log:
Attached JPDA debugger to localhost:11555
Checking data source definitions for missing JDBC drivers...
Deploying JDBC driver to /Applications/NetBeans/apache-tomcat-6.0.20/lib/mysql-connector-java-5.1.6-bin.jar
Stopping Tomcat process...
Waiting for Tomcat...
Tomcat server stopped.
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
Undeploying ...
OK - Undeployed application at context path /
In-place deployment at /path/to/project/dir/build/web
deploy?config=file%3A%2Fvar%2Ffolders%2FZP%2FZPbqxGrbHFaUlXzAfgWV1%2B%2B%2B%2BTQ%2F-Tmp-%2Fcontext734173871283203218.xml&path=/
OK - Deployed application at context path /
start?path=/
Start is in progress...
OK - Started application at context path /
debug-display-browser:
Browsing: http://localhost:8084/
connect-client-debugger:
BUILD SUCCESSFUL (total time: 18 seconds)
System is Netbeans 6.8 on MacOS 10.6.2.
You should see if the TC server is still in debug mode. The easiest way to do that is to Debug->Attach Debugger to localhost;11555. If it is still running 'debuggable', you will be able to do a fair bit of debugging that way.
I had similar problem where debugging started but kind of stopped immediately. The application was deployed however. I was not even able to attach to debugger manually, even if the Tomcat was running in debug mode. By creating a simple debuggable hello world project and starting debugging it also made debugger to break to my "problem project"'s break points as well.. But this was not really way to work.
My problem was "solved" by dropping mysql-connector-java.jar from my web project. I don't see any reasoning, but it simply works now. FYI also, the Netbean's Tomcat config's property "Enable JDBC driver deployment" did not have effect.
My environment was Netbeans 6.9.1 and project type was maven2, run on on Win7.