Bug 268076 - Unable to start GlassFish 4.1 on macOS Sierra (Version 10.12)
Unable to start GlassFish 4.1 on macOS Sierra (Version 10.12)
Status: RESOLVED FIXED
Product: serverplugins
Classification: Unclassified
Component: GlassFish
8.1
Macintosh Mac OS X
: P1 with 2 votes (vote)
: TBD
Assigned To: Petr Hejl
issues@serverplugins
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-17 15:01 UTC by horensen
Modified: 2017-09-26 17:05 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Screenshot of GlassFish 4.1 server log (220.24 KB, image/png)
2016-09-17 15:01 UTC, horensen
Details
ThreadDump NetBeans: After GlassFish is started with NetBeans (22.90 KB, text/plain)
2016-09-26 20:21 UTC, Ulas
Details
ThreadDump NetBeans: Before GlassFish is started with NetBeans (16.83 KB, text/plain)
2016-09-26 20:21 UTC, Ulas
Details
Netbeans Proxy Settings (47.33 KB, image/png)
2016-09-27 13:58 UTC, bonnymwas
Details
Netbeans Proxy Settings (47.97 KB, image/png)
2016-09-27 14:00 UTC, bonnymwas
Details
Netbeans Proxy Settings Proof (46.40 KB, image/png)
2016-09-27 14:02 UTC, bonnymwas
Details
Netbeans Proxy Settings + OS Proxy Settings (84.16 KB, image/png)
2016-09-27 14:05 UTC, bonnymwas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description horensen 2016-09-17 15:01:57 UTC
Created attachment 162092 [details]
Screenshot of GlassFish 4.1 server log

After updating to macOS Sierra (Version 10.12), GlassFish 4.1 in NetBeans 8.0.2 is unable to start. GlassFish 4.1.1 in NetBeans 8.1 also does not work.

ERROR LOG (GLASSFISH 4.1 IN NETBEANS 8.0.2):

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Launching GlassFish on Felix platform
Sep 17, 2016 10:56:16 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Sep 17, 2016 10:56:16 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Sep 17, 2016 10:56:16 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@339b94d9 in service registry.
ERROR: Bundle org.glassfish.hk2.core [312] Error starting file:/Applications/NetBeans/glassfish-4.1/glassfish/modules/core.jar (org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve bundle revision org.glassfish.hk2.core [312.0] because it exports package 'com.sun.enterprise.module.bootstrap' and is also exposed to it from bundle revision org.glassfish.hk2.core [305.0] via the following dependency chain:
  org.glassfish.hk2.core [312.0]
    import: (osgi.wiring.package=org.jvnet.hk2.config)
     |
    export: osgi.wiring.package=org.jvnet.hk2.config; uses:=org.glassfish.hk2.bootstrap
  org.glassfish.hk2.config [117.1]
    import: (&(osgi.wiring.package=org.glassfish.hk2.bootstrap)(version>=2.4.0)(!(version>=3.0.0)))
     |
    export: osgi.wiring.package=org.glassfish.hk2.bootstrap; uses:=com.sun.enterprise.module.bootstrap
    export: osgi.wiring.package=com.sun.enterprise.module.bootstrap
  org.glassfish.hk2.core [305.0])
org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve bundle revision org.glassfish.hk2.core [312.0] because it exports package 'com.sun.enterprise.module.bootstrap' and is also exposed to it from bundle revision org.glassfish.hk2.core [305.0] via the following dependency chain:
  org.glassfish.hk2.core [312.0]
    import: (osgi.wiring.package=org.jvnet.hk2.config)
     |
    export: osgi.wiring.package=org.jvnet.hk2.config; uses:=org.glassfish.hk2.bootstrap
  org.glassfish.hk2.config [117.1]
    import: (&(osgi.wiring.package=org.glassfish.hk2.bootstrap)(version>=2.4.0)(!(version>=3.0.0)))
     |
    export: osgi.wiring.package=org.glassfish.hk2.bootstrap; uses:=com.sun.enterprise.module.bootstrap
    export: osgi.wiring.package=com.sun.enterprise.module.bootstrap
  org.glassfish.hk2.core [305.0]
	at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3980)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
	at java.lang.Thread.run(Thread.java:745)
#!## LogManagerService.postConstruct : rootFolder=/Applications/NetBeans/glassfish-4.1/glassfish
#!## LogManagerService.postConstruct : templateDir=/Applications/NetBeans/glassfish-4.1/glassfish/lib/templates
#!## LogManagerService.postConstruct : src=/Applications/NetBeans/glassfish-4.1/glassfish/lib/templates/logging.properties
#!## LogManagerService.postConstruct : dest=/Applications/NetBeans/glassfish-4.1/glassfish/domains/domain1/config/logging.properties
Info:   Running GlassFish Version: GlassFish Server Open Source Edition  4.1  (build 13)
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  (13) startup time : Felix (35,339ms), startup services(1,434ms), total(36,773ms)
Severe:   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)

Info:   Server shutdown initiated
Info:   Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@1be59f28 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@f72203.
Info:   Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@1be59f28 from service registry.
Info:   FileMonitoring shutdown
Completed shutdown of Log manager service
Info:   Shutdown procedure finished
Comment 1 horensen 2016-09-18 06:10:21 UTC
Workaround: run glassfish-4.1/bin/asadmin start-domain in Terminal, instead from the the menu in NetBeans.
Comment 2 Ulas 2016-09-23 13:11:44 UTC
I have also a problem to start GlassFish 4.1.1 in NetBeans 8.1 after installed macOS Sierra. JDK 1.8.0_102 is installed. With asadmin I can start Glassfish without any problem. Just when I try to start within NetBeans. And the other thing is the duration of the NetBeans installation tooks a lot of time. I have the same issue also on my MacBook and MacMini. Both with macOS Sierra. I have also deleted domain1 and created a new one. But always the same problem. Any idea?

Here the outputs while starting process of GlassFish within NetBeans:



Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Launching GlassFish on Felix platform
Sep 23, 2016 3:07:50 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFORMATION: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Sep 23, 2016 3:07:50 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNUNG: Skipping entry  because it is not an absolute URI.
Sep 23, 2016 3:07:50 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNUNG: Skipping entry  because it is not an absolute URI.
Sep 23, 2016 3:07:53 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner startBundles
WARNUNG: Can not start bundle file:/Applications/NetBeans/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@1bd875e5 in service registry.
#!## LogManagerService.postConstruct : rootFolder=/Applications/NetBeans/glassfish-4.1.1/glassfish
#!## LogManagerService.postConstruct : templateDir=/Applications/NetBeans/glassfish-4.1.1/glassfish/lib/templates
#!## LogManagerService.postConstruct : src=/Applications/NetBeans/glassfish-4.1.1/glassfish/lib/templates/logging.properties
#!## LogManagerService.postConstruct : dest=/Applications/NetBeans/glassfish-4.1.1/glassfish/domains/domain1/config/logging.properties
Information:   Running GlassFish Version: GlassFish Server Open Source Edition  4.1.1  (build 1)
Information:   Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Information:   Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Information:   Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Information:   Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Information:   Authorization Service has successfully initialized.
Information:   HV000001: Hibernate Validator 5.1.2.Final
Information:   Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Warnung:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Information:   Grizzly Framework 2.3.23 started in: 121ms - bound to [/0.0.0.0:8080]
Warnung:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Information:   Grizzly Framework 2.3.23 started in: 2ms - bound to [/0.0.0.0:8181]
Warnung:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Information:   Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:4848]
Information:   Grizzly Framework 2.3.23 started in: 5ms - bound to [/0.0.0.0:3700]
Information:   GlassFish Server Open Source Edition  4.1.1  (1) startup time : Felix (34'436ms), startup services(1'658ms), total(36'094ms)
Information:   JTS5014: Recoverable JTS instance, serverId = [100]
Information:   Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:7676]
Information:   Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@36f7d7b as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@713ec32d.
Information:   JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://10.0.1.18:8686/jndi/rmi://10.0.1.18:8686/jmxrmi
Comment 3 Ulas 2016-09-23 13:16:57 UTC
(In reply to Ulas from comment #2)
> I have also a problem to start GlassFish 4.1.1 in NetBeans 8.1 after
> installed macOS Sierra. JDK 1.8.0_102 is installed. With asadmin I can start
> Glassfish without any problem. Just when I try to start within NetBeans. And
> the other thing is the duration of the NetBeans installation tooks a lot of
> time. I have the same issue also on my MacBook and MacMini. Both with macOS
> Sierra. I have also deleted domain1 and created a new one. But always the
> same problem. Any idea?
> 
> Here the outputs while starting process of GlassFish within NetBeans:
> 
> 
> 
> Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m;
> support was removed in 8.0
> Launching GlassFish on Felix platform
> Sep 23, 2016 3:07:50 PM
> com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner
> createBundleProvisioner
> INFORMATION: Create bundle provisioner class = class
> com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
> Sep 23, 2016 3:07:50 PM
> com.sun.enterprise.glassfish.bootstrap.osgi.
> BundleProvisioner$DefaultCustomizer getLocations
> WARNUNG: Skipping entry  because it is not an absolute URI.
> Sep 23, 2016 3:07:50 PM
> com.sun.enterprise.glassfish.bootstrap.osgi.
> BundleProvisioner$DefaultCustomizer getLocations
> WARNUNG: Skipping entry  because it is not an absolute URI.
> Sep 23, 2016 3:07:53 PM
> com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner startBundles
> WARNUNG: Can not start bundle
> file:/Applications/NetBeans/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@1bd875e5 in service registry.
> #!## LogManagerService.postConstruct :
> rootFolder=/Applications/NetBeans/glassfish-4.1.1/glassfish
> #!## LogManagerService.postConstruct :
> templateDir=/Applications/NetBeans/glassfish-4.1.1/glassfish/lib/templates
> #!## LogManagerService.postConstruct :
> src=/Applications/NetBeans/glassfish-4.1.1/glassfish/lib/templates/logging.
> properties
> #!## LogManagerService.postConstruct :
> dest=/Applications/NetBeans/glassfish-4.1.1/glassfish/domains/domain1/config/
> logging.properties
> Information:   Running GlassFish Version: GlassFish Server Open Source
> Edition  4.1.1  (build 1)
> Information:   Server log file is using Formatter class:
> com.sun.enterprise.server.logging.ODLLogFormatter
> Information:   Realm [admin-realm] of classtype
> [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
> Information:   Realm [file] of classtype
> [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
> Information:   Realm [certificate] of classtype
> [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm]
> successfully created.
> Information:   Authorization Service has successfully initialized.
> Information:   HV000001: Hibernate Validator 5.1.2.Final
> Information:   Registered
> org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for
> persistence-type = replicated in BackingStoreFactoryRegistry
> Warnung:   Instance could not be initialized. Class=interface
> org.glassfish.grizzly.http.server.AddOn, name=http-listener-1,
> realClassName=org.glassfish.grizzly.http2.Http2AddOn
> Information:   Grizzly Framework 2.3.23 started in: 121ms - bound to
> [/0.0.0.0:8080]
> Warnung:   Instance could not be initialized. Class=interface
> org.glassfish.grizzly.http.server.AddOn, name=http-listener-2,
> realClassName=org.glassfish.grizzly.http2.Http2AddOn
> Information:   Grizzly Framework 2.3.23 started in: 2ms - bound to
> [/0.0.0.0:8181]
> Warnung:   Instance could not be initialized. Class=interface
> org.glassfish.grizzly.http.server.AddOn, name=admin-listener,
> realClassName=org.glassfish.grizzly.http2.Http2AddOn
> Information:   Grizzly Framework 2.3.23 started in: 1ms - bound to
> [/0.0.0.0:4848]
> Information:   Grizzly Framework 2.3.23 started in: 5ms - bound to
> [/0.0.0.0:3700]
> Information:   GlassFish Server Open Source Edition  4.1.1  (1) startup time
> : Felix (34'436ms), startup services(1'658ms), total(36'094ms)
> Information:   JTS5014: Recoverable JTS instance, serverId = [100]
> Information:   Grizzly Framework 2.3.23 started in: 1ms - bound to
> [/0.0.0.0:7676]
> Information:   Registered
> com.sun.enterprise.glassfish.bootstrap.osgi.
> EmbeddedOSGiGlassFishImpl@36f7d7b as OSGi service registration:
> org.apache.felix.framework.ServiceRegistrationImpl@713ec32d.
> Information:   JMXStartupService has started JMXConnector on JMXService URL
> service:jmx:rmi://10.0.1.18:8686/jndi/rmi://10.0.1.18:8686/jmxrmi

EDIT: A few minutes later I get this message:

"Glassfish Server start failed.
Please check server admin user name and password properties.
Also please check the server log file for other possible causes."

I have not changed: Username should be "admin" and password is blank. I have no idea.
Comment 4 bonnymwas 2016-09-25 08:26:26 UTC
Same goes for Tomcat too. Though in this case, the server is started but netbeans reports that it could not start the server. Its all confusing.
Comment 5 Petr Hejl 2016-09-26 14:11:10 UTC
Any firewall in place? What does netstat look like before the GF is going to be started?
Comment 6 Petr Hejl 2016-09-26 14:25:01 UTC
Can you also attach a threaddump for a situation when NetBeans is waiting for a GF to start?

http://wiki.netbeans.org/GenerateThreadDump
Comment 7 Ulas 2016-09-26 19:51:40 UTC
(In reply to Petr Hejl from comment #5)
> Any firewall in place? What does netstat look like before the GF is going to
> be started?

- Firewall is off
- Netstat after GF is started with NetBeans:

java      2686 ulas   37u  IPv6 0x4c02a3fe3992debb      0t0  TCP localhost:tlisrv (LISTEN)
java      2688 ulas  362u  IPv6 0x4c02a3fe3bf3897b      0t0  TCP *:http-alt (LISTEN)
java      2688 ulas  367u  IPv6 0x4c02a3fe3992d97b      0t0  TCP *:8181 (LISTEN)
java      2688 ulas  371u  IPv6 0x4c02a3fe3992d43b      0t0  TCP *:appserv-http (LISTEN)
java      2688 ulas  375u  IPv6 0x4c02a3fe397ee97b      0t0  TCP *:lrs-paging (LISTEN)
java      2688 ulas  379u  IPv6 0x4c02a3fe397eeebb      0t0  TCP *:sun-as-jmxrmi (LISTEN)
java      2688 ulas  392u  IPv6 0x4c02a3fe397ee43b      0t0  TCP *:imqbrokerd (LISTEN)


- Netstat after GF is started with asadmin:

java      2623 ulas  336u  IPv6 0x4c02a3fe397ee97b      0t0  TCP *:http-alt (LISTEN)
java      2623 ulas  367u  IPv6 0x4c02a3fe397eeebb      0t0  TCP *:8181 (LISTEN)
java      2623 ulas  371u  IPv6 0x4c02a3fe397ee43b      0t0  TCP *:appserv-http (LISTEN)
java      2623 ulas  375u  IPv6 0x4c02a3fe3982debb      0t0  TCP *:lrs-paging (LISTEN)
java      2623 ulas  380u  IPv6 0x4c02a3fe3982d43b      0t0  TCP *:sun-as-jmxrmi (LISTEN)
java      2623 ulas  393u  IPv6 0x4c02a3fe3bf3897b      0t0  TCP *:imqbrokerd (LISTEN)
Comment 8 Ulas 2016-09-26 20:21:15 UTC
Created attachment 162222 [details]
ThreadDump NetBeans: After GlassFish is started with NetBeans
Comment 9 Ulas 2016-09-26 20:21:45 UTC
Created attachment 162223 [details]
ThreadDump NetBeans: Before GlassFish is started with NetBeans
Comment 10 bonnymwas 2016-09-27 12:07:48 UTC
Found a working solution. Worked for the solution provider and worked for me too.

Here is the solution https://discussions.apple.com/message/30715103#message30715103

In a nutshell, this is the solution as copied from the link:

*******************************************************

Reasons: In mac OS SIerra ,the new update blocks the sites which uses system proxy settings, where localhost,127.0.0.1 all connections are blocked.
 
Solution:
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
You may get connection successful.
 
If connection gets successful, Now Clean & build your Applications in netbeans and press run .
Hope it will work . In my case it works.
********************************************************
Comment 11 Petr Hejl 2016-09-27 13:07:39 UTC
(In reply to bonnymwas from comment #10)
> Found a working solution. Worked for the solution provider and worked for me
> too.
> 
> Here is the solution
> https://discussions.apple.com/message/30715103#message30715103
> 
> In a nutshell, this is the solution as copied from the link:
> 
> *******************************************************
> 
> Reasons: In mac OS SIerra ,the new update blocks the sites which uses system
> proxy settings, where localhost,127.0.0.1 all connections are blocked.
>  
> Solution:
> 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
> You may get connection successful.
>  
> If connection gets successful, Now Clean & build your Applications in
> netbeans and press run .
> Hope it will work . In my case it works.
> ********************************************************

Can you describe what you had there before and what you have now configured? This could be issue in MacOS, NetBeans or both.
Comment 12 bonnymwas 2016-09-27 13:36:31 UTC
(In reply to Petr Hejl from comment #11)
> (In reply to bonnymwas from comment #10)
> > Found a working solution. Worked for the solution provider and worked for me
> > too.
> > 
> > Here is the solution
> > https://discussions.apple.com/message/30715103#message30715103
> > 
> > In a nutshell, this is the solution as copied from the link:
> > 
> > *******************************************************
> > 
> > Reasons: In mac OS SIerra ,the new update blocks the sites which uses system
> > proxy settings, where localhost,127.0.0.1 all connections are blocked.
> >  
> > Solution:
> > 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
> > You may get connection successful.
> >  
> > If connection gets successful, Now Clean & build your Applications in
> > netbeans and press run .
> > Hope it will work . In my case it works.
> > ********************************************************
> 
> Can you describe what you had there before and what you have now configured?
> This could be issue in MacOS, NetBeans or both.


I had a couple of issues:
1. Glassfish was not starting because port 8080 had been occupied by Tomcat. Sorted by shutting down tomcat.
2. Glassfish was not starting when started by netbeans because of the Mac OS update which is blocking applications that are using system proxy settings. GF would actually start but Netbeans would always report that it failed to start after a very long time of waiting. If you tried running an application, the same would not happen.
Comment 13 Petr Hejl 2016-09-27 13:42:49 UTC
(In reply to bonnymwas from comment #12)
> (In reply to Petr Hejl from comment #11)
> > (In reply to bonnymwas from comment #10)
> > > Found a working solution. Worked for the solution provider and worked for me
> > > too.
> > > 
> > > Here is the solution
> > > https://discussions.apple.com/message/30715103#message30715103
> > > 
> > > In a nutshell, this is the solution as copied from the link:
> > > 
> > > *******************************************************
> > > 
> > > Reasons: In mac OS SIerra ,the new update blocks the sites which uses system
> > > proxy settings, where localhost,127.0.0.1 all connections are blocked.
> > >  
> > > Solution:
> > > 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
> > > You may get connection successful.
> > >  
> > > If connection gets successful, Now Clean & build your Applications in
> > > netbeans and press run .
> > > Hope it will work . In my case it works.
> > > ********************************************************
> > 
> > Can you describe what you had there before and what you have now configured?
> > This could be issue in MacOS, NetBeans or both.
> 
> 
> I had a couple of issues:
> 1. Glassfish was not starting because port 8080 had been occupied by Tomcat.
> Sorted by shutting down tomcat.
> 2. Glassfish was not starting when started by netbeans because of the Mac OS
> update which is blocking applications that are using system proxy settings.
> GF would actually start but Netbeans would always report that it failed to
> start after a very long time of waiting. If you tried running an
> application, the same would not happen.

I'm sorry but I'm not sure what does this mean: "the Mac OS
update which is blocking applications that are using system proxy settings". Your "broken" settings would help us to debug this.
Comment 14 bonnymwas 2016-09-27 13:56:07 UTC
(In reply to Petr Hejl from comment #13)
> (In reply to bonnymwas from comment #12)
> > (In reply to Petr Hejl from comment #11)
> > > (In reply to bonnymwas from comment #10)
> > > > Found a working solution. Worked for the solution provider and worked for me
> > > > too.
> > > > 
> > > > Here is the solution
> > > > https://discussions.apple.com/message/30715103#message30715103
> > > > 
> > > > In a nutshell, this is the solution as copied from the link:
> > > > 
> > > > *******************************************************
> > > > 
> > > > Reasons: In mac OS SIerra ,the new update blocks the sites which uses system
> > > > proxy settings, where localhost,127.0.0.1 all connections are blocked.
> > > >  
> > > > Solution:
> > > > 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
> > > > You may get connection successful.
> > > >  
> > > > If connection gets successful, Now Clean & build your Applications in
> > > > netbeans and press run .
> > > > Hope it will work . In my case it works.
> > > > ********************************************************
> > > 
> > > Can you describe what you had there before and what you have now configured?
> > > This could be issue in MacOS, NetBeans or both.
> > 
> > 
> > I had a couple of issues:
> > 1. Glassfish was not starting because port 8080 had been occupied by Tomcat.
> > Sorted by shutting down tomcat.
> > 2. Glassfish was not starting when started by netbeans because of the Mac OS
> > update which is blocking applications that are using system proxy settings.
> > GF would actually start but Netbeans would always report that it failed to
> > start after a very long time of waiting. If you tried running an
> > application, the same would not happen.
> 
> I'm sorry but I'm not sure what does this mean: "the Mac OS
> update which is blocking applications that are using system proxy settings".
> Your "broken" settings would help us to debug this.


I updated my OS from EL Capitan to Sierra. Thats when the issue cropped up.
Turns out the default settings of Netbeans under 'Preferences', 'Proxy Settings' panel is set as 'Use System Proxy Settings'. Mac OS Sierra had disabled auto proxy discovery thus making the system not to have proxy settings. This is an OS issue and not a netbeans issue.

To verify that it is not a netbeans issue, under Netbeans > Preferences > Proxy Settings, tick on 'No Proxy' without altering anything anywhere else. This alone resolves the issue of starting GF from Netbeans.
Comment 15 bonnymwas 2016-09-27 13:58:48 UTC
Created attachment 162243 [details]
Netbeans Proxy Settings

This is after changing the network proxy settings for the OS
Comment 16 bonnymwas 2016-09-27 14:00:34 UTC
Created attachment 162244 [details]
Netbeans Proxy Settings

This is before changing the OS proxy settings. Clicked on 'Test Connection' over 10 minutes ago
Comment 17 bonnymwas 2016-09-27 14:02:00 UTC
Created attachment 162245 [details]
Netbeans Proxy Settings Proof

This is the proof that the proxy settings are the issue.
Comment 18 bonnymwas 2016-09-27 14:05:03 UTC
Created attachment 162246 [details]
Netbeans Proxy Settings + OS Proxy Settings

If you want Netbeans to run with its proxy settings set to 'Use System Proxy Settings' then you have to tick 'Auto Proxy Discovery' in the OS System Preferences > Networks > Proxies
Comment 19 Ulas 2016-09-28 07:26:05 UTC
Thanks. It works! :)
Comment 20 aosamai 2016-12-18 04:21:21 UTC
(In reply to bonnymwas from comment #10)
> Found a working solution. Worked for the solution provider and worked for me
> too.
> 
> Here is the solution
> https://discussions.apple.com/message/30715103#message30715103
> 
> In a nutshell, this is the solution as copied from the link:
> 
> *******************************************************
> 
> Reasons: In mac OS SIerra ,the new update blocks the sites which uses system
> proxy settings, where localhost,127.0.0.1 all connections are blocked.
>  
> Solution:
> 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
> You may get connection successful.
>  
> If connection gets successful, Now Clean & build your Applications in
> netbeans and press run .
> Hope it will work . In my case it works.
> ********************************************************

partially solved the issue, still glass fish is extremely slow while starting up. looks like we need a fundamental O.S. level solution to stop blocking those http calls to localhost, 127.0.0.1 etc.
Comment 21 aosamai 2016-12-18 04:25:50 UTC
i went to setting->network->wifi->proxies and checked the exclude simple hostnames box and that made everything work
Comment 22 Reza_Rahman 2017-02-14 19:20:58 UTC
I encountered the same issue. Annoying, but the workaround works.
Comment 23 Asalmerontkd 2017-09-26 17:05:15 UTC
(In reply to bonnymwas from comment #10)
> Found a working solution. Worked for the solution provider and worked for me
> too.
> 
> Here is the solution
> https://discussions.apple.com/message/30715103#message30715103
> 
> In a nutshell, this is the solution as copied from the link:
> 
> *******************************************************
> 
> Reasons: In mac OS SIerra ,the new update blocks the sites which uses system
> proxy settings, where localhost,127.0.0.1 all connections are blocked.
>  
> Solution:
> 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
> You may get connection successful.
>  
> If connection gets successful, Now Clean & build your Applications in
> netbeans and press run .
> Hope it will work . In my case it works.
> ********************************************************

This is the best solution, it worked very well for me.
Thanks bonnymwas@netbeans.org :)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo