[GLASSFISH-21350] Glassfish 4.1 won't start on OS X 10.10.3 Created: 17/Apr/15  Updated: 23/Apr/15  Resolved: 23/Apr/15

Status: Closed
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: hadrabap Assignee: Chris Kasso
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X 10.10.3


Issue Links:
Duplicate
duplicates GLASSFISH-21343 Glassfish fails to start on OSX 10.10.3 Open

 Description   

After upgrade to 10.10.3 and applying all security updates and patches, Glassfish won't start:

Petrs-MacBook-Pro:bin petr$ ./asadmin start-domain domain1 
JVM failed to start: com.sun.enterprise.admin.launcher.GFLauncherException: The server exited prematurely with exit code 1.
Before it died, it produced the following output:


Command start-domain failed.

When running in verbose mode everything works just fine:

./asadmin start-domain --verbose domain1

Everything works just fine except JMX connector which is unable to bind to my "public" IP address hence JMX does not work at all. The workaround is to set JMX connector to listen just on localhost instead of on all interfaces (0.0.0.0).

What's the difference between starting domain in normal and verbose way?

Related issues:

An attempt to start Glassfish from NetBeans leads to JVM crash dump.



 Comments   
Comment by hadrabap [ 17/Apr/15 ]

I've found that the problem seems to be in the usage of launchctl bsexec which requires root privileges. When I change that to nohup everything works fine. I made a patch which is against https://svn.java.net/svn/glassfish~svn/trunk/main/ revision 63845 and is located at https://java.net/attachments/lists/glassfish/users/2015-04/13/GFLauncher.patch.

Comment by sgtunix [ 21/Apr/15 ]

If you want this to work immediately on Yosemite, I suggest creating a wrapper script for launchctl. A solution is presented in this blog article:

https://medium.com/@tk512/glassfish-4-1-won-t-start-in-yosemite-10-10-3-c843488f6e76





[GLASSFISH-21346] Glassfish 4.1 fails to start on OSX 10.10.3 Created: 09/Apr/15  Updated: 21/Apr/15

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: pbelbin Assignee: Chris Kasso
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OSX 10.10.3



 Description   

launchctl dsexec now appears to require root priveliges to be used.

so, asadmin from cmd line does not work when it comes to starting.

interactive workaround: use the --verbose option when starting/stopping the domain. but, this means that the command never finishes (which makes it inappropriate for scripting)



 Comments   
Comment by pbelbin [ 10/Apr/15 ]

Just an observation: even though the asadmin from the command line fails, NetBeans is able to start glassfish. hmmmm. what's different about how NetBeans is starting glassfish?

Comment by gamussa [ 10/Apr/15 ]

related issue https://java.net/jira/browse/GLASSFISH-21343

Comment by sgtunix [ 21/Apr/15 ]

A temporary solution (before it's fixed in Glassfish) is to create a wrapper script for launchctl. I wrote a little blog entry explaining how to do this:

https://medium.com/@tk512/glassfish-4-1-won-t-start-in-yosemite-10-10-3-c843488f6e76





[GLASSFISH-21330] asadmin list-applications --long doesn't include enabled status if --terse is set Created: 17/Mar/15  Updated: 17/Mar/15

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Bill Shannon Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

$ asadmin list-applications --long
NAME TYPE STATUS
jtest <web> enabled
$ asadmin --terse list-applications --long
jtest <web>

Output should be:
jtest <web> enabled

--long is not the opposite of --terse, it probably should've been named --enabled.



 Comments   
Comment by Bill Shannon [ 17/Mar/15 ]

Here's the fix:

Index: ListComponentsCommand.java
===================================================================
— ListComponentsCommand.java (revision 63694)
+++ ListComponentsCommand.java (working copy)
@@ -180,7 +180,7 @@

for (Application app : apps) {
String[] currentRow;

  • if( !terse && long_opt ){
    + if( long_opt ){
    currentRow = new String[] { app.getName(), getAppSnifferEngines(app, true), getLongStatus(app) }

    ;
    @@ -198,7 +198,7 @@
    int numCols = 2;
    String[] headings = new String[]

    {"NAME", "TYPE", "STATUS"}

    ;
    int longestValue[] = new int[numCols];

  • if ( !terse && long_opt ) {
    + if ( long_opt )
    Unknown macro: { numCols = 3; longestValue = new int[] {headings[0].length(), headings[1].length(), headings[2].length() }; }




[GLASSFISH-21328] Resource deployments to a standalone instance can't be redirected back to the Admin Server once the SA instance is deleted Created: 12/Mar/15  Updated: 12/Mar/15

Status: Open
Project: glassfish
Component/s: admin, admin_gui
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: andrew_m_poloni Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL v6.6 (Santiago)
Java v1.8.0_40



 Description   

Once JDBC resources have been deployed to a standalone instance and that instance is deleted, they apparently don't migrate back to the Admin Server nor is there a way via the Admin console to re-target them back to the Admin Server. One ends up having to delete the domain and then recreate a new one to get the control of the resources back.






[GLASSFISH-21297] asadmin set command throws NPE on beans with read only properties Created: 04/Feb/15  Updated: 10/Mar/15

Status: In Progress
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: lgathy Assignee: mukesh.kumawat
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When setting some configurable attribute via asadmin set command, the operation fails with "remote failure: Cannot change the element: null".
To reproduce, execute:
asadmin set configs.config.default-config.java-config.jvm-options=-server



 Comments   
Comment by lgathy [ 04/Feb/15 ]

I have isolated the root cause of this and prepared a small patch that worked for me. I do not seem to have right to attach the patch here, but I can send it via email (or copy-paste it into a comment here).

Short description on the problem: in nucleus/core/kernel module com.sun.enterprise.v3.admin.SetCommand.setLeafElement iterates through all the methods of the parent bean to find the appropriate setter method. In line 539 the expression bean.model.toProperty(m) could return null, thus the method will raise a NPE. If the appropriate setter method is located after such a method in the returned array of methods then the attribute could never be set. In case of configs.config.default-config.java-config.jvm-options the parent class is com.sun.enterprise.config.serverbeans.JavaConfig, it throws an exception when reaching the getJavacOptionsAsList() method making e.g. jvmOptions property impossible to set.

Proposed solution is to check if bean.model.toProperty(m) returns null and continue to the next method.

Comment by lgathy [ 06/Feb/15 ]

Here is my patch:

Index: nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/SetCommand.java
===================================================================
--- nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/SetCommand.java	(revision 63760)
+++ nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/SetCommand.java	(working copy)
@@ -536,7 +536,9 @@
                     // collection parameter that parameterized with the right type
                     Class argClasses[] = m.getParameterTypes();
                     Type argTypes[] = m.getGenericParameterTypes();
-                    if (!bean.model.toProperty(m).xmlName().equals(elementName) ||
+                    ConfigModel.Property prop = bean.model.toProperty(m);
+                    if (prop == null ||
+                            !prop.xmlName().equals(elementName) ||
                             argClasses.length != 1 ||
                             !Collection.class.isAssignableFrom(argClasses[0]) ||
                             argTypes.length != 1 ||




[GLASSFISH-21293] DAS becomes deadlock at start-up after setting log level Created: 22/Jan/15  Updated: 05/May/15

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: xj Assignee: Arindam Bandyopadhyay
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS: Windows 8.1 64bits
RI: glassfish-4.1
JDK: 7u25, 8u20


Tags: javaee_ri_target

 Description   

Follow the steps below, asadmin command waits for a response forever.

(1)asadmin create-domain --nopassword=true mydomain
(2)asadmin start-domain mydomain
(3)asadmin set-log-levels org.jvnet.hk2.osgiadapter=FINER
(4)asadmin stop-domain mydomain
(5)asadmin start-domain mydomain

Here is a thread dump for this.
It looks like a deadlock happened on these threads.
"RunLevelControllerThread-1421897830803" daemon prio=6 tid=0x000000000ba99800
"RunLevelControllerThread-1421897830796" daemon prio=6 tid=0x000000000b99f000

2015-01-22 12:44:33
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.76-b04 mixed mode):

"pool-1-thread-1" daemon prio=6 tid=0x000000000bb1b800 nid=0x3fe4 waiting on condition [0x000000000d98f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x00000000f7fd57f0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2082)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1090)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:807)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

"RunLevelControllerThread-1421897830803" daemon prio=6 tid=0x000000000ba99800 nid=0x2c20 in Object.wait() [0x000000000e0de000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f7879d08> (a org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext)
    at java.lang.Object.wait(Object.java:503)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:188)
  • locked <0x00000000f7879d08> (a org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext)
    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)
  • locked <0x00000000f86b5398> (a java.lang.Object)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:647)
    at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
    at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:214)
    at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:237)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:360)
    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)
  • locked <0x00000000f7d55060> (a java.lang.Object)
    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)

"RunLevelControllerThread-1421897830796" daemon prio=6 tid=0x000000000b99f000 nid=0x2398 waiting on condition [0x000000000dd5c000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x00000000f85fbde8> (a java.util.concurrent.FutureTask)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
    at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:425)
    at java.util.concurrent.FutureTask.get(FutureTask.java:187)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture.get(LRUHybridCache.java:164)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache.compute(LRUHybridCache.java:303)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetDescriptor(ServiceLocatorImpl.java:1147)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:687)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:655)
    at com.sun.enterprise.server.logging.UniformLogFormatter.getProductId(UniformLogFormatter.java:192)
    at com.sun.enterprise.server.logging.UniformLogFormatter.uniformLogFormat(UniformLogFormatter.java:291)
    at com.sun.enterprise.server.logging.UniformLogFormatter.format(UniformLogFormatter.java:178)
    at java.util.logging.StreamHandler.publish(StreamHandler.java:196)
  • locked <0x00000000f85b3260> (a java.util.logging.ConsoleHandler)
    at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:105)
    at java.util.logging.Logger.log(Logger.java:616)
    at java.util.logging.Logger.doLog(Logger.java:641)
    at java.util.logging.Logger.logp(Logger.java:810)
    at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:181)
  • locked <0x00000000e1045178> (a org.jvnet.hk2.osgiadapter.OSGiModuleImpl)
    at org.jvnet.hk2.osgiadapter.OsgiPopulatorPostProcessor$1.loadClass(OsgiPopulatorPostProcessor.java:77)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2058)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:413)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.narrow(ServiceLocatorImpl.java:2120)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.access$900(ServiceLocatorImpl.java:119)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$8.compute(ServiceLocatorImpl.java:1063)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$8.compute(ServiceLocatorImpl.java:1058)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:115)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:111)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture.run(LRUHybridCache.java:173)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache.compute(LRUHybridCache.java:292)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetDescriptor(ServiceLocatorImpl.java:1147)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:687)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:655)
    at com.sun.enterprise.server.logging.UniformLogFormatter.getProductId(UniformLogFormatter.java:192)
    at com.sun.enterprise.server.logging.UniformLogFormatter.uniformLogFormat(UniformLogFormatter.java:291)
    at com.sun.enterprise.server.logging.UniformLogFormatter.format(UniformLogFormatter.java:178)
    at java.util.logging.StreamHandler.publish(StreamHandler.java:196)
  • locked <0x00000000f85b3260> (a java.util.logging.ConsoleHandler)
    at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:105)
    at java.util.logging.Logger.log(Logger.java:616)
    at java.util.logging.Logger.doLog(Logger.java:641)
    at java.util.logging.Logger.logp(Logger.java:810)
    at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:181)
  • locked <0x00000000e103b210> (a org.jvnet.hk2.osgiadapter.OSGiModuleImpl)
    at org.jvnet.hk2.osgiadapter.OsgiPopulatorPostProcessor$1.loadClass(OsgiPopulatorPostProcessor.java:77)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.loadClass(ServiceLocatorImpl.java:2058)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:413)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.narrow(ServiceLocatorImpl.java:2120)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.access$900(ServiceLocatorImpl.java:119)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$10.compute(ServiceLocatorImpl.java:1260)
    at org.jvnet.hk2.internal.ServiceLocatorImpl$10.compute(ServiceLocatorImpl.java:1255)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:115)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture$1.call(LRUHybridCache.java:111)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache$OriginThreadAwareFuture.run(LRUHybridCache.java:173)
    at org.glassfish.hk2.utilities.cache.LRUHybridCache.compute(LRUHybridCache.java:292)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetAllServiceHandles(ServiceLocatorImpl.java:1333)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:726)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServices(ServiceLocatorImpl.java:714)
    at com.sun.enterprise.server.logging.LogManagerService.getHandlerServices(LogManagerService.java:639)
    at com.sun.enterprise.server.logging.LogManagerService.postConstruct(LogManagerService.java:404)
    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)
  • locked <0x00000000f7d54fd8> (a java.lang.Object)
    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)

"Timer-0" daemon prio=6 tid=0x0000000009eec000 nid=0x2b70 in Object.wait() [0x000000000dabf000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f786d2a0> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:503)
    at java.util.TimerThread.mainLoop(Timer.java:526)
  • locked <0x00000000f786d2a0> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:505)

"FelixStartLevel" daemon prio=6 tid=0x000000000a011800 nid=0x1b28 in Object.wait() [0x000000000a3ae000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f9be27a8> (a java.util.ArrayList)
    at java.lang.Object.wait(Object.java:503)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:279)
  • locked <0x00000000f9be27a8> (a java.util.ArrayList)
    at java.lang.Thread.run(Thread.java:745)

"FelixDispatchQueue" daemon prio=6 tid=0x000000000906f000 nid=0xfc0 in Object.wait() [0x000000000923e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f9c16020> (a java.util.ArrayList)
    at java.lang.Object.wait(Object.java:503)
    at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:1063)
  • locked <0x00000000f9c16020> (a java.util.ArrayList)
    at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
    at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:101)
    at java.lang.Thread.run(Thread.java:745)

"Service Thread" daemon prio=6 tid=0x0000000008d77000 nid=0x136c runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" daemon prio=10 tid=0x0000000008d5b000 nid=0x17b0 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" daemon prio=10 tid=0x0000000008d5a000 nid=0x382c waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Attach Listener" daemon prio=10 tid=0x00000000076ed000 nid=0x439c runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x00000000076e4800 nid=0x3f50 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0x000000000767f000 nid=0x13ec in Object.wait() [0x0000000008b6f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000e09c93b8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
  • locked <0x00000000e09c93b8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" daemon prio=10 tid=0x0000000007678000 nid=0x4014 in Object.wait() [0x000000000899f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000e09b4e98> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:503)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
  • locked <0x00000000e09b4e98> (a java.lang.ref.Reference$Lock)

"main" prio=6 tid=0x00000000020fe800 nid=0x2304 in Object.wait() [0x000000000261e000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)

  • waiting on <0x00000000f7cad488> (a java.lang.Object)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.waitForResult(CurrentTaskFuture.java:485)
  • locked <0x00000000f7cad488> (a java.lang.Object)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.get(CurrentTaskFuture.java:334)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.get(CurrentTaskFuture.java:306)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFutureWrapper.get(CurrentTaskFutureWrapper.java:75)
    at org.glassfish.hk2.runlevel.internal.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:73)
    at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:534)
    at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:315)
    at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:228)
    at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:219)
  • locked <0x00000000f7c3c538> (a com.sun.enterprise.v3.server.AppServerStartup)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
  • locked <0x00000000f7c486a0> (a com.sun.enterprise.glassfish.bootstrap.GlassFishImpl)
    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:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
    at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)

"VM Thread" prio=10 tid=0x0000000007674800 nid=0x4098 runnable

"GC task thread#0 (ParallelGC)" prio=6 tid=0x0000000002114000 nid=0x4080 runnable

"GC task thread#1 (ParallelGC)" prio=6 tid=0x0000000002115800 nid=0x2588 runnable

"GC task thread#2 (ParallelGC)" prio=6 tid=0x0000000002117000 nid=0x1568 runnable

"GC task thread#3 (ParallelGC)" prio=6 tid=0x0000000002118800 nid=0x3ad4 runnable

"VM Periodic Task Thread" prio=10 tid=0x0000000008d6c000 nid=0xddc waiting on condition

JNI global references: 370






[GLASSFISH-21284] test failures in admin devtests after last HK2 integration (2.4.0-b06) Created: 09/Jan/15  Updated: 09/Feb/15  Resolved: 09/Feb/15

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: None
Fix Version/s: future release

Type: Bug Priority: Critical
Reporter: Romain Grécourt Assignee: jwells
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File GLASSFISH-21284.sh    
Tags: admin, glassfish, hk2, jersey

 Description   

list of failed tests:

lbconfig:

58.delete-http-lb-config FAILED!!!
59.create-http-lb-config FAILED!!!
62.disable-http-lb-server FAILED!!!
64.delete-http-lb-server-ref FAILED!!!
65.delete-http-lb-config FAILED!!!

getset:

issue-12172-delete-cl-no-ins

Note that it was integrated by jersey team at the time of the integration of jersey 2.14.

The issue itself seems to be in the HK2 config system. When a config ref is removed, the reference stays in memory but is persisted to the config file properly. A restart acts as a workaround.



 Comments   
Comment by Romain Grécourt [ 20/Jan/15 ]

attaching reproducer script.

Comment by Romain Grécourt [ 09/Feb/15 ]
Project:    glassfish
Repository: svn
Revision:   63761
Author:     jwells
Date:       2015-02-07 20:30:15 UTC
Link:       

Log Message:
------------
Fix asadmin tests that do negative transactions in hk2-config


Revisions:
----------
63761


Modified Paths:
---------------
trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/TransactionCallBackTest.java
trunk/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigImpl.java
trunk/main/nucleus/pom.xml
trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/DirectCreationTest.java


Diffs:
------
Index: trunk/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigImpl.java
===================================================================
--- trunk/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigImpl.java	(revision 63760)
+++ trunk/main/nucleus/common/amx-core/src/main/java/org/glassfish/admin/amx/impl/config/AMXConfigImpl.java	(revision 63761)
@@ -417,12 +417,12 @@
         /**
             Convert incoming attributes to HK2 requirements.
          */
-            List<ConfigSupport.AttributeChanges>
+            List<AttributeChanges>
         toAttributeChanges(final Map<String, Object> values)
         {
             if ( values == null ) return null;
             
-            final List<ConfigSupport.AttributeChanges> changes = ListUtil.newList();
+            final List<AttributeChanges> changes = ListUtil.newList();
             for (final String xmlName : mAttrs.keySet() )
             {
                 final Object value = mAttrs.get(xmlName);
@@ -728,7 +728,7 @@
     /**
     Callback to create sub-elements (recursively) on a newly created child element.
      */
-    private final class SubElementsCallback implements ConfigSupport.TransactionCallBack<WriteableView>
+    private final class SubElementsCallback implements TransactionCallBack<WriteableView>
     {
         private final List<CreateParams> mSubs;
 
Index: trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/DirectCreationTest.java
===================================================================
--- trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/DirectCreationTest.java	(revision 63760)
+++ trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/DirectCreationTest.java	(revision 63761)
@@ -49,6 +49,7 @@
 import org.glassfish.tests.utils.Utils;
 import static org.junit.Assert.*;
 import org.junit.Test;
+import org.jvnet.hk2.config.AttributeChanges;
 import org.jvnet.hk2.config.ConfigBean;
 import org.jvnet.hk2.config.ConfigBeanProxy;
 import org.jvnet.hk2.config.ConfigSupport;
@@ -120,7 +121,7 @@
 
         support.createAndSet(serviceBean, DasConfig.class, (List) null);
 
-        List<ConfigSupport.AttributeChanges> profilerChanges = new ArrayList<ConfigSupport.AttributeChanges>();
+        List<AttributeChanges> profilerChanges = new ArrayList<AttributeChanges>();
         String[] values = { "-Xmx512m", "-RFtrq", "-Xmw24" };
         ConfigSupport.MultipleAttributeChanges multipleChanges = new ConfigSupport.MultipleAttributeChanges("jvm-options", values );
         String[] values1 = { "profile" };
Index: trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/TransactionCallBackTest.java
===================================================================
--- trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/TransactionCallBackTest.java	(revision 63760)
+++ trunk/main/nucleus/admin/config-api/src/test/java/com/sun/enterprise/configapi/tests/TransactionCallBackTest.java	(revision 63761)
@@ -46,6 +46,7 @@
 import org.glassfish.tests.utils.Utils;
 import org.jvnet.hk2.config.ConfigBean;
 import org.jvnet.hk2.config.ConfigSupport;
+import org.jvnet.hk2.config.TransactionCallBack;
 import org.jvnet.hk2.config.TransactionFailure;
 import org.jvnet.hk2.config.WriteableView;
 
@@ -89,7 +90,7 @@
         configChanges.put("name", "funky-listener");
 
         ConfigSupport.createAndSet(serviceBean, NetworkListener.class, configChanges,
-                new ConfigSupport.TransactionCallBack<WriteableView>() {
+                new TransactionCallBack<WriteableView>() {
                     @SuppressWarnings({"unchecked"})
                     public void performOn(WriteableView param) throws TransactionFailure {
                         // if you know the type...
Index: trunk/main/nucleus/pom.xml
===================================================================
--- trunk/main/nucleus/pom.xml	(revision 63760)
+++ trunk/main/nucleus/pom.xml	(revision 63761)
@@ -147,8 +147,8 @@
         <servlet-api.version>3.1.0</servlet-api.version>
         <grizzly.version>2.3.15-gfa</grizzly.version>
         <saaj-api.version>1.3.4</saaj-api.version>
-        <hk2.version>2.4.0-b06</hk2.version>
-        <hk2.plugin.version>2.4.0-b06</hk2.plugin.version>
+        <hk2.version>2.4.0-b10</hk2.version>
+        <hk2.plugin.version>2.4.0-b10</hk2.plugin.version>
         <javax.el.version>3.0.1-b03</javax.el.version>
         <javax.el-api.version>3.0.1-b03</javax.el-api.version>
         <trilead-ssh2.version>build212-hudson-6</trilead-ssh2.version>




[GLASSFISH-21282] In 'asadmin change-master-password', entry of password less than 6 chars,Console display messy code Created: 31/Dec/14  Updated: 31/Dec/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: WilsonCheng Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 - Simplified Chinese


Issue Links:
Relates
relates to GLASSFISH-21017 In 'asadmin change-master-password', ... Resolved

 Description   

1. Called 'asadmin change-master-password --savemasterpassword=true <domain_name>'
2. Entered 'changeit' as existing password
3. Entered a new password of less than 6 characters (and then again)
4. Console display messy code

-------------------------

Errors generated by the process

1:Execute $

{JAVA_HOME}

/bin/ keytool.exe, if Exception, get ExceptionMessage
ProcessExecutor#execute() 332

2:From TempFile get ExceptionMessage
KeystoreManager#getExceptionMessage() 116
In the windows environment, read the following two positions TempFile
C:\Users\cxm\AppData\Local\Temp\stdout55263003497713392.tmp
C:\Users\cxm\AppData\Local\Temp\stderr2806922793298260583.tmp
Both TempFile use Unicode character set.
We can see, in Chinese environment, TempFile contains Chinese character.

3:Read the text in the TempFile
ProcessExecutor#readWithoutCheck() 584,590
In GF V4, using RandomAccessFile#readLine () to read the text line
According to JDK docs, RandomAccessFile#readLine (not) does support the full Unicode character set.
For details see:
http://docs.oracle.com/javase/7/docs/api/index.html
If in a similar Chinese this environment to execute the'asadmin change-master-password'command, When an error occurs console may display messy code.



 Comments   
Comment by WilsonCheng [ 31/Dec/14 ]

The solution
The use of RandomAccessFile#read (byte[] b) instead of RandomAccessFile#readLine ()
For details see ProcessExecutor.java.patch

ProcessExecutor.java
Index: ProcessExecutor.java
===================================================================
--- ProcessExecutor.java	(revision 63140)
+++ ProcessExecutor.java	(working copy)
@@ -577,17 +577,14 @@
         private String readWithoutCheck(final long seekPos) {
             final StringBuffer sb = new StringBuffer();
             RandomAccessFile rf = null;
-            int lines = 0;
             try {
                 rf = new RandomAccessFile(file, RMODE);
                 rf.seek(seekPos);
-                String tmp = rf.readLine();
-                while (tmp != null) {
-                    lines++;
+                byte[] byteArray = new byte[LAST_BYTES];
+                int count = rf.read(byteArray);
+                if (count > 0) {
+                    String tmp = new String(byteArray, 0, count);
                     sb.append(tmp);
-                    //sb.append(Character.LINE_SEPARATOR);
-                    sb.append('\n'); // adding a newline character is going to add one extra byte
-                    tmp = rf.readLine();
                 }
             }
             catch (Exception e) {
Comment by zhouronghui [ 31/Dec/14 ]

If GLASSFISH-21017 is fixed, this ISSUE should NOT happen? So, I link it to GLASSFISH-21017.





[GLASSFISH-21257] When creating file user with multiple instances and cluster a lot of errors are reported Created: 19/Nov/14  Updated: 19/Nov/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: antanas.bastys Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We have single DAS which manages single cluster (api-green) and two instances (stream1-green and stream2-green)
There are two configs - api-config for api-green cluster and stream-config for stream1-green and stream2-green instances

asadmin> list-configs                                                          
server-config
default-config
api-config
stream-config
Command list-configs executed successfully.
asadmin> 

Lets create user in api-config:

asadmin> create-file-user --groups CustomerDataServices --target api-config oop
remote failure: An error occurred during replication
Failure: Command create-file-user failed on server instance stream2-green: remote failure: Configuration for target api-config not found.
Failure: Command create-file-user failed on server instance stream1-green: remote failure: Configuration for target api-config not found.
Command create-file-user failed.
asadmin> 

api-config shows created users:

asadmin> list-file-users api-config
oop

however stream-config and server-config shows them as well
asadmin> list-file-users stream-config
oop

asadmin> list-file-users server-config
oop
Command list-file-users executed successfully.

Delete also fails:

asadmin> delete-file-user --target api-green oop
remote failure: An error occurred during replication
Failure: Command delete-file-user failed on server instance stream2-green: remote failure: Configuration for target api-green not found.
Failure: Command delete-file-user failed on server instance stream1-green: remote failure: Configuration for target api-green not found.
Command delete-file-user failed.

However list doesn't show user:

asadmin> list-file-users api-config
Command list-file-users executed successfully.
asadmin> list-file-users stream-config
Command list-file-users executed successfully.

Server version:

asadmin> version
Version = GlassFish Server Open Source Edition  4.1  (build 13)

There is definitely something wrong with user management



 Comments   
Comment by antanas.bastys [ 19/Nov/14 ]

Something similar found here: GLASSFISH-12836





[GLASSFISH-21256] Debug not shown correctly on General Information in the admin console Created: 15/Nov/14  Updated: 15/Nov/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: smillidge-c2b2 Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When looking at the General Information of a stand alone instance or the DAS the Debug setting is not shown correctly if Debug is enabled in the JVM settings but not on the command line.



 Comments   
Comment by smillidge-c2b2 [ 15/Nov/14 ]

This Payara commit fixes the issue

https://github.com/payara/Payara/commit/cd27e368cd8b2de196f21d1c7fe47d4497487bec





[GLASSFISH-21240] In simple Servlet not possible to make big (>2MB) Post request since missing max form post size bytes under network-confg/protocols/http-listener-1/http Created: 23/Oct/14  Updated: 23/Oct/14

Status: Open
Project: glassfish
Component/s: admin, admin_gui
Affects Version/s: 4.0, 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: MarioLovisi Assignee: Chris Kasso
Resolution: Unresolved Votes: 3
Labels: None
Remaining Estimate: 1 day
Time Spent: Not Specified
Original Estimate: 1 day
Environment:

All Platforms



 Description   

The maxFormPostSize is introduced to configure the max form post size internally.
The Grizzly configure max-form-post-size-bytes in 2.3. Since the default value is 2MByte it is not possible to make post request with bigger size in a simple Servlet. (like JSF)

We suppose to configure it as follows:
asadmin set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.max-form-post-size-bytes=5000

The web container has not invoke the setter in the backend even though it is set in asadmin.

As mentioned above, a new attribute max-form-post-size-bytes is added.
And this should be configurable in admin console to.

Grizzly code: ServerFilterConfiguration
private long maxPostSize = -1L;
private int maxFormPostSize = 2 * 1024 * 1024;
private int maxBufferedPostSize = 2 * 1024 * 1024;

sample of domain.xml
<protocol name="http-listener-2" security-enabled="true">
<http max-save-post-size-bytes="52428800"
max-form-post-size-bytes="52428800"
max-connections="250"
max-post-size-bytes="52428800"
default-virtual-server="server">






[GLASSFISH-21196] Remote Deploy of Maven EAR issues java.util.concurrent.TimeoutException Created: 15/Sep/14  Updated: 30/Sep/14

Status: Open
Project: glassfish
Component/s: admin, concurrency, deployment
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: gesker Assignee: Chris Kasso
Resolution: Unresolved Votes: 10
Labels: concurrency, deploy, jdk8, maven, netbeans, timeout
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Workstation: Win 8.1 Pro, jdk8_20, GlassFish_4.1, NetBeans_8.0.1
Server: Ubuntu Server 14.04, jdk8_20, GlassFish_4.1



 Description   

Maven Enterprise Project (of about 27 MB in size) cannot be deployed from NetBeans using DAS port.

This same EAR can successfully be deployed to GlassFish_4.1 on server using the Web – Admin console.

When attempting to deploy to the remote server from NetBeans on workstation the logs on the server record:

Exception while running a command
java.io.IOException: java.util.concurrent.TimeoutException
at org.glassfish.admin.payload.PayloadFilesManager.extractFile(PayloadFilesManager.java:584)
at org.glassfish.admin.payload.PayloadFilesManager.access$600(PayloadFilesManager.java:93)
at org.glassfish.admin.payload.PayloadFilesManager$DataRequestType$1.processPart(PayloadFilesManager.java:749)
at org.glassfish.admin.payload.PayloadFilesManager.processPartsExtended(PayloadFilesManager.java:618)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$UploadedFilesManager.extractFiles(CommandRunnerImpl.java:2074)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$UploadedFilesManager.<init>(CommandRunnerImpl.java:2046)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$UploadedFilesManager.<init>(CommandRunnerImpl.java:2025)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1155)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: java.util.concurrent.TimeoutException
at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:90)
at org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:173)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351)
at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695)
at org.glassfish.grizzly.portunif.BackChannelFilter.handleRead(BackChannelFilter.java:80)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351)
at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695)
at org.glassfish.grizzly.portunif.BackChannelFilter.handleRead(BackChannelFilter.java:80)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351)
at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695)
at org.glassfish.grizzly.http.io.InputBuffer.blockingRead(InputBuffer.java:1119)
at org.glassfish.grizzly.http.server.io.ServerInputBuffer.blockingRead(ServerInputBuffer.java:95)
at org.glassfish.grizzly.http.io.InputBuffer.fill(InputBuffer.java:1143)
at org.glassfish.grizzly.http.io.InputBuffer.read(InputBuffer.java:353)
at org.glassfish.grizzly.http.server.NIOInputStreamImpl.read(NIOInputStreamImpl.java:83)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.io.PushbackInputStream.read(PushbackInputStream.java:186)
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:238)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:194)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at org.glassfish.admin.payload.ZipPayloadImpl$Inbound$ZipEntryInputStream.read(ZipPayloadImpl.java:220)
at org.glassfish.admin.payload.PayloadFilesManager.extractFile(PayloadFilesManager.java:549)
... 46 more
Caused by: java.util.concurrent.TimeoutException
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:126)
at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:75)
at org.glassfish.grizzly.AbstractReader.read(AbstractReader.java:72)
at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:77)
... 80 more
]]

Some notes:

The ear is approx 27 MB.

Have run asadmin enable-secure-admin on the server. I am able to restart GlassFish_4.1 on the server and see its logs from Netbeans.

Had tried setting environment variable AS_ADMIN_READTIMEOUT="3600000" on the server within the init script but this did not help.

I wanted to rule out a configuration issue with my application as the issue so I did the following:

I creating some small projects in NetBeans_8.0.1:

Created a sample web application (no extras) from NetBeans template and it ran/deployed fine.
Created a sample web application (maven - no extras) from NetBeans template and it ran/deployed fine.
Created a sample EAR application (no extras) from NetBeans template and it ran/deployed fine.
Created a sample EAR application (maven - no extras) from NetBeans template and it ran/deployed fine.

So, added some dependencies to the sample maven EAR just to bulk up its size – again nothing fancy just eclipselink and primefaces stuff. The sample EAR now stood at about 26MB.

Tried to run (remote deploy) the sample again got the same java.io.IOException: java.util.concurrent.TimeoutException indicated above as I did for my actual application.



 Comments   
Comment by bhicks01 [ 17/Sep/14 ]

Another bug for the same issue is 21180: https://java.net/jira/browse/GLASSFISH-21180

Comment by dennis@gesker.com [ 30/Sep/14 ]

Maybe what is going on here has something to to with the interaction between Netbeans_8.0.1/Maven_3.2.3/GlassFish_4.1

I had a little bit of time yesterday so I tried to revisit the remote deploy issue.

I pointed my actual project via NetBeans at my remote Glassfish and again got the java.io.IOException: java.util.concurrent.TimeoutException – OK no change there.

However, I went to the Admin console and deployed – no errors where thrown but after clicking on my application none of the modules were visible. I tired deploying several times this same way and got the same results. EAR deployed but with no modules (as if the WAR and EJB/JAR were not present)

Just for the heck of it I dropped by EAR in the autodeploy directory and the application deployed completely correct. All modules were found and the context root was correct.

So, I took a step back and created a new/empty maven EAR project. Tried a remote deploy via Netbeans and threw no errors. However, in the address bar of the browser rather than the root context it displayed the full name of the WAR file "MyProject-web-1.0-SNAPSHOT" Going into the admin console and clicking on the application to launch that way the options did show the correct context root.

I tried to remote deploy the empty EAR a couple more times via Netbeans. Sometimes it was successful. Sometimes it failed with "java.io.IOException: java.util.concurrent.TimeoutException" and sometimes it failed with "java.io.EOFException"

I tired adding the following to the "maven-ear-plugin" section of my pom.xml of my EAR:

<modules>
<webModule>
<groupId>com.mycompany</groupId>
<artifactId>MyProject-web</artifactId>
<contextRoot>/MyProject-web</contextRoot>
</webModule>
<ejbModule>
<groupId>com.mycompany</groupId>
<artifactId>MyProject-ejb</artifactId>
</ejbModule>
</modules>

But the behavior remained the same. I'm new to Maven. So, the above is just my poking about but maybe it will give someone with a better understanding of the interrelationship of these three tools a hint that is useful.

I really would like to stick with maven as I like how it handles dependencies and keeps my repository clean but if it just gets in the way of seamless remote deploys I can drop back to standard project templates, too.

Any advice or more information I can collect?

Comment by bhicks01 [ 30/Sep/14 ]

I'm not using netbeans or maven for deployment. I am using a custom ant build system to run the asadmin remote deployment, and it is failing. In fact, we had our deploy command defaulted to "--upload=true", which would fail every time for some projects (this was done even for localhost deployment).

We've worked around this by scp'ing the jar/ear/war to the destination host, then running the asadmin command via an "ssh -q <asadmin deploy cmd>".





[GLASSFISH-21185] DAS server start up time out should be configurable and not hardcoded Created: 04/Sep/14  Updated: 04/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: davidwinters1980 Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows/Linux



 Description   

At present the DAS server start up timeout and instance server startup timeout values appear to be hard coded in the code. Timeout values like other timeout values in other services such as the transaction manager has configurable timeouts.

For example in the code the class CLIConstants contains the static variable WAIT_FOR_DAS_TIME_MS which is set to the 10 minutes which represents the DAS server timeout. We should be able to pass this timeout value in as a command line option to asadmin or have it defined in the asenv.conf file






[GLASSFISH-21181] java.net.BindException: Address already in use Created: 03/Sep/14  Updated: 03/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: theonion Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

My Os is Win7 i'm using glassfish 4.0 b89. When is start the server with
"asadmin start-domain"

asadmin start-domain .. continues very long time and ends with "serverNoStart Command start-domain failed."

The exception i see in the log file is:

[2014-09-03T15:31:30.000+0300] [glassfish 4.0] [SEVERE] [NCLS-CORE-00019] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1409747490000] [levelValue: 1000] [[
Shutting down server due to startup exception
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:414)
at sun.nio.ch.Net.bind(Net.java:406)
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:131)
at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:87)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:450)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:439)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:95)
at org.glassfish.grizzly.config.GenericGrizzlyListener.start(GenericGrizzlyListener.java:168)
at com.sun.enterprise.v3.services.impl.GlassfishNetworkListener.start(GlassfishNetworkListener.java:94)
at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start(GrizzlyProxy.java:230)
at com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:470)
at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:393)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:281)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:328)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:163)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2204)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.go(CurrentTaskFuture.java:362)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.access$100(CurrentTaskFuture.java:279)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.go(CurrentTaskFuture.java:113)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.proceedTo(AsyncRunLevelContext.java:296)
at org.glassfish.hk2.runlevel.internal.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:66)
at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:532)
at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:329)
at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:226)
at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:217)
at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
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:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
]]

all through the server is accessible on localhost:4848 and looks started



 Comments   
Comment by theonion [ 03/Sep/14 ]

I've forgot - server cant be restarted trough the web admin - endless loading . It can only be stopped.





[GLASSFISH-21180] Asadmin remote deploy failing with TimeoutException or hanging Created: 02/Sep/14  Updated: 28/Apr/15  Resolved: 28/Apr/15

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: 4.2

Type: Bug Priority: Critical
Reporter: pdudits Assignee: Arindam Bandyopadhyay
Resolution: Fixed Votes: 33
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

4.1b13 Windows Server 2008 R2, JDK 1.7.0_25, 1.8.0_11


Tags: javaee_ri_fix, javaee_ri_target

 Description   

remote deploy over asadmin fails with error

remote failure: Request failed.

Server logs the following (we redirect j.u.l to logback, therefore different formatting):

[2014-09-02 15:02:16,280] [admin-listener(4)] [INFO] [javax.enterprise.admin.rest]: An error occurred while processing the request. Please see the server logs for details.
org.jvnet.mimepull.MIMEParsingException: java.io.IOException: java.util.concurrent.TimeoutException
	at org.jvnet.mimepull.MIMEParser.fillBuf(MIMEParser.java:442) ~[na:na]
	at org.jvnet.mimepull.MIMEParser.skipPreamble(MIMEParser.java:307) ~[na:na]
	at org.jvnet.mimepull.MIMEParser.access$300(MIMEParser.java:68) ~[na:na]
	at org.jvnet.mimepull.MIMEParser$MIMEEventIterator.next(MIMEParser.java:149) ~[na:na]
	at org.jvnet.mimepull.MIMEParser$MIMEEventIterator.next(MIMEParser.java:132) ~[na:na]
	at org.jvnet.mimepull.MIMEMessage.makeProgress(MIMEMessage.java:198) ~[na:na]
	at org.jvnet.mimepull.MIMEMessage.parseAll(MIMEMessage.java:181) ~[na:na]
	at org.jvnet.mimepull.MIMEMessage.getAttachments(MIMEMessage.java:106) ~[na:na]
	at com.sun.enterprise.admin.remote.reader.MultipartProprietaryReader.readFrom(MultipartProprietaryReader.java:98) ~[na:na]
	at org.glassfish.admin.rest.readers.MultipartFDPayloadReader.readFrom(MultipartFDPayloadReader.java:72) ~[na:na]
	at org.glassfish.admin.rest.readers.MultipartFDPayloadReader.readFrom(MultipartFDPayloadReader.java:59) ~[na:na]
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:251) ~[na:na]
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:229) ~[na:na]
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:149) ~[na:na]
	at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundReadFrom(MappableExceptionWrapperInterceptor.java:73) ~[na:na]
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:149) ~[na:na]
	at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1124) ~[na:na]
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:851) ~[na:na]
	at org.glassfish.jersey.server.ContainerRequest.readEntity(ContainerRequest.java:270) ~[na:na]
	at org.glassfish.jersey.server.internal.inject.EntityParamValueFactoryProvider$EntityValueFactory.provide(EntityParamValueFactoryProvider.java:96) ~[na:na]
	at org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:81) ~[na:na]
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues(JavaResourceMethodDispatcherProvider.java:121) ~[na:na]
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152) ~[na:na]
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104) ~[na:na]
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387) ~[na:na]
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331) ~[na:na]
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103) ~[na:na]
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271) ~[na:na]
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) ~[na:na]
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) ~[na:na]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[na:na]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[na:na]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267) ~[na:na]
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297) ~[na:na]
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254) ~[na:na]
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028) ~[na:na]
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:365) ~[na:na]
	at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173) ~[na:na]
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179) ~[na:na]
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) ~[kernel.jar:na]
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) ~[kernel.jar:na]
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na]
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na]
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) ~[nucleus-grizzly-all.jar:na]
	at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
Caused by: java.io.IOException: java.util.concurrent.TimeoutException
	at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:90) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:173) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.portunif.BackChannelFilter.handleRead(BackChannelFilter.java:80) ~[na:na]
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.portunif.BackChannelFilter.handleRead(BackChannelFilter.java:80) ~[na:na]
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.read(DefaultFilterChain.java:351) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.FilterChainContext.read(FilterChainContext.java:695) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.http.io.InputBuffer.blockingRead(InputBuffer.java:1119) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.http.server.io.ServerInputBuffer.blockingRead(ServerInputBuffer.java:95) ~[na:na]
	at org.glassfish.grizzly.http.io.InputBuffer.fill(InputBuffer.java:1143) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.http.io.InputBuffer.read(InputBuffer.java:353) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.http.server.NIOInputStreamImpl.read(NIOInputStreamImpl.java:83) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.jersey.message.internal.EntityInputStream.read(EntityInputStream.java:101) ~[na:na]
	at org.jvnet.mimepull.MIMEParser.fillBuf(MIMEParser.java:440) ~[na:na]
	... 71 common frames omitted
Caused by: java.util.concurrent.TimeoutException: null
	at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:126) ~[na:na]
	at org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorReader.read(TemporarySelectorReader.java:75) ~[na:na]
	at org.glassfish.grizzly.AbstractReader.read(AbstractReader.java:72) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:77) ~[nucleus-grizzly-all.jar:na]
	... 96 common frames omitted
[2014-09-02 15:02:16,296] [admin-listener(4)] [WARN] [javax.enterprise.system.core]: Internal Server error: /command/deploy
java.lang.RuntimeException: java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called.
	at org.glassfish.admin.rest.adapter.RestAdapter.reportError(RestAdapter.java:346) ~[na:na]
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:209) ~[na:na]
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) ~[kernel.jar:na]
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) ~[kernel.jar:na]
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na]
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231) ~[na:na]
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) ~[nucleus-grizzly-all.jar:na]
	at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
Caused by: java.lang.IllegalStateException: Illegal attempt to call getOutputStream() after getWriter() has already been called.
	at org.glassfish.grizzly.http.server.Response.getNIOOutputStream(Response.java:624) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.grizzly.http.server.Response.getOutputStream(Response.java:649) ~[nucleus-grizzly-all.jar:na]
	at org.glassfish.admin.rest.adapter.RestAdapter.reportError(RestAdapter.java:342) ~[na:na]
	... 34 common frames omitted

There are no issues with deployment over admin gui or via localhost, timeouts are left at default values.

From another client, we see different behaviour when launching deploy - admin thread hangs around this stacktrace.

"admin-listener(4)" daemon prio=6 tid=0x000000000d276000 nid=0x21dc runnable [0x000000001056d000]
   java.lang.Thread.State: RUNNABLE
	at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:571)
	at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeSync(SSLBaseFilter.java:538)
	at org.glassfish.grizzly.ssl.SSLBaseFilter.rehandshake(SSLBaseFilter.java:751)
	at org.glassfish.grizzly.ssl.SSLBaseFilter.renegotiate(SSLBaseFilter.java:736)
	at org.glassfish.grizzly.ssl.SSLBaseFilter.getPeerCertificateChain(SSLBaseFilter.java:793)
	at org.glassfish.grizzly.ssl.SSLBaseFilter.handleEvent(SSLBaseFilter.java:243)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$6.execute(ExecutorResolver.java:94)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:907)
	at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:890)
	at org.glassfish.grizzly.portunif.BackChannelFilter.handleEvent(BackChannelFilter.java:131)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$6.execute(ExecutorResolver.java:94)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:907)
	at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:890)
	at org.glassfish.grizzly.http.server.util.RequestUtils.populateCertificateAttribute(RequestUtils.java:75)
	at org.glassfish.grizzly.http.server.Request.getAttribute(Request.java:873)
	at org.glassfish.grizzly.http.server.Request.getUserPrincipal(Request.java:1859)
	at com.sun.enterprise.admin.util.AdminCallbackHandler.<init>(AdminCallbackHandler.java:110)
	at com.sun.enterprise.admin.util.GenericAdminAuthenticator.authenticate(GenericAdminAuthenticator.java:254)
	at com.sun.enterprise.admin.util.GenericAdminAuthenticator.loginAsAdmin(GenericAdminAuthenticator.java:219)
	at com.sun.enterprise.admin.util.GenericAdminAuthenticator.loginAsAdmin(GenericAdminAuthenticator.java:202)
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:168)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)


 Comments   
Comment by bhicks01 [ 17/Sep/14 ]

I am also seeing the MIMEParsingException for the timeout issue on RHEL5.4 (2.6.18-164.11.1.e15), JDK 1.7.0_45 and JDK 1.8.0_20.

Is there a way to specify the timeout or another work around to get the remote deployment working? Manually using the Admin GUI is not feasible and restricting deployment to localhost would require a bit of work.

EDIT: Updated comment to include kernel version as well as different version of java.

Comment by azuchi [ 18/Sep/14 ]

The same behavior occurs on Ubuntu 14.04 LTS, JDK 1.8.0_05-b13.

Comment by pdudits [ 18/Sep/14 ]

I also tried linux now as well to see if can be platform, environment or JDK version issue.

It is not. Timeout occurs on Ubuntu 14.04, Oracle JDK 1.7.0_67-b01.

Comment by pdudits [ 18/Sep/14 ]

An example war file to try: http://dl.bintray.com/pdudits/generic/#applicationPetstore.war, built from https://github.com/pdudits/agoncal-application-petstore-ee7

Comment by David Delabassee [ 19/Sep/14 ]

I was just hit by that same issue too (OS X 10.9 SE8u20).
I'll investigate this in more after J1.

Comment by darkling [ 30/Sep/14 ]

Also, on OS X 10.9 SE7u67.

Comment by gordian74 [ 06/Oct/14 ]

I also receive this
Debian 7 (wheezy)
Glassfish 4.1 build 13
java 1.8.20 (Or 1.7.0_67-b01)

I also notice that this occurs when the war that is beeing deployed has some dependencies included in the war file itself (WEB-INF/lib/)
It doesnt seem to matter how small the included jar file is it still fails as soon as you include it this into the war file.

Comment by khades [ 08/Oct/14 ]

ok, i am affected too, BUT

After some investigation i found out that domains, created in glassfish 4.1 are affected to that but, while glassfish 4.0 upgraded domains works OK.

Comment by gordian74 [ 08/Oct/14 ]

How did you upgrade the domain?

Comment by angelcervera [ 25/Oct/14 ]

With Glassfish 4.0, working.
With Glassfish 4.1:

  • Deploy remotely using asadmin: No way!
  • Using web admin: Working

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise

~$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

GlassFish Server Open Source Edition 4.1 (build 13)

Comment by pranahata [ 28/Oct/14 ]

Ok,

So

These are my mathematics:

+ 24 votes
+ most voted 4.1 issue
+ issue marked as critical [1]
+ happens on all platforms
+ opened 2 months ago
+ prevents from deploying from a CI server and hence puts people off from upgrading to 4.1
----------------------------------------------------------------------------------------
= no work log + no patch + not a word from the glassfish team

Hellooooooooooooooo

[1] https://java.net/jira/browse/GLASSFISH-21180?jql=project%20%3D%20GLASSFISH%20AND%20affectedVersion%20%3D%204.1%20ORDER%20BY%20votes%20DESC

Comment by philross [ 28/Oct/14 ]

To be fair, Reza Rahman attempted to get the ball rolling with this but I wasn't able to get back to him with enough details.

Comment by bhicks01 [ 28/Oct/14 ]

What additional information do you need? It seems there are enough people interested that some more information could be provided to help get the ball rolling.

This bug should probably be merged with the other I mentioned in first comment.

Thanks.

Comment by smillidge-c2b2 [ 28/Oct/14 ]

I have tried to reproduce this so that I can fix it in Payara. I followed these steps but failed to reproduce the issue on Ubuntu.

On Ubuntu server 1

unzip glassfish.zip
asadmin start-domain domain1
create a 2 node cluster through the console called test
change administrator password through the console
./asadmin enable-secure-admin
./asadmin start-cluster test
./asadmin restart-domain domain1

On Ubuntu Server 2

unzip glassfish.zip
./asadmin --user admin --host 192.168.79.131 --port 4848 --secure deploy --target test --name test-ejb /home/steve/test-ejb.jar
Application deployed with name test-ejb
Command deploy executed successfully.
./asadmin --user admin --host 192.168.79.131 --port 4848 --secure redeploy --target test --name test-ejb /home/steve/test-ejb.jar
Application deployed with name test-ejb.
Command redeploy executed successfully.
./asadmin --user admin --host 192.168.79.131 --port 4848 --secure undeploy --target test test-ejb
Command undeploy executed successfully.

Can people narrow down under what circumstances this occurs?

Comment by smillidge-c2b2 [ 28/Oct/14 ]

OK got it the file existed in Ubuntu Server 1 at the path specified so was not uploaded. Looks like it is in the upload of the jar file.

Will investigate

Comment by gcruscoe [ 28/Oct/14 ]

Thank you Payara!

Just to make everyone aware, a simple work around that I did was to use the java/groovy ssh/scp to copy the file and run the command locally on the box rather than using the remote deployment.

import static com.aestasit.ssh.DefaultSsh.*
remoteSession(user:password@host:22) {
scp file, '/tmp/'
exec "/opt/glassfish4/glassfish/bin/asadmin deploy /tmp/$

{baseName}

"
}

or some such...

Comment by smillidge-c2b2 [ 28/Oct/14 ]

Further narrowing down of the conditions when this occurs.

You can get this to fail deploying to the DAS from the same host if you run;

./asadmin deploy --force --target server --name test-ejb --secure --upload=true /home/steve/test-ejb.jar FAILS

However if you disable secure admin

./asadmin disable-secure-admin
./asadmin restart-domain domain1
./asadmin deploy --force --target server --name test-ejb --upload=true /home/steve/test-ejb.jar SUCCEEDS

Comment by smillidge-c2b2 [ 28/Oct/14 ]

Another work around (similar to the above) is to scp the jar onto the DAS host and then run the deploy remotely with --upload=false and the path to the jar on the DAS host.
./asadmin --user admin --host 192.168.79.131 --port 4848 --secure deploy --force --target server --name test-ejb --upload=false /home/steve/test-ejb.jar

Comment by smillidge-c2b2 [ 29/Oct/14 ]

This is a horrible heisenbug. If you run the debugger on GlassFish with a break point in TemporarySelectorReader.read the deploy works every time. Take the debugger off and it fails.

Comment by bornoz [ 03/Nov/14 ]

Same at

Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Linux Srv10 3.10.0-123.9.2.el7.x86_64 #1 SMP Tue Oct 28 18:05:26 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Glassfish 4.1b13

Comment by smillidge-c2b2 [ 04/Nov/14 ]

I suspect this is a Grizzly issue. After having debugged this extensively on the client and server side the problem appears to be timing related in Grizzly. I am still trying to track down exactly what happens. However I have a hunch this is related to Grizzly commit

https://github.com/GrizzlyNIO/grizzly-mirror/commit/262b9c90c5d9419163e078066ba7421a6d32b959

As this made a large number of changes in exactly the area that is now exhibiting nasty timing problems.

The problem is VERY time sensitive putting in place debugging can disrupt the problem.

Comment by smillidge-c2b2 [ 04/Nov/14 ]

I've raised https://java.net/jira/browse/GRIZZLY-1713 to see if we can get input from the Grizzly team

Comment by pranahata [ 07/Nov/14 ]

Guys,

We've got about 7 v4 domains running and this is stopping us from upgrading.

Can someone just tell us what the plan for these kind of scenarios is? Is it going to be a 4.1.1 any time soon?

Comment by smillidge-c2b2 [ 08/Nov/14 ]

For all watchers oleksiys has kindly attached a Grizzly patch to the Grizzly JIRA https://java.net/jira/browse/GRIZZLY-1713 which fixes it for us in Payara for both the local case with --upload=true and from a host remote to the DAS. Please try the patched grizzly jar and see if it works for you.

Thanks oleksiys

Comment by lukaskuzmiak [ 17/Nov/14 ]

oleksiys' patch works great - https://java.net/jira/browse/GRIZZLY-1713?focusedCommentId=381737&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-381737

just replaced the jar in my glassfish remote installation and NetBeans remote deploy works again, yay!

it seems this has been merged to glassfishv41 branch - https://java.net/jira/browse/GRIZZLY-1713?focusedCommentId=381755&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-381755

I hope there's going to be a release soon.

Lukas

Comment by joeydaowang [ 06/Jan/15 ]

Does anyone try to use REST admin interface to deploy applications. It doesn't work in GF 4.1, but works in GF 4.0. I tried the patch above, it doesn't help.
We are using curl for requesting the REST service like:
'curl.exe ^
--user %1:%2 ^
--insecure ^
-H "Accept: application/json" ^
-H "X-Requested-By: dummy" ^
-X POST ^
-F id=@%3 ^
-F contextroot=%4 ^
-F name=%4 ^
-F force=true ^
https://%5/management/domain/applications/application/'

Comment by Arindam Bandyopadhyay [ 28/Apr/15 ]

Grizzly 2.3.19 integrated with GF trunk/main. on 8th April 2015.
Committed revision 63835
It fixes the issue in recent nightly builds of glassfish .

Comment by Arindam Bandyopadhyay [ 28/Apr/15 ]

Fixed in trunk/main. Fixed as Grizzly 2.3.19 is integrated with GF





[GLASSFISH-21178] asadmin start-database does not work with JDK 1.7u67 - AccessControlException: access denied Created: 01/Sep/14  Updated: 12/May/15

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: everettrj Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

JDK 1.7u67


Tags: javaee_ri_target

 Description   

asadmin start-database fails once JDK updated to latest version (7u67). Was OK with JDK 7u45.

Fails in derby.log:
Fri Aug 29 15:04:21 BST 2014 : Security manager installed using the Basic server
security policy.
Fri Aug 29 15:04:21 BST 2014 : access denied ("java.net.SocketPermission"
"localhost:1527" "listen,resolve")
Fri Aug 29 15:04:21 BST 2014 : access denied ("java.net.SocketPermission"
"localhost:1527" "listen,resolve")
java.security.AccessControlException: access denied ("java.net.SocketPermission"
"localhost:1527" "listen,resolve")

This looks exactly like GLASSFISH-21004 reported against GlassFish 4.

Could a new version of JavaDB be incorporated into the next release of GlassFish 3?



 Comments   
Comment by Arindam Bandyopadhyay [ 12/May/15 ]

It's successfully working on glassfish 4.1





[GLASSFISH-21145] list-domains displays incorrect status of remote host Created: 27/Jul/14  Updated: 11/Dec/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5, 4.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: soto1231 Assignee: Chris Kasso
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows 7



 Description   

Precondition: A local glassfish installed clustered with two instances (one per node), and a remote glassfish (clustered the same way) installed on another machine on the same network

Issue: running -> asadmin --host myremotehost list-domains
picks up the local glassfish domain status, instead of the remote glassfish
For example, if the local domain is not running, while the remote is running the command will return "not running". If the local domain is then started, running the same command again will now return "running".

One item to note with a similar command, is running -> asadmin --host myremotehost list-instances
works correctly and picks up the status of the remote glassfish instances versus the local instances.
For example, if the local domain is running but the instances are not running and the remote domain is running with both instances running as well, the command returns their status as "running", as expected.



 Comments   
Comment by swiser [ 11/Dec/14 ]

Glassfish Version - 4.1 (build 13)

This behavior is also observable using the 'start-domain <domain>' subcommand. When issued with the --host command, it will start the <domain> on the local host not the remote host.

list-instances and list-applications correctly list the remote host instances and applications as expected. (as soto1231 pointed out)

stop-domain also works as expected with --host <remote host> and stops the domain on the --port <port>. asadmin does not allow a domain to be specified when --host is given.

This can be repeated by following these steps

LIST-DOMAINS
Two Glassfish servers are needed. ServerA is remote host ServerB is local host

On ServerA : asadmin start-domain domain1 # Starting the domain to make sure it's running
On ServerB : asadmin --host ServerA --user ... --port --secure list-domains # check status of domain1
domain 1 not running
Command list-domains executed successfully.
On ServerA : asadmin list-domains # Check ServerA to make sure domain1 is in fact running
domain1 running
Command list-domains executed successfully.

START-DOMAIN
Two Glassfish servers are needed. ServerA is remote host ServerB is local host

Start with domain1 stopped on both servers

ServerB: asadmin --host ServerA --user ... --port --secure start-domain domain1 # remotely start domain1
Waiting for domain1 to start .........
Successfully started the domain : domain1
domain Location: /opt/glassfish4/glassfish/domains/domain1
Log File: /opt/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.

ServerA: asadmin list-domains # list domains on ServerA. Expected result is that domain1 IS running
domain1 not running
Command start-domain executed successfully.

ServerB: asadmin list-domains # assuming domain1 existed on this server. Expected result is domain1 NOT running
domain1 runing
Command start-domain executed successfully.





[GLASSFISH-21138] After editing Availability service in configurations domain.xml corrupted Created: 21/Jul/14  Updated: 26/Oct/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1_b07, 4.1_b08, 4.1_b09
Fix Version/s: None

Type: Bug Priority: Major
Reporter: dmatej Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: 1 hour
Time Spent: Not Specified
Original Estimate: 1 hour

Tags: availability, clustered, domain

 Description   

1) Create some configuration
2) Edit Availability Service (anything ... f.e. turn SSO failover on)
3) Save

domain.xml then contains two elements
<availability-service></availability-service>

  • one is empty and one contains saved settings.

The result of this is that GUI does not reflect saved configuration and I could not start IMQ broker on cluster instances - the imq folder was not created and startup ended up with nullpointers in server.log!

Same problem is both using GUI and asadmin command. When I delete the empty element, everything works.



 Comments   
Comment by Anissa Lam [ 15/Aug/14 ]

I am not sure why this was assigned to me.
From the comment, this is not a gui issue, since it says the same problem occurs when using GUI or asadmin command.
Console doesn't write out to domain.xml
I think config team should investigate why there are 2 entries of <availability-service> element created.

Comment by smillidge-c2b2 [ 26/Oct/14 ]

This commit fixes the bug

https://github.com/payara/Payara/commit/4f8c0bf00540e5e4d964fce4226d9d0976addec9

I suspect this commit introduced the bug so it should be reviewed against that fix;

https://java.net/projects/glassfish/sources/svn/revision/61485





[GLASSFISH-21117] Enter a positive integer value for: Max Post Size Created: 08/Jul/14  Updated: 27/Mar/15  Resolved: 02/Mar/15

Status: Resolved
Project: glassfish
Component/s: admin, admin_gui
Affects Version/s: 4.1_b08
Fix Version/s: 4.2

Type: Bug Priority: Major
Reporter: gcruscoe Assignee: Vinay Vishal
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: fishcat, javaee_ri_fix

 Description   

Go to the server-config -> network config -> http listeners -> http listener-2 (https) -> Http Tab

Try to update something other than the Max Post Size (which is defaulted to -1). For instance, I need to turn off compression to see if a different bug goes away (https not working). I cannot save because -1 is an invalid number.



 Comments   
Comment by gcruscoe [ 08/Jul/14 ]

This should have the fishcat tag set. I cannot set this now that the bug is created.

Comment by jclingan [ 08/Jul/14 ]

Added "fishcat" tag.

Comment by ratking [ 10/Oct/14 ]

I encountered the same problem in GlassFish 4.1

Comment by doobrie [ 13/Feb/15 ]

I've created a patch for this issue

Index: appserver/admingui/web/src/main/resources/grizzly/httpAttr.inc
===================================================================
--- appserver/admingui/web/src/main/resources/grizzly/httpAttr.inc	(revision 63769)
+++ appserver/admingui/web/src/main/resources/grizzly/httpAttr.inc	(working copy)
@@ -2,7 +2,7 @@

     DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

-    Copyright (c) 2009-2013 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2009-2015 Oracle and/or its affiliates. All rights reserved.

     The contents of this file are subject to the terms of either the GNU
     General Public License Version 2 only ("GPL") or the Common Development
@@ -98,7 +98,7 @@
         </sun:property>

         <sun:property id="MaxPostSize"  labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n_web.http.MaxPostSize}" helpText="$resource{i18n_web.http.MaxPostSizeHelp}" >
-            <sun:textField id="headerBLength" styleClass="integer" columns="$int{20}" maxLength="#{sessionScope.fieldLengths['maxLength.http.MaxPostSize']}" text="#{pageSession.httpMap['maxPostSizeBytes']}" />
+            <sun:textField id="headerBLength" styleClass="intAllowMinusOne" columns="$int{20}" maxLength="#{sessionScope.fieldLengths['maxLength.http.MaxPostSize']}" text="#{pageSession.httpMap['maxPostSizeBytes']}" />
             <sun:staticText id="byte" style="padding: 8pt" text="$resource{i18n.common.Bytes}"/>
         </sun:property>
Comment by Vinay Vishal [ 02/Mar/15 ]

This issue has been fixed in main trunk.





[GLASSFISH-21097] [FishCat] GlassFish server not started Created: 24/Jun/14  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: thamizh Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows7



 Description   

When I try to start the glassfish server using startserv.bat command in my local instance, I am getting the address already in use exception. So I am not able to start the server. But it is not telling me the port number which is occupied in my system. Can you tell me how to find which port is being required for glassfish server to start?

Is there any possibility to find the port number for Glassfish?

[#|2014-06-24T19:31:21.008+0530|SEVERE|glassfish 4.0|javax.enterprise.system.core|_ThreadID=1;_ThreadName=main;_TimeMillis=1403618481008;_LevelValue=1000;_MessageID=NCLS-CORE-00019;|
Shutting down server due to startup exception
java.net.BindException: Address already in use: bind
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:179)
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:456)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:225)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:82)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2151)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
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 org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:753)
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:744)

#]

[#|2014-06-24T19:31:21.093+0530|INFO|glassfish 4.0|javax.enterprise.system.core|_ThreadID=75;_ThreadName=Thread-11;_TimeMillis=1403618481093;_LevelValue=800;_MessageID=NCLS-CORE-00092;|
Server shutdown initiated|#]

[#|2014-06-24T19:31:21.094+0530|INFO|glassfish 4.0|javax.enterprise.bootstrap|_ThreadID=1;_ThreadName=main;_TimeMillis=1403618481094;_LevelValue=800;_MessageID=NCLS-BOOTSTRAP-00027;|
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@5e382bf8 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@1d0a3e63.|#]

[#|2014-06-24T19:31:22.098+0530|INFO|glassfish 4.0|javax.enterprise.bootstrap|_ThreadID=75;_ThreadName=Thread-11;_TimeMillis=1403618482098;_LevelValue=800;_MessageID=NCLS-BOOTSTRAP-00028;|
Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@5e382bf8 from service registry.|#]

[#|2014-06-24T19:31:22.100+0530|INFO|glassfish 4.0||_ThreadID=75;_ThreadName=Thread-8;_TimeMillis=1403618482100;_LevelValue=800;|
FileMonitoring shutdown|#]

Completed shutdown of Log manager service
[#|2014-06-24T19:31:22.279+0530|INFO|glassfish 4.0|javax.enterprise.system.core|_ThreadID=75;_ThreadName=Thread-11;_TimeMillis=1403618482279;_LevelValue=800;_MessageID=NCLS-CORE-00013;|
Shutdown procedure finished|#]






[GLASSFISH-21093] GlassFish 4 does not start with JDK 9 Created: 23/Jun/14  Updated: 26/Jun/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1_b05
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Joe Di Pol Assignee: Byron Nevins
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-review

 Description   

When run under JDK 9 GlassFish fails to start up. Two issues have been identified. According to one user GlassFish will start if these two changes are made:

  1. remove JVM options PermSize and MaxPermSize from domain.xml
  2. add jre-1.9=$ {jre-1.8}

    in osgi.properties



 Comments   
Comment by Joe Di Pol [ 26/Jun/14 ]

Updated osgi.properties as mentioned in the description (r63396).
JVM options still need to be addressed.





[GLASSFISH-21091] gf4, web console athentication failed with 64 bit jdk7. Created: 19/Jun/14  Updated: 19/Jun/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: mignak Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

win7 x64, jdk1.7.0_55 x64.



 Description   

The administration web console denies login if glassfish 4.0 ml is started with a JAVA_HOME that poits to a 64 bit jdk. This happens even if there is no passord for the admin user. The asadmin login command always works instead.

The same glassfish installation if run with the corresponding x86 version of the jdk (jdk1.7.0_55 x86) works as advertised and does not exhibit the problem.






[GLASSFISH-21017] In 'asadmin change-master-password', entry of password less than 6 chars results in Exception and then domain-passwords file is corrupt and have to reinstall Created: 25/Mar/14  Updated: 02/Apr/15  Resolved: 02/Apr/15

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 3.1.2.2
Fix Version/s: 4.2

Type: Bug Priority: Minor
Reporter: everettrj Assignee: Vinay Vishal
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7


Issue Links:
Relates
relates to GLASSFISH-21282 In 'asadmin change-master-password', ... Open
Tags: javaee_ri_fix, payara

 Description   

1. Called 'asadmin change-master-password --savemasterpassword=true <domain_name>'
2. Entered 'changeit' as existing password
3. Entered a new password of less than 6 characters (and then again)
4. Got:
keytool error: java.lang.Exception: Too many failures - try later
Enter keystore password: New keystore password: Password is too short - must be at least 6 characters
New keystore password: Password is too short - must be at least 6 characters
New keystore password: Password is too short - must be at least 6 characters

5. Repeated change-master-password, but with longer length new password
6. Got:
Keystore was tampered with, or password was incorrect
Command change-master-password failed.
7. Cannot get out of this situation - have to either restore a saved domain-passwords file (if one was preserved) or else reinstall GlassFish.



 Comments   
Comment by WilsonCheng [ 31/Dec/14 ]

In the execution of the change-master-password command, will use the Java keytool.exe to Change the password on the keystore.
this password must be at least 6 characters long.But the GF change-master-password command, do not check the password length.

The execute process of change-master-password commands are as follows:

1:Read current master password from the console, and use this code to load the cacerts.jks file
LocalServerCommand#loadAndVerifyKeystore() 220
cacerts.jks files in windows platform position:
C:\glassfish\glassfish4\glassfish\domains\domain1\config\cacerts.jks

2:The use of current master password, load domain-passwords file
PasswordAdapter() 158
The domain-passwords file in the windows platform position:
C:\glassfish\glassfish4\glassfish\domains\domain1\config\domain-passwords

3:The new password is entered into the domain-passwords file
RepositoryManager#changePasswordAliasKeystorePassword() 633

4:Use keytool.exe, enter the new password is written keystore.jks
ProcessExecutor#execute() 288
Here will use ProcessImpl to call keytool.exe,Command string as follows:
[C:/Java/jdk1.7/bin/keytool.exe, -storepasswd, -keystore, C:\glassfish\glassfish4\glassfish\domains\domain1\config\keystore.jks]
According to keytool.exe official document, when used "-storepasswd" options, the new password must be at least 6 characters long.

Solaris and Linux:
http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/keytool.html

windows:
http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/keytool.html

When the new password entered by the user is less than 6, in the third step will be written to the domain-passwords file with the new password.
But then, in the fourth step, can not use this new password written keystore.jks.
GF will throw an exception in the fourth step, the termination of the execution for change-master-password commands.
At this time, domain-passwords is using the new password, but keystore.jks still use the old password,
When the user to execute change-master-password commands, no matter what the password input, will not be the password checking first and second step.

------------------

revise plan:
ChangeMasterPasswordCommandDAS#executeCommand() 120
Increase the verify password length, if less than 6 characters will throw an exception.

Comment by WilsonCheng [ 31/Dec/14 ]

ChangeMasterPasswordCommandDAS.java.patch

ChangeMasterPasswordCommandDAS.java
Index: ChangeMasterPasswordCommandDAS.java
===================================================================
--- ChangeMasterPasswordCommandDAS.java	(revision 63724)
+++ ChangeMasterPasswordCommandDAS.java	(working copy)
@@ -117,6 +117,8 @@
                     strings.get("new.mp.again"), true);
             if (nmp == null)
                 throw new CommandException(strings.get("no.console"));
+            if (nmp.length() < 6)
+                throw new CommandException(strings.get("incorrect.mp.length"));
             domainConfig.put(DomainConfig.K_MASTER_PASSWORD, mp);
             domainConfig.put(DomainConfig.K_NEW_MASTER_PASSWORD, nmp);
             domainConfig.put(DomainConfig.K_SAVE_MASTER_PASSWORD, savemp);

LocalStrings.properties.patch

LocalStrings.properties
Index: LocalStrings.properties
===================================================================
--- LocalStrings.properties	(revision 63724)
+++ LocalStrings.properties	(working copy)
@@ -131,6 +131,7 @@
 new.mp.again=Enter the new master password again
 both.domaindir.nodedir.not.allowed=You cannot specify both domaindir and nodedir together. \
 You can use one or the other.
+incorrect.mp.length=password must be at least 6 characters long.
 ################################
 serviceUser_wrong_os=The serviceuser parameter is only supported on Linux.
 create.service.badServiceName=Windows requires that the service name contain only \
Comment by zhouronghui [ 31/Dec/14 ]

It looks good. By the way, would you please check if the master-password can be changed ONLY by the change-master-password sub-command? eg. On GUI can NOT change the master-password?

Comment by jifeng [ 05/Jan/15 ]

Hi
WilsonCheng

I think The first letter of the new additional message should be capitalized.What do you think?
just like this:
incorrect.mp.length=Password must be at least 6 characters long.

Comment by Vinay Vishal [ 02/Apr/15 ]

Fix merged in Glassfish svn trunk.
Sending nucleus/admin/server-mgmt/src/main/java/com/sun/enterprise/admin/servermgmt/cli/ChangeMasterPasswordCommandDAS.java
Sending nucleus/admin/server-mgmt/src/main/java/com/sun/enterprise/admin/servermgmt/cli/LocalStrings.properties
Transmitting file data ..
Committed revision 63825.





[GLASSFISH-21004] asadmin start-database does not work with JDK 1.7u51 - AccessControlException; SocketException Created: 06/Mar/14  Updated: 19/Sep/14  Resolved: 26/May/14

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: 4.1_b06

Type: Bug Priority: Critical
Reporter: Pavel Bucek Assignee: Snjezana Sevo-Zenzerovic
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

JDK 1.7u51


Tags: 4_0_1-mustfix

 Description   
$ ./bin/asadmin start-database
Starting database in Network Server mode on host 0.0.0.0 and port 1527.
Unable to start database.  Please check log in /Users/pavel/glassfish/trunk/main/appserver/distributions/glassfish/target/stage/glassfish4/glassfish/databases/derby.log.
Command start-database failed.
Thu Mar 06 22:35:02 CET 2014 : Security manager installed using the Basic server security policy.
Thu Mar 06 22:35:02 CET 2014 : access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")
Thu Mar 06 22:35:02 CET 2014 : access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")
java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
	at java.security.AccessController.checkPermission(AccessController.java:559)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
	at java.lang.SecurityManager.checkListen(SecurityManager.java:1134)
	at java.net.ServerSocket.bind(ServerSocket.java:375)
	at java.net.ServerSocket.<init>(ServerSocket.java:237)
	at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:231)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.createServerSocket(Unknown Source)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.access$000(Unknown Source)
	at org.apache.derby.impl.drda.NetworkServerControlImpl$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(Unknown Source)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.executeWork(Unknown Source)
	at org.apache.derby.drda.NetworkServerControl.main(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.sun.enterprise.admin.cli.optional.DerbyControl.invokeNetworkServerControl(DerbyControl.java:158)
	at com.sun.enterprise.admin.cli.optional.DerbyControl.main(DerbyControl.java:245)
java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
	at java.security.AccessController.checkPermission(AccessController.java:559)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
	at java.lang.SecurityManager.checkListen(SecurityManager.java:1134)
	at java.net.ServerSocket.bind(ServerSocket.java:375)
	at java.net.ServerSocket.<init>(ServerSocket.java:237)
	at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:231)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.createServerSocket(Unknown Source)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.access$000(Unknown Source)
	at org.apache.derby.impl.drda.NetworkServerControlImpl$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.blockingStart(Unknown Source)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.executeWork(Unknown Source)
	at org.apache.derby.drda.NetworkServerControl.main(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.sun.enterprise.admin.cli.optional.DerbyControl.invokeNetworkServerControl(DerbyControl.java:158)
	at com.sun.enterprise.admin.cli.optional.DerbyControl.main(DerbyControl.java:245)

works with JDK 1.7u40.

(this also means that quicklook tests are failing when 1.7u51 us used).



 Comments   
Comment by Pavel Bucek [ 13/Mar/14 ]

this seems to be the cause: http://www.oracle.com/technetwork/java/javase/7u51-relnotes-2085002.html

Area: other-libs/javadb
Synopsis: Additional permission needed to run Java DB network server

An additional permission may be needed in order to bring up the Java DB network server. 
In particular, the startup scripts in <db/bin> may fail to boot the network server. 
This is a result of the "Better applet networking" changes made by 8011787 (not public).

While attempting to boot, the network server may fail and raise the following error:

access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")
java.security.AccessControlException: access denied 
("java.net.SocketPermission" "localhost:1527" "listen,resolve")

To fix this problem, you must bring up the network server with a security policy which includes 
the missing permission. Instead of booting the network server as:

java org.apache.derby.drda.NetworkServerControl start

boot the network server as follows:

java -Djava.security.manager -Djava.security.policy=${yourPolicyFile}
org.apache.derby.drda.NetworkServerControl start

where ${yourPolicyFile} is a file containing a customized version of the policy file described 
in the Java DB Admin Guide section titled Basic Network Server security policy. You must customize 
that generic policy file to fit your application. In addition, you must add the following 
permission to the permissions block granted to the ${derby.install.url}derbynet.jar codebase:

permission java.net.SocketPermission "localhost:${port}", "listen";

where ${port} should be replaced by the port number where the network server listens for incoming 
connection requests. By default, that is port 1527.

For more information on Java DB security policies, see the Java DB Admin Guide sections titled 
Network Server security and Running the Network Server under the security manager.

If you are using replication, a similar permission must be granted to the security policy for the 
slave server. Add the following permission to the ${derby.install.url}derby.jar codebase:

permission java.net.SocketPermission "localhost:${slavePort}", "listen";

where ${slavePort} should be replaced by the port number where the slave server listens for 
incoming connection requests (typically 4851). For more information on the security policy for 
the slave server, see the Java DB Admin Guide section titled Replication and security.

See 8011787 (not public).
Comment by Joe Di Pol [ 18/Mar/14 ]

This is being addressed in derby:

https://issues.apache.org/jira/browse/DERBY-6438

GlassFish bundles a copy of JavaDB, so we'll need to investigate picking up a newer version.

Comment by jclingan [ 01/May/14 ]

This will likely also break JDK 8 support. I've run into this myself and it is a royal pain to deal with, and I can only imagine the confusion it will cause with new users. This should be fixed.

Comment by Joe Di Pol [ 08/May/14 ]

Will likely be bundling either 10.10.1.3 or 10.10.2.0 with GF 4.0.1

Comment by Snjezana Sevo-Zenzerovic [ 26/May/14 ]

JavaDB 10.10.2.0 has been integrated into GlassFish 4.0.1. Resolving the issue.





[GLASSFISH-21003] start-cluster sometimes fails with: "Argument name must be defined" Created: 04/Mar/14  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Joe Di Pol Assignee: martin.mares
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0_1-reviewed

 Description   

Sporadically during test runs (for example the cluster admin devtests) start-cluster will fail:

cluster:
     [java] Listening for transport dt_socket at address: 9010
     [java] #####  Non-Verbose: Only Failures Are Printed #####
     [java] #########    FAILURE   #########
     [java] asadmin --host localhost --port 4848 --user admin 
--passwordfile /scratch/BUILD_AREA/workspace/gf-lw-admin-devtests-cluster/appserv-tests/config/adminpassword.txt 
--interactive=false --echo=true --terse=true 
start-cluster --verbose=false gslc1
     [java] 
     [java] Argument name must be defined

This is not consistently reproduceable, but happens periodically during the automated test runs.



 Comments   
Comment by Joe Di Pol [ 04/Mar/14 ]

This looks to be comming from
nucleus/admin/util/src/main/java/com/sun/enterprise/admin/event/AdminCommandEventBrokerImpl.java

    @Override
    public void fireEvent(String name, Object event) {
        if (name == null) {
            throw new IllegalArgumentException("Argument name must be defined");
        }

start-cluster uses the progress status feature – so I'm guessing this is related to that.

Comment by martin.mares [ 10/Mar/14 ]

I am searching for potential source of this issue.
I thing that only place in current GF where is potential source of event without name is SSE client. In case of some wrong SSE transfer it can cause this. (For example two manny EOLs in one message.

I want support my idea first. So, I change SSE client to produce runtime exception with different message. If we see "Event without name. Data: " instead of "Argument name must be defined" then we have source of the issue. Next question will be why there is broken SSE stream syntax.

SVN revision 63157

Comment by Romain Grécourt [ 28/May/14 ]

This issue happens more often on Linux.
I've tried simulating load using [stree command|linux.die.net/man/1/stress], seems to make it a bit more reproducible.





[GLASSFISH-20994] communication between DAS and instance fails if master password != changeit Created: 24/Feb/14  Updated: 30/Mar/15

Status: In Progress
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: ChristianSch Assignee: Vinay Vishal
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: javaee_ri_fix, payara

 Description   

if GlassFish is started using --passswordfile command line option, GF should take passwords provided in this file instead of defaults.

1. create a domain with one DAS, clusters and instances
2. start instances, the config is retrieved from DAS
3. open admin gui and change something, push to instance fails with
javax.net.ssl.SSLException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException

root cause is com.sun.enterprise.security.store.AsadminSecurityUtil#defaultMasterPassword()
it checks an undocumented system property or falls back to 'changeit' (see stack trace below)

if the system property is provided as jvm-option then the communcation works. however, providing passwords at several places (--passwordfile and jvm-option) is error prone and bad practice...

	AsadminSecurityUtil.defaultMasterPassword() line: 269	
	AsadminSecurityUtil.chooseMasterPassword(char[]) line: 252	
	AsadminSecurityUtil.init(char[], boolean) line: 170	
	AsadminSecurityUtil.<init>(char[], boolean) line: 135	
	AsadminSecurityUtil.getInstance(char[], boolean) line: 84	
	AsadminSecurityUtil.getInstance(boolean) line: 96	
	AsadminTruststore.newInstance() line: 84	
	AsadminTrustManager.checkCertificate(X509Certificate[]) line: 209	
	AsadminTrustManager.checkServerTrusted(X509Certificate[], String) line: 136	
	AbstractTrustManagerWrapper.checkServerTrusted(X509Certificate[], String, Socket) line: 813	
	ClientHandshaker.serverCertificate(HandshakeMessage$CertificateMsg) line: 1323	
	ClientHandshaker.processMessage(byte, int) line: 153	
	ClientHandshaker(Handshaker).processLoop() line: 868	
	ClientHandshaker(Handshaker).process_record(InputRecord, boolean) line: 804	
	SSLSocketImpl.readRecord(InputRecord, boolean) line: 1016	
	SSLSocketImpl.performInitialHandshake() line: 1312	
	SSLSocketImpl.startHandshake(boolean) line: 1339	
	SSLSocketImpl.startHandshake() line: 1323	
	HttpsClient.afterConnect() line: 563	
	DelegateHttpsURLConnection(AbstractDelegateHttpsURLConnection).connect() line: 185	
	DelegateHttpsURLConnection(HttpURLConnection).getOutputStream() line: 1091	
	HttpsURLConnectionImpl.getOutputStream() line: 250	
	ParameterMapFormProprietaryWriter.writeTo(Object, HttpURLConnection) line: 81	
	RemoteRestAdminCommand$1.prepareConnection(HttpURLConnection) line: 763	
	InstanceRestCommandExecutor(RemoteRestAdminCommand).doHttpCommand(String, String, RemoteRestAdminCommand$HttpCommand, boolean) line: 1058	
	InstanceRestCommandExecutor(RemoteRestAdminCommand).doHttpCommand(String, String, RemoteRestAdminCommand$HttpCommand) line: 958	
	InstanceRestCommandExecutor(RemoteRestAdminCommand).executeRemoteCommand(ParameterMap) line: 733	
	InstanceRestCommandExecutor(RemoteRestAdminCommand).executeCommand(ParameterMap) line: 548	
	InstanceRestCommandExecutor.run() line: 132	
	Executors$RunnableAdapter<T>.call() line: 471	
	FutureTask<V>.run() line: 262	
	Executors$RunnableAdapter<T>.call() line: 471	
	FutureTask<V>.run() line: 262	
	ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1145	
	ThreadPoolExecutor$Worker.run() line: 615	
	Thread.run() line: 744	


 Comments   
Comment by smillidge-c2b2 [ 14/Dec/14 ]

I believe this occurs if you disable the JMX connectors in GlassFish. The JMX connectors set the system properties javax.net.ssl.keyStorePassword and javax.net.ssl.trustStorePassword if they are disabled these are never set resulting in communication failure between the DAS and any instances with the error above.

This Payara commit https://github.com/smillidge/Payara/commit/7318105bf17f6ee231bd3c818425169a7996bdd0 is an attempt at fixing this issue by moving the initialisation of these properties to the IdmService once it has obtained the MasterPassword. This is probably not the best fix. It is probably better to rewrite AsadminSecurityUtil to use the IdmService rather than relying on the system property.

Comment by Vinay Vishal [ 20/Mar/15 ]

Exact issue as mentioned in the bug couldn't be reproduced. Exact steps to reproduce the same will be helpful. After changing the master password from default changeit to something else, domain server was started using password file. Password file had the new password as key value pair for key AS_ADMIN_MASTERPASSWORD. DAS got started successfully. Post this, a change was made in admin gui. Change successfully got saved.

If this issue is related to communication between DAS and other instances and cluster, --passwordfile option will work fine if instance is started using "start-local-instance" command. However, for start-cluster or start-instance to work correctly, its important to have master-password file placed in node/agent directory on the host where instances are configured. For security reasons, master-password at present is not transmitted over the wire and hence start-cluster or start-instance being Remote CLI commands, will not work until or unless master-password file is present in the node/agent directory.

Refer to following wiki for discussion around this: https://wikis.oracle.com/display/GlassFish/3.1+Master+Password

Similar other issue: https://java.net/jira/browse/GLASSFISH-16149?jql=text%20~%20start-cluster

Comment by ChristianSch [ 23/Mar/15 ]

the comment from smillidge provides a plausible root cause for the observed behavior. if password is not set, then GF falls back to 'changeit'

@Vinay Vishal: instances have access to the correct master password





[GLASSFISH-20946] asadmin delete-service Created: 09/Jan/14  Updated: 09/Jan/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: mkarg Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Win



 Description   

FEATURE PROPOSAL

For easier uninstallation or other technical modifications it would be nice to have this command:

asadmin delete-service

What it shall do is the reverse of

asadmin create-service

Hence, the idea is that the command first removes the service from the Windows OS registry, and then deletes all of GlassFish's own service files.

Justification: This makes it much easier to reinstall or remove GlassFish.






[GLASSFISH-20939] Updating password alias doesn't update objects using it Created: 19/Dec/13  Updated: 19/Dec/13

Status: Open
Project: glassfish
Component/s: admin, admin_gui
Affects Version/s: 4.0_b89_RC5
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Kevin Dean Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 64-bit, JDK 1.7.0_45



 Description   

During some debugging to bash issue https://java.net/jira/browse/GLASSFISH-20938 into submission, I noticed that editing a password alias did not propagate to the connection pool data source that used it. To update an existing password alias, it is necessary to restart the server to get it to take effect.






[GLASSFISH-20938] GlassFish password aliases failing Created: 19/Dec/13  Updated: 19/Sep/14  Resolved: 30/Dec/13

Status: Resolved
Project: glassfish
Component/s: admin, configuration, jdbc, security
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

Type: Bug Priority: Critical
Reporter: Kevin Dean Assignee: Tim Quinn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 64-bit, JDK 1.7.0_45


Issue Links:
Duplicate
is duplicated by GLASSFISH-21065 Password aliasing: Some passwords not... Resolved
is duplicated by GLASSFISH-20491 Cannot login when username and passwo... Closed
Tags: 4_0_1-review

 Description   

I use the password alias feature to configure JDBC connections and other sensitive artefacts. I have just started work with GlassFish 4.0 and have found that it doesn't handle password aliases properly. It accepts them (using the GUI or create-password-alias), it accepts JDBC resources that use them (using the GUI or create-jdbc-connection-pool), but it can't use them. Any attempt to use the connection pool (e.g. through the "Ping" command) fails with "Connection could not be allocated because: Access denied for user 'ff_read_write'@'localhost' (using password: YES)]]". Once I replace the password alias with the plain-text password, everything works fine.

I turned up logging on everything security-related I could find and there's an exception logging into a file realm. See log attached.

Appears to be related to:

https://java.net/jira/browse/GLASSFISH-20675

Definitely related to:

https://java.net/jira/browse/GLASSFISH-20873



 Comments   
Comment by Kevin Dean [ 19/Dec/13 ]

[2013-12-19T17:50:57.499+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.ssl] [tid: _ThreadID=234 _ThreadName=admin-listener(43)] [timeMillis: 1387475457499] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.ssl.J2EEKeyManager] [METHODNAME: getPrivateKey] [[
Getting private key for alias:s1as]]

[2013-12-19T17:50:57.500+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.ssl] [tid: _ThreadID=234 _ThreadName=admin-listener(43)] [timeMillis: 1387475457500] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.ssl.J2EEKeyManager] [METHODNAME: getCertificateChain] [[
Getting certificate chain]]

[2013-12-19T17:50:57.500+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.ssl] [tid: _ThreadID=234 _ThreadName=admin-listener(43)] [timeMillis: 1387475457500] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.ssl.J2EEKeyManager] [METHODNAME: getPrivateKey] [[
Getting private key for alias:s1as]]

[2013-12-19T17:50:57.500+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.ssl] [tid: _ThreadID=234 _ThreadName=admin-listener(43)] [timeMillis: 1387475457500] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.ssl.J2EEKeyManager] [METHODNAME: getCertificateChain] [[
Getting certificate chain]]

[2013-12-19T17:50:57.515+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457515] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : file=D:\Users\KDean\projects\FeeFracture\trunk\servers\glassfish4\glassfish\domains\feefracture\config\admin-keyfile]]

[2013-12-19T17:50:57.515+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457515] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : jaas-context=ignore]]

[2013-12-19T17:50:57.516+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457516] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.BasePasswordLoginModule] [METHODNAME: initialize] [[
Login module initialized: class com.sun.enterprise.security.auth.login.FileLoginModule]]

[2013-12-19T17:50:57.517+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457517] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.login.FileLoginModule] [METHODNAME: authenticate] [[
File login succeeded for: admin]]

[2013-12-19T17:50:57.517+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457517] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.BasePasswordLoginModule] [METHODNAME: login] [[
JAAS login complete.]]

[2013-12-19T17:50:57.517+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457517] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.BasePasswordLoginModule] [METHODNAME: commit] [[
JAAS authentication committed.]]

[2013-12-19T17:50:57.518+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.org.glassfish.security.services.impl.authorization] [tid: _ThreadID=130 _ThreadName=admin-listener(14)] [timeMillis: 1387475457518] [levelValue: 300] [CLASSNAME: org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl] [METHODNAME: getAuthorizationDecision] [[
Authorization Service result for Subject:
Principal: admin
Principal: asadmin
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
was status=OK, decision=[1].]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: setPolicyContext] [[
[Web-Security] Setting Policy Context ID: old = null ctxID = _admingui/_admingui]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Codesource with Web URL: file:/__admingui/__admingui]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Checking Web Permission with Principals : null]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Web Permission = ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "GET")]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 300] [CLASSNAME: com.sun.enterprise.security.provider.BasePolicyWrapper] [METHODNAME: doImplies] [[
JACC Policy Provider: PolicyWrapper.implies, context (_admingui/_admingui)- result was(false) permission (("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "GET"))]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.jmac.config] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.jmac.config.GFServerConfigProvider] [METHODNAME: getEntry] [[
getEntry for: HttpServlet – GFConsoleAuthModule
module class: org.glassfish.admingui.common.security.AdminConsoleAuthModule
options:

{loginErrorPage=/loginError.jsf, loginPage=/login.jsf}
request policy: javax.security.auth.message.MessagePolicy@de1d100
response policy: null]]

[2013-12-19T17:50:58.226+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458226] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: setPolicyContext] [[
[Web-Security] Policy Context ID was: _admingui/_admingui]]

[2013-12-19T17:50:58.227+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458227] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Codesource with Web URL: file:/__admingui/__admingui]]

[2013-12-19T17:50:58.227+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458227] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Checking Web Permission with Principals : asadmin, admin]]

[2013-12-19T17:50:58.227+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458227] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Web Permission = ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "GET")]]

[2013-12-19T17:50:58.227+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458227] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: hasResourcePermission] [[
[Web-Security] hasResource isGranted: true]]

[2013-12-19T17:50:58.227+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=124 _ThreadName=admin-listener(8)] [timeMillis: 1387475458227] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: hasResourcePermission] [[
[Web-Security] hasResource perm: ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "GET")]]

[2013-12-19T17:50:58.246+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=38 _ThreadName=admin-listener(4)] [timeMillis: 1387475458246] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : file=D:\Users\KDean\projects\FeeFracture\trunk\servers\glassfish4\glassfish\domains\feefracture\config\admin-keyfile]]

[2013-12-19T17:50:58.246+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=38 _ThreadName=admin-listener(4)] [timeMillis: 1387475458246] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : jaas-context=ignore]]

[2013-12-19T17:50:58.331+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=237 _ThreadName=admin-listener(46)] [timeMillis: 1387475458331] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : file=D:\Users\KDean\projects\FeeFracture\trunk\servers\glassfish4\glassfish\domains\feefracture\config\admin-keyfile]]

[2013-12-19T17:50:58.331+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=237 _ThreadName=admin-listener(46)] [timeMillis: 1387475458331] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : jaas-context=ignore]]

[2013-12-19T17:50:58.352+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.org.glassfish.security.services.impl.authorization] [tid: _ThreadID=237 _ThreadName=admin-listener(46)] [timeMillis: 1387475458352] [levelValue: 300] [CLASSNAME: org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl] [METHODNAME: getAuthorizationDecision] [[
Authorization Service result for Subject:
Principal: admin
Principal: asadmin
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
was status=OK, decision=[1].]]

[2013-12-19T17:50:58.360+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458360] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : file=D:\Users\KDean\projects\FeeFracture\trunk\servers\glassfish4\glassfish\domains\feefracture\config\admin-keyfile]]

[2013-12-19T17:50:58.361+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458361] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : jaas-context=ignore]]

[2013-12-19T17:50:58.382+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.org.glassfish.security.services.impl.authorization] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458382] [levelValue: 300] [CLASSNAME: org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl] [METHODNAME: getAuthorizationDecision] [[
Authorization Service result for Subject:
Principal: admin
Principal: asadmin
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
was status=OK, decision=[1].]]

[2013-12-19T17:50:58.384+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458384] [levelValue: 300] [CLASSNAME: com.sun.enterprise.security.auth.login.LoginContextDriver] [METHODNAME: login] [[
Processing login with credentials of type: class com.sun.enterprise.security.auth.login.common.PasswordCredential]]

[2013-12-19T17:50:58.384+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458384] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.login.LoginContextDriver] [METHODNAME: doPasswordLogin] [[
Logging in user [admin] into realm: admin-realm using JAAS module: fileRealm]]

[2013-12-19T17:50:58.384+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458384] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.BasePasswordLoginModule] [METHODNAME: initialize] [[
Login module initialized: class com.sun.enterprise.security.auth.login.FileLoginModule]]

[2013-12-19T17:50:58.384+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458384] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.BasePasswordLoginModule] [METHODNAME: abort] [[
JAAS authentication aborted.]]

[2013-12-19T17:50:58.384+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.login] [tid: _ThreadID=225 _ThreadName=admin-listener(34)] [timeMillis: 1387475458384] [levelValue: 300] [CLASSNAME: com.sun.enterprise.security.auth.login.LoginContextDriver] [METHODNAME: doPasswordLogin] [[
doPasswordLogin fails
javax.security.auth.login.LoginException: Failed file login for admin.
at com.sun.enterprise.security.auth.login.FileLoginModule.authenticate(FileLoginModule.java:84)
at com.sun.enterprise.security.auth.login.PasswordLoginModule.authenticateUser(PasswordLoginModule.java:116)
at com.sun.enterprise.security.BasePasswordLoginModule.login(BasePasswordLoginModule.java:146)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695)
at javax.security.auth.login.LoginContext.login(LoginContext.java:594)
at com.sun.enterprise.security.auth.login.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:383)
at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:241)
at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:154)
at org.glassfish.admin.rest.cli.SecurityUtil.getAnonymousUser(SecurityUtil.java:344)
at org.glassfish.admin.rest.cli.IsAnonymousUserEnabledCommand.execute(IsAnonymousUserEnabledCommand.java:78)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:235)
at org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommandLegacyFormat(TemplateExecCommand.java:161)
at org.glassfish.admin.rest.resources.TemplateCommandGetResource.processGetLegacyFormat(TemplateCommandGetResource.java:75)
at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:198)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:318)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:744)
]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: setPolicyContext] [[
[Web-Security] Setting Policy Context ID: old = null ctxID = _admingui/_admingui]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Codesource with Web URL: file:/__admingui/__admingui]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Checking Web Permission with Principals : null]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Web Permission = ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "POST")]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 300] [CLASSNAME: com.sun.enterprise.security.provider.BasePolicyWrapper] [METHODNAME: doImplies] [[
JACC Policy Provider: PolicyWrapper.implies, context (_admingui/_admingui)- result was(false) permission (("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "POST"))]]

[2013-12-19T17:50:59.808+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.jmac.config] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459808] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.jmac.config.GFServerConfigProvider] [METHODNAME: getEntry] [[
getEntry for: HttpServlet – GFConsoleAuthModule
module class: org.glassfish.admingui.common.security.AdminConsoleAuthModule
options: {loginErrorPage=/loginError.jsf, loginPage=/login.jsf}

request policy: javax.security.auth.message.MessagePolicy@de1d100
response policy: null]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: setPolicyContext] [[
[Web-Security] Policy Context ID was: _admingui/_admingui]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Codesource with Web URL: file:/__admingui/__admingui]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Checking Web Permission with Principals : asadmin, admin]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: checkPermissionWithoutCache] [[
[Web-Security] Web Permission = ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "POST")]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: hasResourcePermission] [[
[Web-Security] hasResource isGranted: true]]

[2013-12-19T17:50:59.809+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459809] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.web.integration.WebSecurityManager] [METHODNAME: hasResourcePermission] [[
[Web-Security] hasResource perm: ("javax.security.jacc.WebResourcePermission" "/jdbc/jdbcConnectionPoolEdit.jsf" "POST")]]

[2013-12-19T17:50:59.834+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=223 _ThreadName=admin-listener(32)] [timeMillis: 1387475459834] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : file=D:\Users\KDean\projects\FeeFracture\trunk\servers\glassfish4\glassfish\domains\feefracture\config\admin-keyfile]]

[2013-12-19T17:50:59.834+0000] [glassfish 4.0] [FINE] [] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=223 _ThreadName=admin-listener(32)] [timeMillis: 1387475459834] [levelValue: 500] [CLASSNAME: com.sun.enterprise.security.auth.realm.file.FileRealm] [METHODNAME: init] [[
FileRealm : jaas-context=ignore]]

[2013-12-19T17:50:59.888+0000] [glassfish 4.0] [FINEST] [] [javax.enterprise.system.core.security.org.glassfish.security.services.impl.authorization] [tid: _ThreadID=223 _ThreadName=admin-listener(32)] [timeMillis: 1387475459888] [levelValue: 300] [CLASSNAME: org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl] [METHODNAME: getAuthorizationDecision] [[
Authorization Service result for Subject:
Principal: admin
Principal: asadmin
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
Private Credential: Realm=admin-realm Username=admin Password=######## TargetName =
was status=OK, decision=[1].]]

[2013-12-19T17:50:59.936+0000] [glassfish 4.0] [WARNING] [test.connection.pool.failed] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=223 _ThreadName=admin-listener(32)] [timeMillis: 1387475459936] [levelValue: 900] [[
RAR8054: Exception while creating an unpooled [test] connection for pool [ X ], Connection could not be allocated because: Access denied for user 'ff_read_write'@'localhost' (using password: YES)]]

[2013-12-19T17:50:59.938+0000] [glassfish 4.0] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=215 _ThreadName=admin-listener(24)] [timeMillis: 1387475459938] [levelValue: 1000] [[
RestResponse.getResponse() gives FAILURE. endpoint = 'https://localhost:4848/management/domain/resources/ping-connection-pool.json'; attrs = '

{id=X}

']]

Comment by Kevin Dean [ 19/Dec/13 ]

After bashing my head against the wall trying to figure out how to enable tracing in GlassFish or the MySQL JDBC driver that would log the aliased password, I finally took the easy route and wrote my own connection pool data source that extended MySQL's connection pool data source. I then overrode the "setPassword" method to log the password and lo and behold, we have an answer!!!

It seems that either the encryption or the decryption process mangles the password. Any password less than 10 characters long is fine, but the moment you hit ten characters, the process appends a single space character to the end. That space character remains until you hit 20 characters, at which point you have not one but TWO space characters at the end.

Comment by kumara [ 20/Dec/13 ]

Thanks for the detailed analysis and getting to the root cause. Need to investigate further. Problem demonstrated by following test code ...

import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;

public class Test {

    private final static Charset utf8 = Charset.forName("UTF-8");

    private static String getBytesInHex(byte[] bytes) {
        StringBuilder sb = new StringBuilder();
        for (byte b: bytes) {
             sb.append(String.format("%02X", b));
        }
        return sb.toString();
    }

    private static void encodeAndPrint(String password) {
        final ByteBuffer byteBuffer = utf8.encode(password);
        System.out.println("Encoded \"" + password + "\" to \"" + getBytesInHex(byteBuffer.array()) + "\"");
    }

    public static void main(String[] args) { 
        for (String s: args) {
             encodeAndPrint(s);
        }
    }
}

java Test abcd12345 abdcde12345 abcdefghij012345678 abcdefghij0123456789
Encoded "abcd12345" to "616263643132333435"
Encoded "abdcde12345" to "616264636465313233343500"
Encoded "abcdefghij012345678" to "6162636465666768696A30313233343536373800"
Encoded "abcdefghij0123456789" to "6162636465666768696A303132333435363738390000"

Need to dig deeper in utf8.encode() ...

Comment by Tim Quinn [ 20/Dec/13 ]

The problem turns out not to be in utf8.encode but in how GlassFish and the test code use the return value from array().

That method returns the entire array that is the backing store for the buffer, not just the valid portion that contains legitimate data.

For example, the test code should convert the byte buffer to a readable string this way:

    private static String getBytesInHex(final ByteBuffer bb) {
        final StringBuilder sb = new StringBuilder();
        while (bb.hasRemaining()) {
            sb.append(String.format("%02X", bb.get()));
        }
        return sb.toString();
    }

Note the use of hasRemaining() and get().

I'm already at work on a fix to the JCEKSPasswordAliasStore class (which contains the same incorrect use the array() method).

Comment by Tim Quinn [ 30/Dec/13 ]

Fix checked in.

Project: glassfish
Repository: svn
Revision: 63048
Author: tjquinn
Date: 2013-12-30 21:21:57 UTC
Link:

Log Message:
------------
GLASSFISH-20938 - GlassFish password aliases failing

Symptom: Password aliases longer than just a few characters were incorrectly handled.

Cause: Places in the new alias handling code use ByteBuffer and CharBuffer objects and the array() method. That method returns the entire backing array, not just the valid portion of the backing array. As longer password strings were created the xxxBuffer would legitimately allocate more bytes than the length of the password. The GlassFish code which uses the entire backing array would use the invalidate bytes in the backing array as well as the valid ones.

Fix: Change the code to use the position() and remaining() methods on ByteBuffer (one solution) and toString on CharBuffer to work with only the valid portion data in the buffer.

Tests: new unit test; remote queue EJB, deployment devtests; QL; others

Revisions:
----------
63048

Modified Paths:
---------------
trunk/main/nucleus/common/common-util/src/main/java/com/sun/enterprise/util/Utility.java
trunk/main/nucleus/security/services/src/main/java/org/glassfish/security/services/impl/JCEKSPasswordAliasStore.java

Added Paths:
------------
trunk/main/nucleus/security/services/src/test/java/org/glassfish/security/services/impl/PasswordAliasTest.java





[GLASSFISH-20935] When target a JMS resource to a cluster, should enforce no Node of any instances in the cluster has "localhost" as 'Node Host' Created: 18/Dec/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 3.1.2, 3.1.2.2, 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: amyk Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

GlassFish JMS module forms MQ conventional cluster by taking 'Node Host' from each GlassFish instance's Node for imq.cluster.brokerlist and imq.cluster.masterbroker. Therefore the 'Node Host' of each GlassFish Node of the instances must not set to 'localhost' or else MQ conventional cluster may not be formed because 'localhost' can not represent the Node system's address on another system. This is especially important since the GlassFish default Node 'localhost-domain1' has its 'Node Host' set to 'localhost' by default which has often caused, as reported by GlassFish users, MQ cluster establishment problem on GlassFish cluster start up






[GLASSFISH-20923] stop-database command does not work when derby authentication is on Created: 10/Dec/13  Updated: 20/Oct/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: jiggster Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X 10.9/Windows 7


Tags: 4_0_1-approved, 4_0_1-evangelists, admin, stop-database

 Description   

When derby/java db authentication is turned on via the derby.properties file, it is impossible to stop the database by means of the stop-domain asadmin command.

Steps to reproduce:

1. Install glassfish 4 server
2. Go to as_install/glassfish and create the databases directory
3. Create derby.properties file in the as_install/glassfish/databases directory - the content of the file shall be as below:

derby.connection.requireAuthentication=true
derby.authentication.provider=BUILTIN
derby.user.APP=APP

4. Execute asadmin start-database - it will succeed.
5. Execute asadmin stop-database --dbuser APP

The command will fail with the below message:

Tue Dec 10 19:10:48 CET 2013 : Connection obtained for host: 0.0.0.0, port number 1527.
Unable to stop database. Please check log in derby.log.
Command stop-database failed.

Content of the derby.log:

Tue Dec 10 19:10:14 CET 2013 : Derby shutdown warning:
Connection authentication failure occurred. Reason: Invalid authentication..

Tested it on both Windows 7 and Mac OS X 10.9



 Comments   
Comment by jifeng [ 13/Dec/13 ]

Hi
Chris Kasso, jiggster

this error may relate to the fact that asadmin stop-database does not support the input password(At present only username can be entered), because the database can be stopped when I use the following command:

 
javadb/lib/java -jar derbyrun.jar server shutdown -user APP -password APP//it will succeed.

next, I'm going to see the implemention of stop-database commmand to verify that my idea is correct or not.

Comment by jiggster [ 13/Dec/13 ]

Yup,

I can confirm that the above command works. Also when using stopNetworkServer script from as_install/javadb/bin folder everything works as expected.

I just thought that maybe the stop-database command could somehow parse the derby.properties file and deduce the password from the username indicated by --dbuser option.

Anyways, it would definitely be convenient if the stop-database command worked.

Cheers!

Comment by jifeng [ 17/Dec/13 ]

Hi
jiggster

If so, we need to increase the processing in glassfish code, that is analysis of the derby.properties to achieve password, so the degree of coupling between glassfish and javadb will increase. Whether the following form can be considered:

 
asadmin stop-database --dbuser APP --dbpass APP 

Cheers!

Comment by jiggster [ 17/Dec/13 ]

Hi,

Your proposal is perfectly fine with me - hopefully with others interested too!

I'm assuming it is You, who will take care of implementing this additional option for stop-database command, right? If You need any help, I'd be delighted to contribute in some way - I don't have the commiter's rights, but I can help with the tests.

Cheers.

Comment by jifeng [ 21/Jan/14 ]

Hi
Chris

In order to resolve this bug, I think the glassfish can provide an additional option in the command of stop-database,
such as "asadmin stop-database --dbuser APP --dbpass APP ".
I am create a patch, and it works fine:

com.sun.enterprise.admin.cli.optional.StopDatabaseCommand
// Some comments here
--- StopDatabaseCommand.java	(revision 62639)
+++ StopDatabaseCommand.java	(working copy)
@@ -73,6 +73,7 @@
     @Param(name = "dbuser", optional = true)
     private String dbUser;
 
     private File dbPasswordFile;

+    @Param(name = "dbpass", optional = true)
     private String dbPassword;
 
Comment by Chris Kasso [ 18/Feb/14 ]

I took a look at StopDatabaseCommand.java. It supports pulling the DB password from a password file. Have you verified it works and if it does would you still need the dbpass command line option (other than for convenience)?

Comment by jifeng [ 27/Mar/14 ]

Hi
Chris

Thanks for taking notes of this issue, I have confirmed that the StopDatabaseCommand indeed support the feature to acquire the password from password file. So We needn't add dbpass option here.

Comment by jiggster [ 20/Oct/14 ]

Did a quick test using the recently released 4.1 version, but unfortunately the stop-database command does not recognize the --dbpass option and this my question is when (which release) will this issue be fixed?





[GLASSFISH-20921] Password from passwords file provided for create-password-alias command with --passwordfile option aren't set properly Created: 10/Dec/13  Updated: 16/Dec/13

Status: Open
Project: glassfish
Component/s: admin, embedded
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: gray Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

maven-embedded-glassfish-plugin
executing embedded-glassfish:admin



 Description   

I have following configuration for maven-embedded-glassfish-plugin:

<groupId>org.glassfish.embedded</groupId>
<artifactId>maven-embedded-glassfish-plugin</artifactId>
<!--<version>3.1.2.2</version>-->
<version>4.0</version>
...
<executions>
  <execution>
     <id>deploy-binarystorage</id>
     <phase>none</phase>
     <goals>
       <goal>admin</goal>
     </goals>
     <configuration>
       <commands>
         <command>create-password-alias --passwordfile src/test/resources/passwords.file my-alias</command>
       </commands>
     </configuration>
   </execution>
<executions>

content of the passwords.file is following:

AS_ADMIN_ALIASPASSWORD=tests

When I run my maven build I got following message:

INFO: Ran command [create-password-alias --passwordfile src/test/resources/passwords.file my-alias]. Exit Code [FAILURE], Output = 
[PlainTextActionReporterFAILUREorg.jvnet.hk2.config.UnsatisfiedDependencyException: 
injection failed on com.sun.enterprise.security.cli.CreatePasswordAlias.aliasPassword with class java.lang.StringDescription: 
create-password-alias 
commandCannot find aliasPassword in create-password-alias command model, file a bug
    Usage: create-password-alias aliasname 
]

Investigation lead me to the following peace of code in the com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl:
(comments are mine)

if (pwfile != null && pwfile.length() > 0) {
  // following line will read passwords from file and create a Map instance where 
  // key is "AS_ADMIN_ALIASPASSWORD" and value is "tests"
  Map<String, String> passwords = CLIUtil.readPasswordFileOptions(pwfile, true);
  for (CommandModel.ParamModel opt : commandModel.getParameters()) {
    if (opt.getParam().password()) {
      String pwdname = opt.getName();
      // following line will try to get password value from map using parameter name "aliaspassword"
      // and obviously will fail because map contain only key "AS_ADMIN_ALIASPASSWORD"
      // preventing command from execution 
      String pwd = passwords.get(pwdname);
      if (pwd != null) {
        options.set(pwdname, pwd);
      }
    }
  }
}

Looking into CLIUtil.readPasswordFileOptions method it became obvious that if called using "false" as second parameter we get proper map instance with "aliaspasseord" as key and "tests" as value and command will not fail. I assume that this is a bug and fix must be like:

- Map<String, String> passwords = CLIUtil.readPasswordFileOptions(pwfile, true);
+ Map<String, String> passwords = CLIUtil.readPasswordFileOptions(pwfile, false);


 Comments   
Comment by gray [ 16/Dec/13 ]

As always... no reaction





[GLASSFISH-20888] when excute list-jndi-entries command,java.lang.NullPointerException is happenning Created: 08/Nov/13  Updated: 19/Sep/14  Resolved: 20/Mar/14

Status: Closed
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: lzg5039 Assignee: Chris Kasso
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

window32



 Description   

after execute the following command
1.asadmin start-domain
2.asadmin list-jndi-entries --context ejb/mgmt/MEJB
the following exception will be printted at the server.log of DAS
java.lang.NullPointerException
at org.glassfish.enterprise.iiop.impl.IiopFolbGmsClient.getAllClusterInstanceInfo(IiopFolbGmsClient.java:443)
at org.glassfish.enterprise.iiop.impl.IiopFolbGmsClient.<init>(IiopFolbGmsClient.java:152)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.setFOLBProperties(GlassFishORBManager.java:423)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.initORB(GlassFishORBManager.java:459)
at org.glassfish.enterprise.iiop.impl.GlassFishORBManager.getORB(GlassFishORBManager.java:264)
at org.glassfish.enterprise.iiop.impl.GlassFishORBFactoryImpl.createORB(GlassFishORBFactoryImpl.java:93)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getORB(GlassFishORBHelper.java:163)
at org.glassfish.enterprise.iiop.api.GlassFishORBHelper.getProtocolManager(GlassFishORBHelper.java:231)
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:830)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:590)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:143)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:137)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.kernel.javaee.MEJBNamingObjectProxy.deployMEJB(MEJBNamingObjectProxy.java:129)
at org.glassfish.kernel.javaee.MEJBNamingObjectProxy.create(MEJBNamingObjectProxy.java:96)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:480)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at com.sun.enterprise.naming.impl.SerialContext.list(SerialContext.java:786)
at javax.naming.InitialContext.list(InitialContext.java:455)
at javax.naming.InitialContext.list(InitialContext.java:455)
at com.sun.enterprise.admin.monitor.jndi.JndiNameLookupHelper.getJndiEntriesByContextPath(JndiNameLookupHelper.java:95)
at org.glassfish.admin.monitor.cli.ListJndiEntries.getNames(ListJndiEntries.java:134)
at org.glassfish.admin.monitor.cli.ListJndiEntries.execute(ListJndiEntries.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:404)
at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:140)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:158)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:353)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:343)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:237)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:211)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:982)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:330)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:173)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:496)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:175)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:187)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:837)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:722)



 Comments   
Comment by Terry2013 [ 14/Mar/14 ]

Hi,Chris Kasso

After a few investigation about the source, I found the reason why NullPointerException happens.

org.glassfish.enterprise.iiop.impl.IiopFolbGmsClient
    private Map<String,ClusterInstanceInfo> getAllClusterInstanceInfo() {
        final Cluster myCluster = myServer.getCluster() ;★1
        fineLog( "getAllClusterInstanceInfo: myCluster {0}", myCluster ) ;

        final Config myConfig = getConfigForServer( myServer ) ;
        fineLog( "getAllClusterInstanceInfo: myConfig {0}", myConfig ) ;

        final Map<String,ClusterInstanceInfo> result =
            new HashMap<String,ClusterInstanceInfo>() ;

        for (Server server : myCluster.getInstances()) { ★2
            ClusterInstanceInfo cii = getClusterInstanceInfo( server, myConfig,
                false) ;
            if (cii != null) {
                result.put( server.getName(), cii ) ;
            }
        }

        fineLog( "getAllClusterInstanceInfo: result {0}", result ) ;
        return result ;
    }

★1.When myServer is DAS, myServer.getCluster() method return null.
★2.But when myCluster.getInstances() method is invoked , this method does not check whether myCluster is null.

Comment by Terry2013 [ 17/Mar/14 ]

Hi Chris,

I modify the following code, it works fine,could you please confirm it?
If the modification is OK, I will commit it.

org.glassfish.enterprise.iiop.impl.IiopFolbGmsClient
--- IiopFolbGmsClient.java	(revision 63160)
+++ IiopFolbGmsClient.java	(working copy)
@@ -440,11 +440,15 @@
         final Map<String,ClusterInstanceInfo> result =
             new HashMap<String,ClusterInstanceInfo>() ;
 
-        for (Server server : myCluster.getInstances()) {
-            ClusterInstanceInfo cii = getClusterInstanceInfo( server, myConfig,
-                false) ;
-            if (cii != null) {
-                result.put( server.getName(), cii ) ;
+        //When myServer is DAS's situation, myCluster is null.
+        //null check is needed.
+        if (myCluster != null) {
+            for (Server server : myCluster.getInstances()) {
+                ClusterInstanceInfo cii = getClusterInstanceInfo(server,
+                        myConfig, false);
+                if (cii != null) {
+                    result.put(server.getName(), cii);
+                }
             }
         }
 

Thank you.

Comment by Chris Kasso [ 19/Mar/14 ]

The fix looks fine to me.

Comment by Terry2013 [ 20/Mar/14 ]

the issue has been fixed in r63167.





[GLASSFISH-20824] NPE occured when delete ssh node Created: 25/Sep/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Jeremy_Lv Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ubuntu



 Description   

I think this NPE will be thrown to the server.log by accident, Here's the stacktrace:

[2013-09-25T17:57:46.242+0800] [glassfish 4.0] [SEVERE] [] [] [tid: 
_ThreadID=218 _ThreadName=admin-listener(11)] [timeMillis: 
1380103066242] [levelValue: 1000] [[
   Error in dealiasing the password
${ALIAS=pswdalias-a8e4b8de291dcf51cffeec980ab48992d}: Alias pswdalias-a8e4b8de291dcf51cffeec980ab48992d does not exist]]

[2013-09-25T17:57:46.246+0800] [glassfish 4.0] [SEVERE] [NCLS-CORE-00003] [javax.enterprise.system.core] [tid: _ThreadID=218 _ThreadName=admin-listener(11)] [timeMillis: 1380103066246] [levelValue: 
1000] [[
   Exception while running a command
java.lang.NullPointerException
     at
org.glassfish.cluster.ssh.launcher.SSHLauncher.expandPasswordAlias(SSHLauncher.java:681)
     at
com.sun.enterprise.v3.admin.cluster.DeleteNodeSshCommand.getPasswords(DeleteNodeSshCommand.java:86)
     at
com.sun.enterprise.v3.admin.cluster.DeleteNodeRemoteCommand.execCommand(DeleteNodeRemoteCommand.java:225)
     at
com.sun.enterprise.v3.admin.cluster.DeleteNodeRemoteCommand.uninstallNode(DeleteNodeRemoteCommand.java:183)
     at
com.sun.enterprise.v3.admin.cluster.DeleteNodeRemoteCommand.executeInternal(DeleteNodeRemoteCommand.java:148)
     at
com.sun.enterprise.v3.admin.cluster.DeleteNodeSshCommand.execute(DeleteNodeSshCommand.java:76)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
     at java.security.AccessController.doPrivileged(Native Method)
     at javax.security.auth.Subject.doAs(Subject.java:356)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
     at java.security.AccessController.doPrivileged(Native Method)
     at javax.security.auth.Subject.doAs(Subject.java:356)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
     at
org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:253)
     at
org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:231)
     at
org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommandLegacyFormat(TemplateExecCommand.java:157)
     at
org.glassfish.admin.rest.resources.TemplateCommandDeleteResource.processDeleteLegacyFormat(TemplateCommandDeleteResource.java:92)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
     at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:140)
     at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:158)
     at
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
     at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101)
     at
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:353)
     at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:343)
     at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
     at
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:237)
     at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
     at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
     at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
     at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
     at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
     at
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318)
     at
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:211)
     at
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:982)
     at
org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:330)
     at
org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:316)
     at
org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:179)
     at
com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:496)
     at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:175)
     at
org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
     at
org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
     at
org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:187)
     at
org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
     at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
     at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
     at
org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
     at
org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
     at
org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
     at
org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:837)
     at
org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
     at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
     at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
     at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
     at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
     at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
     at java.lang.Thread.run(Thread.java:722)
]]






[GLASSFISH-20819] glassfish 4 domain-start command getMasterPasswordFile attempts to read master password from serverDir, instead of configDir Created: 19/Sep/13  Updated: 22/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: heq Assignee: Chris Kasso
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

How to reproduce:
Create a domain with the option --passwordfile and --savemasterpassword. This creates a master-password file in the config folder. When we attempt to start the domain, it complains

"The Master Password is required to start the domain. No console, no prompting possible. You should either create the domain with --savemasterpassword=true or provide a password file with the --passwordfile option.Command start-domain failed."

I found the root cause of the issue. In class LocalServerCommand.java method getMasterPasswordFile, the following line is wrong:

File mp = new File(serverDirs.getServerDir(), "master-password");

It should be serverDirs.getConfigDir() instead, because that is where master-password is saved during domain-creation. I verified this by manually copying the master-password file to the folder one level above the config folder. Then start-domain command works without the complaint.



 Comments   
Comment by skwirking [ 22/Sep/14 ]

As heq reports:

  • start-domain behaves unexpectedly: it looks for the master-password file above the config directory, but
  • create-domain behaves as expected: with --savemasterpassword=true it saves the master-password file inside the config directory.

However, we have also found that:

  • change-master-password behaves unexpectedly: with --savemasterpassword=true it saves the master-password file in the directory above config.

So if you're using create-domain to save the master password, it's not going to work, because start-domain is looking in the wrong place. But if you use change-master-password to save the master password, it will work, because it will get saved to the same wrong place that start-domain is looking.

This is pretty major, as now I cant configure glassfish to auto start on server reboot, because it can't find the master-password file.

If anyone is looking for a workaround, you can either:

  • use change-master-password with --savemasterpassword, as this places the master-password file in the same wrong place that start-domain is expecting
  • create a symbolic link:
    cd path-to-domain
    ln -s config/master-password




[GLASSFISH-20798] redeployment of an already deployed application resets the deployment order to 100 Created: 05/Sep/13  Updated: 05/Sep/13

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: pbelbin Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

using the asadmin command to redeploy an application causes the deployment order value to be reset to the default.

I think it should retain the already set value unless a new value is specified.






[GLASSFISH-20781] list-jndi-entries command does not display Portable JNDI Name while deploying an EJB lite Created: 27/Aug/13  Updated: 19/Sep/14  Resolved: 03/Mar/14

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: TangYong Assignee: Chris Kasso
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish 4


Attachments: Zip Archive test_results_GLASSFISH-20781.zip    

 Description   

Pl. seeing https://www.java.net/forum/topic/glassfish/glassfish/about-ejb-lite-and-portable-jndi-name



 Comments   
Comment by lzg5039 [ 29/Aug/13 ]

when execute the command of "asadmin list-jndi-entries --context java:global",the following exception will happen

remote failure: Naming Exception caught. Invocation exception: Got null ComponentInvocation
Invocation exception: Got null ComponentInvocation
Command list-jndi-entries failed.

it is a bug?

Comment by TangYong [ 29/Aug/13 ]

This must be a issue, for --context,

--context
The name of the JNDI context or subcontext. If context is not specified, all entries in the naming service are returned. If context (such as ejb) is specified, all those entries are returned.

So, the jira itself has told us that in 4.0, list-jndi-entries has been unavailable in some cases.

Comment by jifeng [ 01/Sep/13 ]

Hi
Chris

This is the exact precise place where the failure happens:

com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.java
// Some comments here
 private String getComponentId() throws NamingException {
        String id;

        ComponentInvocation ci;
        if (invMgr==null) {
            ci= habitat.<InvocationManager>getService(InvocationManager.class).getCurrentInvocation();
        } else {
            ci= invMgr.getCurrentInvocation();
        }
        
        if (ci == null) {
            throw new NamingException("Invocation exception: Got null ComponentInvocation ");★
        }
......
}

ci==null, so the code which is marked as "★" will throw the NamingException

I did debug for 'SerialContextProviderImp' class ,i found the Portable JNDI Name objects had been bound in SerialContextProviderImpl object。
however, when i executed the command of "asadmin list-jndi-entries --context java:global", the command did not find the Portable JNDI Name objects in 'SerialContextProviderImpl' class 。
the processing logic is right?

Comment by jifeng [ 12/Sep/13 ]

Hi
Chris

I have revised the source as follows:

com.sun.enterprise.naming.impl.SerialContext.java
Index: SerialContext.java
===================================================================
--- SerialContext.java	(revision 62639)
+++ SerialContext.java	(working copy)
@@ -92,7 +92,7 @@
 
     private static final String JAVA_URL = "java:";
 
-    private static final String JAVA_GLOBAL_URL = "java:global/";
+    private static final String JAVA_GLOBAL_URL = "java:global";
 
       }
 

It works fine,
Could you help me to review these changes?
If it is fine, could you tell me how to run the admin tests,i ran the QL tests and all of the QL tests are passed.

Comment by Chris Kasso [ 12/Sep/13 ]

The change looks good to me. To run the dev tests:

svn co https://svn.dev.java.net/svn/glassfish-svn/trunk/v2/appserv-tests

Set APS_HOME to the appserv-tests directory created from the checkout (e.g. /work2/ws/v2/appserv-tests)
Set S1AS_HOME to your GF build/install (e.g. .../distributions/glassfish/target/stage/glassfish4/glassfish)

Run the tests:

ant -D-Xmx912M all -Dverbose=true

You can add -Dteststorun=XXX to control the tests to run (where XXX is things like cli or cluster, etc)

Comment by jifeng [ 13/Nov/13 ]

Hi
Chris

Thank you for telling me how to run devTest.

But I found that there are some problems in DevTest of Admin modules
when I runned the test case without applying my patch.

In admin modules ,A total of 20 modules should be tested ,thereinto,
only 13 ones can be passed, while 7 of them can not be passed.
The test result of using my patch is exactly the same with the
test result without my patch , so, my patch is without problem in my opinion.

I have checked the reason which causes the admin module occur error,
some errors have nothing with glassfish, it is devTest's problem.

If Chris thinks that it is necessary to amend these problems, I'll be glad to do this job.

Comment by TangYong [ 13/Nov/13 ]

Chris,

The attachment is the test results before applying the patch and after applying the patch.
Pl. seeing it.

From the test results, I think that the patch looks fine.

Best Regards
Tang

Comment by Chris Kasso [ 13/Nov/13 ]

I think the fix is fine. Since the same tests fail before you apply the patch I wouldn't worry about them in this case.

Comment by jifeng [ 03/Mar/14 ]

the issue has been checked in as r63141.
D:\glassfishV4\glassfish~svn\trunk\main\appserver\common\glassfish-naming\src\main\java\com\sun\enterprise\naming\impl\SerialContext.java
D:\glassfishV4\glassfish~svn\trunk\main\appserver\common\glassfish-naming\src\main\java\com\sun\enterprise\naming\impl\SerialContext.java
Completed: At revision: 63141





[GLASSFISH-20767] osgi-shell port is not needed during create-domain Created: 19/Aug/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Sanjeeb Sahoo Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

OSGI_SHELL_TELNET_PORT is not needed anymore. Starting with gf4.0, this port is no longer is needed. create-domain and domain templates may have to change.






[GLASSFISH-20762] jms-ping command only works once Created: 14/Aug/13  Updated: 14/Aug/13

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Andrew_Scully Assignee: Chris Kasso
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 4.0


Tags: connectionpool, jms, ping, resource

 Description   

When using the CLI jms-ping command, it only works the first time.

On subsequent occasions, the following error is returned:

remote failure: Unable to create a temporary Connection Factory to the JMS Host
Unable to create connection pool.
A resource named test_jms_adapter-Connection-Pool already exists.
Command jms-ping failed.

The first time the command is run, a connection factory called "test-jms-adapter" is created, visible from the management console.

Manually deleting this connection factory allows the command to be run again, once.

Invoking jms-ping is the recommended way of guaranteeing that an embedded OpenMQ broker is running (it is started lazily), making this issue particularly problematic in certain cases.






[GLASSFISH-20759] Invalid filename is not checked when a domain is created Created: 14/Aug/13  Updated: 07/Jan/15

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: xianwu Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS
Windows 7 Enterprise (Service Pack 1)

JDK
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21) Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)


Attachments: Text File CreateDomainCommand.patch     Text File LocalStrings.properties.patch    

 Description   

Reproducible operational steps:

1) create a domain and enter a long domain name (246 characters or longer)
asadmin create-domain A1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234Y
Enter admin user name [Enter to accept default "admin" / no password]>

Domain A1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234Y allows admin login as user "admin" with no password.
Command create-domain executed successfully.

The command-line does not check if the filename is valid under windows.

2) list-domain command is OK
asadmin list-domains
A1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234Y not running
domain1 not running
Command list-domains executed successfully.

3) start-domain command failed due to invalid filename
asadmin start-domain A1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234Y
JVM failed to start: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0\bin\java.exe" (in directory "C:\glassfish-4.0.1\glassfish-4.0.1-b02-07_22_2013\glassfish4\glassfish\domains\A1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234Y\config"): CreateProcess error=267, The directory name is invalid
Command start-domain failed.

It looks like that the directory for the newly created domain is not valid under Windows.
The command-line (create-domain) should check this and produce an error instead of creating an invalid directory.



 Comments   
Comment by jifeng [ 31/Dec/14 ]

Hi
Chris Kasso,xianwu
I have reproduced this bug and I will give a patch later

Comment by jifeng [ 07/Jan/15 ]

Hi
Chris Kasso,xianwu

I create a patch for this bug,This is probably not the best fix.so,could you help me to review these changes and give me some suggestions?





[GLASSFISH-20757] restart-domain failed return when invalid jvm-options is inserted into domain.xml Created: 13/Aug/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: xianwu Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS
Windows 7 Enterprise (Service Pack 1)

JDK
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)



 Description   

Reproducible operational steps:

1) start domain normally
asadmin start-domain

2) insert an invalid jvm-options to $GFInstall/domains/domain1/config/domain.xml
<configs>
<config name="server-config">
<java-config debug-options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="" classpath-suffix="">
<!-- insert an invalid jvm-options below -->
<jvm-options>-XXXXX</jvm-options>

</java-config>
</config>
</configs>

3) restart domain but the command failed and timeout occurred
asadmin restart-domain
Timed out waiting for the server to restart
Command restart-domain failed.

server.log failed to output any error message.

4) run restart domain again and got error messages
asadmin restart-domain
Server is not running, will attempt to start it...
Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -XXXXX

Command restart-domain failed.






[GLASSFISH-20756] Incorrect command name in command-line message Created: 13/Aug/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: xianwu Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS
Windows 7 Enterprise (Service Pack 1)

JDK
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)



 Description   

Reproducible operational steps:

1) run any asadmin subcommand with a valid common option
asadmin --echo=false get server.admin-service.das-config.admin-session-timeout-in-minutes
server.admin-service.das-config.admin-session-timeout-in-minutes=60
Command get executed successfully.

As you can see that the subcommand "get" is displayed correctly.

2) run any asadmin subcommand with an invalid common option
asadmin --echo=hope get server.admin-service.das-config.admin-session-timeout-in-minutes
Invalid boolean value for option: echo, Value: hope
Usage: asadmin [-H|--host <host(default:localhost)>]
[-p|--port <port(default:4848)>] [-u|--user <user(default:admin)>]
[-W|--passwordfile <passwordfile>]
[t|-terse[=<terse(default:false)>]]
[s|-secure[=<secure(default:false)>]]
[e|-echo[=<echo(default:false)>]]
[I|-interactive[=<interactive(default:true)>]]
[?|-help[=<help(default:false)>]
[--detach(default:false)] [subcommand [options] [operands]]
Command --echo=hope failed.

As you can see, the subcommand "get" is not displayed correctly. It shows "Command --echo=hope failed".

I guess the error handling in command-line takes the first invalid common option "--echo=hope" as a subcommand name.






[GLASSFISH-20745] Provide Monitoring Capabilities for TimerService / @Schedule objects Created: 07/Aug/13  Updated: 07/Aug/13

Status: Open
Project: glassfish
Component/s: admin, admin_gui
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Bruno Borges Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Similar to the monitoring feature for Batch API, GlassFish Administration Console could also provide an interface to list all @Schedule objects and tasks added through TimerService, so administrators can follow the scheduled tasks for each and all applications deployed in a server.






[GLASSFISH-20724] provide an environment shell script to be sourced by users Created: 25/Jul/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: None
Fix Version/s: 4.1

Type: New Feature Priority: Minor
Reporter: Romain Grécourt Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: asadmin, command, completion, environment, shell

 Description   

This is in the category "nice to have".

A shell script containing various environment variables to be used by users,developers and continuous integration processes.
It could define conventions for various things such as:

  • PATH (adding all binaries of the refered glassfish in the PATH)
  • GF_HOME (would point to the current installation configured in the environment)
  • various default ports
  • command completions.

Here are the immediate benefits I can see:

  • Conventions could allow users sharing shell scripts and run them as is.
  • Conventions could unify devtests, improving the developer experience
  • Any user could add "source /path/to/glassfish4/glassfish/conf/environment.sh" to his/her .profile or .rc files.
  • It would reduce the environment part of the CI jobs, and conventions would certainly bring more readability

And...

  • It would help hooking command completion with simplicty.
  • With a one step operation (edit rc file), users could have seemless asadmin command completion !


 Comments   
Comment by Romain Grécourt [ 25/Jul/13 ]

updating statement on ports to just the default port values.





[GLASSFISH-20706] The value of nodedir should be copied in the configuration file when the node is initialized Created: 17/Jul/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Jeremy_Lv Assignee: Joe Di Pol
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows



 Description   

Pl. seeing the following's discussion:
https://java.net/projects/glassfish/lists/dev/archive/2013-07/message/7
I suggest the value of nodedir can be copied in the configuration file when the node is initialized






[GLASSFISH-20705] java.io.IOException will be thrown out when create the instance during the admin command line Created: 17/Jul/13  Updated: 19/Sep/14  Resolved: 20/Mar/14

Status: Closed
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Jeremy_Lv Assignee: zhouronghui
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Win 7


Attachments: Text File CreateInstanceCommand.patch    

 Description   

[Phenomenon]
Here's my steps to reproduce the Exception:

1). Reset the value of AS_DEF_NODES_PATH in asenv.bat(In my platform, the asenv.bat is under the directory of E:\glassfish4\glassfish\config\asenv.bat) as AS_DEF_NODES_PATH=..\my_nodes

2). asadmin start-domain
Command start-domain executed successfully.

3). asadmin create-instance --node localhost-domain1 ins1
Successfully created instance ins1 in the DAS configuration, but failed to retri
eve configuration files during bootstrap.
Command create-instance completed with warnings.

4). Check the server.log and you'll find the following Exception will be thrown out:

[2013-07-17T13:34:05.401+0800] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=35 _ThreadName=admin-listener(3)] [timeMillis: 1374039245401] [levelValue: 1000] [[
  Successfully created instance ins1 in the DAS configuration, but failed to retrieve configuration files during bootstrap.
java.io.IOException: No node parent directory found.
	at com.sun.enterprise.util.io.InstanceDirs.<init>(InstanceDirs.java:98)
	at com.sun.enterprise.v3.admin.cluster.CreateInstanceCommand.getLocalInstanceDir(CreateInstanceCommand.java:241)
	at com.sun.enterprise.v3.admin.cluster.CreateInstanceCommand.bootstrapSecureAdminLocally(CreateInstanceCommand.java:279)
	at com.sun.enterprise.v3.admin.cluster.CreateInstanceCommand.createInstanceFilesystem(CreateInstanceCommand.java:427)
	at com.sun.enterprise.v3.admin.cluster.CreateInstanceCommand.execute(CreateInstanceCommand.java:218)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:356)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
	at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)
	at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:198)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)
	at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
	at java.lang.Thread.run(Thread.java:722)
]]

[My suggestion]
In my option, I think it will be successed without any Exception under my reproduced steps, what means it should be success to create the instance after step 3):

E:\glassfish4\glassfish\bin>asadmin create-instance --node localhost-domain1 ins
1
Command _create-instance-filesystem executed successfully.
Port Assignments for server instance ins1:
JMX_SYSTEM_CONNECTOR_PORT=28686
JMS_PROVIDER_PORT=27676
HTTP_LISTENER_PORT=28080
ASADMIN_LISTENER_PORT=24848
JAVA_DEBUGGER_PORT=29009
IIOP_SSL_LISTENER_PORT=23820
IIOP_LISTENER_PORT=23700
OSGI_SHELL_TELNET_PORT=26666
HTTP_SSL_LISTENER_PORT=28181
IIOP_SSL_MUTUALAUTH_PORT=23920
The instance, ins1, was created on host localhost
Command create-instance executed successfully.


 Comments   
Comment by Jeremy_Lv [ 17/Jul/13 ]

Chris:
I have looked into the code and found it is because the default node directory in creating the instance is different from the default value defined in the asenv.bat(asenv.conf). I want to know whether it is the special syntax as you have designed for the command of "create-instance"?

[My suggestion]
Why not unify the default value of the node in the create-instance and create-local-instance into the same one, which are both defined in the asenv.bat(asenv.conf), Here's some of suggestions:

CreateIntsnaceCommand.java
     private File defaultLocalNodeDirFile() {
+        final Map<String,String> systemProps = 
+            Collections.unmodifiableMap(new ASenvPropertyReader().getProps());
         /*
-         * The "nodes" directory we want to use is a child of
-         * the install directory.
-         *
-         * The installDir field contains the installation directory which the
-         * administrator specified, if s/he specified one, when the target node
-         * was first created.  It is null if the administrator did not specify
-         * an installation directory for the node.  In that case we should
-         * use the DAS's install directory (because this method applies in the
-         * local instance case).
-         */
-        final File nodeParentDir = (installDir == null
-                ? serverContext.getInstallRoot()
-                : new File(installDir, "glassfish"));
-        return new File(nodeParentDir, "nodes");
+         * The default "nodes" directory we want to use 
+         * has been set in asenv.conf named as 
+         * AS_DEF_NODES_PATH
+          */
+        String nodeDirDefault = systemProps.get(
+                SystemPropertyConstants.AGENT_ROOT_PROPERTY);
+        return new File(nodeDirDefault);
     }
Comment by zhouronghui [ 14/Mar/14 ]

The patch for GLASSFISH-20705

Comment by zhouronghui [ 14/Mar/14 ]

Hi Chris,

I think that this is because of the CreateIntsnaceCommand class in nucleus\cluster\admin. and we have maken a patch for that.

Would you please check it? If the patch is OK, I will commit it.

Thank you.

Comment by Chris Kasso [ 19/Mar/14 ]


The developer who wrote the original code looked at the fix and said it is OK. You are clear to integrate the change.

Comment by zhouronghui [ 20/Mar/14 ]

Hi Chris,

Thank you for reviewed the patch. I have committed the fix to trunk at r63166.

Comment by zhouronghui [ 20/Mar/14 ]

The patch have been reviewed by chris, committed at r63166.





[GLASSFISH-20700] Refactor appserver/common/glassfish-naming utils into nucleus/common/common-util Created: 15/Jul/13  Updated: 17/Jul/13  Resolved: 17/Jul/13

Status: Resolved
Project: glassfish
Component/s: admin, naming
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: andriy.zhdanov Assignee: andriy.zhdanov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

ObjectInputOutputStreamFactory from appserver/common/naming is needed for nucleus/core.



 Comments   
Comment by andriy.zhdanov [ 17/Jul/13 ]

Committed revision 62351: Refactor appserver/common/glassfish-naming utils into nucleus/common/common-util





[GLASSFISH-20682] Custom JNDI Resources Not Saving Description Field Created: 06/Jul/13  Updated: 17/Apr/14

Status: Open
Project: glassfish
Component/s: admin, admin_gui
Affects Version/s: 4.0_b89_RC5
Fix Version/s: future release

Type: Bug Priority: Major
Reporter: fishsticks87 Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7


Tags: custom_resource, description, jndi

 Description   

Using GF Admin, I created a custom JNDI resource of type java.util.Properties. I can successfully add and save the name and value columns in the Additional Properties table but the description column is not retained when saving. I also tried going into the domain.xml file and adding a description attribute to the <property> tag but it just gets wiped away again when I go back into the admin area and save it again.

The description field for each property should be saved and it is not getting saved.






[GLASSFISH-20649] Failed in deleting the instance Created: 20/Jun/13  Updated: 19/Sep/14  Resolved: 10/Sep/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Jeremy_Lv Assignee: Chris Kasso
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Attachments: Text File revision.patch    

 Description   

Here's the detailed steps to reproduce it:

1).Failed in delete the local instance

<1>.asadmin create-local-instance ins1
Command create-local-instance executed successfully.

<2>.asadmin create-local-instance INS1
Command create-local-instance executed successfully.

<3>.asadmin delete-local-instance ins1
Command delete-local-instance executed successfully.

<4>.asadmin delete-local-instance INS1
The instance does not exist on this machine.
Command delete-local-instance failed.

<5>. asadmin list-instances
INS1 not running
Command list-instances executed successfully.

I have confirmed this bug is only happened on the windows platform which treats two file paths as the same even if they have different case.

BTW: I have uploaded the patch to fix this issue, pls check whether it is fine for me to check in the changes?

Thanks



 Comments   
Comment by Jeremy_Lv [ 17/Jul/13 ]

Hi, Chris:
IMHO, I think this is a critical bug, here's some of my opnions:

1). If any user have created an instance called ins1 under the directory of GF_home/$

{nodedir}

/$

{node}

, another user create the instance INS1 on the windows platform under the same node directory, the INS1's directory will cover the ins1's directory after the user have created the INS1. This will destroy the user's property about the directory ins1 without any warning messages.

2). The instance can't be started if we have deleted another instance with the same name - different case on the windows platform.

3). It will be failed in deleting the instance if we have deleted another instance with the same name - different case on the windows platform.

Comment by Jeremy_Lv [ 17/Jul/13 ]

Chris:

However, the changes I have attached exist some drawbacks need to be discussed:

1). It will affect the glassfish's performance when execute the "create-instance" and "create-local-instance" command, because it will list the related instance during the operation to create the instance:

CreateInstanceCommand.java
CommandInvocation listInstances = cr.getCommandInvocation("list-instances", report, context.getSubject());
ParameterMap map = new ParameterMap();
map.add("whichTarget", theNode.getName());
listInstances.parameters(map);
listInstances.execute();
CreateLocalInstanceCommand.java
    RemoteCLICommand rc = new RemoteCLICommand("list-instances", this.programOpts, this.env);

2). We should to make sure the value of nodedir can be copied in the configuration file when the node is initialized(I have discussed this issue in the dev mail list and created an issue related as GLASSFISH-20706 ), this is used to enhance our modification about this issue.

3). Our changes will not affect the syntax exist in the Linux platform. This is just an enhancement related to the windows platform.

Comment by Jeremy_Lv [ 10/Sep/13 ]

Here's update the revision!

Comment by Jeremy_Lv [ 10/Sep/13 ]

Checked in the changes as the revision 62710.

nucleus\cluster\cli\src\main\java\com\sun\enterprise\admin\cli\cluster\LocalStrings.properties
nucleus\cluster\admin\src\main\java\com\sun\enterprise\v3\admin\cluster\CreateInstanceCommand.java
nucleus\admin\config-api\src\main\java\com\sun\enterprise\config\serverbeans\LocalStrings.properties
nucleus\cluster\cli\src\main\java\com\sun\enterprise\admin\cli\cluster\LocalStrings.properties
nucleus\admin\config-api\src\main\java\com\sun\enterprise\config\serverbeans\CopyConfig.java
nucleus\cluster\admin\src\main\java\com\sun\enterprise\v3\admin\cluster\LocalStrings.properties
nucleus\cluster\cli\src\main\java\com\sun\enterprise\admin\cli\cluster\CreateLocalInstanceCommand.java
At revision: 62710

Passed all of the QL tests!





[GLASSFISH-20626] ssl-inactivity-timeout Created: 12/Jun/13  Updated: 07/Apr/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b87_RC3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: tak09 Assignee: JeffTancill
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

asadmin set command does not work for ssl-inactivity-timeout. When this asadmin set ssl-inactivity-timeout is entered, error message is displayed.

C:\glassfish\glassfish-4.0-b87-04_25_2013\glassfish4\bin>asadmin set server-config.network-config.pr
otocols.protocol.http-listener-2.ssl.ssl-inactivity-timeout=5
remote failure: Could not change the attributes: java.lang.IllegalArgumentException: HV000039: Inval
id property path. There is no property sslInactivityTimeout in entity org.glassfish.grizzly.config.d
om.Ssl.
java.lang.IllegalArgumentException: HV000039: Invalid property path. There is no property sslInactiv
ityTimeout in entity org.glassfish.grizzly.config.dom.Ssl.
Command set failed.





[GLASSFISH-20613] Need to improve fix to URISyntaxException getting monitoring data (GLASSFISH-20510) Created: 06/Jun/13  Updated: 19/Sep/14  Resolved: 09/Jun/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.1
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Tim Quinn Assignee: Tim Quinn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to GLASSFISH-20510 URISyntaxException getting monitoring... Resolved

 Description   

The earlier fix for GLASSFISH-20510 can cause problems in the way resource names are actually constructed which can appear if the resource URI is used and analyzed.

The underlying problem really was in the way the monitoring name was constructed. It yielded part of a URI path that contained illegal characters: it contained a left bracket without a matching right bracket. Because matched brackets are valid in a URI but unmatched are not, this caused an error in building the URI for the resource name.

The correct fix is to adopt Byron's suggested change to the monitoring code and remove the URL encoding logic I added before.



 Comments   
Comment by Tim Quinn [ 06/Jun/13 ]

Linking to the original issue

Comment by Tim Quinn [ 07/Jun/13 ]

Fix checked in. (There is a related parallel check-in 11827 as well.)

Project: glassfish
Repository: svn
Revision: 62176
Author: tjquinn
Date: 2013-06-07 18:03:10 UTC
Link:

Log Message:
------------
Fix for GLASSFISH-20613

The problem was not that the resource names needed to be encoded before creating the URI (which is what the earlier fix for 20510 did) but that the resource name from the EJB monitoring code needed to provide a URI-friendly item name.

In a comment on 20510 Byron provided the fix for the monitoring code. This check-in includes that change and a change in CommandSecurityChecker to remove the encoding logic that was inserted earlier.

Passed QL, the ejb dev test which failed in 20510

Revisions:
----------
62176

Modified Paths:
---------------
trunk/main/nucleus/admin/util/src/main/java/com/sun/enterprise/admin/util/CommandSecurityChecker.java
trunk/main/appserver/ejb/ejb-container/src/main/java/com/sun/ejb/monitoring/stats/EjbMonitoringUtils.java

Comment by Tim Quinn [ 09/Jun/13 ]

Marina correctly pointed out that changing the exposed string for the monitored elements that contain a left bracket might break existing user procedures that expect that format.

I'm reopening this issue so that we'll leave the externally-visible monitoring name string as before but change the resource name used internally for authorization checks.

Comment by Tim Quinn [ 09/Jun/13 ]

Enhanced fix checked in.

Project: glassfish
Repository: svn
Revision: 62180
Author: tjquinn
Date: 2013-06-09 15:04:58 UTC
Link:

Log Message:
------------
Enhanced fix for GLASSFISH-20613

The earlier fix for this changed the externally-visible string by which the monitored element was exposed (replacing the left bracket with 'ARRAY') so as to prevent a URI-unfriendly resource name (including the left bracket with no matching right one) from being used for authorization.

These changes restore the externally-visible string, substituting ARRAY for the left bracket only internally in the resource name.

Passed QL, the ejb dev test which failed in 20510

Revisions:
----------
62180

Modified Paths:
---------------
trunk/main/nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/MonitoringReporter.java
trunk/main/appserver/ejb/ejb-container/src/main/java/com/sun/ejb/monitoring/stats/EjbMonitoringUtils.java





[GLASSFISH-20606] create-domain subcommand doesn't write jms.port property to domain.xml Created: 06/Jun/13  Updated: 29/Apr/15

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: David Zhao Assignee: mukesh.kumawat
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to GLASSFISH-16811 JMS - connection refused on 7676 when... Open

 Description   

When creating a new domain with jms.port property which is not the default value 7676, it can be seen in the asadmin output, but it doesn't be written to domain.xml for persistence.

>asadmin create-domain --domainproperties jms.port=7777 jmsdomain
Enter admin user name [Enter to accept default "admin" / no password]>
Using default port 4848 for Admin.
Using default port 8080 for HTTP Instance.
Using port 7777 for JMS.
Using default port 3700 for IIOP.
Using default port 8181 for HTTP_SSL.
Using default port 3820 for IIOP_SSL.
Using default port 3920 for IIOP_MUTUALAUTH.
Using default port 8686 for JMX_ADMIN.
Using default port 6666 for OSGI_SHELL.
Using default port 9009 for JAVA_DEBUGGER.
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=davidz.cn.oracle.com,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=davidz.cn.oracle.com-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
Domain jmsdomain created.

In domain.xml, no 7777 can be found , but all the jms ports are default 7676 instead.



 Comments   
Comment by jifeng [ 27/Aug/13 ]

Hi
Chris,David
I modify the following code, it works fine,the jms.port will be written to domain.xml

com.sun.enterprise.admin.servermgmt.domain.CustomTokenClient

Index: CustomTokenClient.java
===================================================================
--- CustomTokenClient.java	(revision 62639)
+++ CustomTokenClient.java	(working copy)
@@ -71,7 +71,7 @@
     public static final String CUSTOM_TOKEN_PLACE_HOLDER = "TOKENS_HERE";
     public static final String DEFAULT_TOKEN_PLACE_HOLDER = "DEFAULT_TOKENS_HERE";
-
+    public static final String JMS_PROVIDER_PORT_TOKEN_NAME = "JMS_PROVIDER_PORT";
     private DomainConfig _domainConfig;
 
     public CustomTokenClient(DomainConfig domainConfig) {
@@ -120,6 +120,11 @@
          if (!NetUtils.isPortFree(port)) {
             throw new DomainException(_strings.get("unavailablePort", port));
           }
+       } if (name.equals(JMS_PROVIDER_PORT_TOKEN_NAME) && _domainConfig.get(DomainConfig.K_JMS_PORT) != null) {
+         port = Integer.valueOf(_domainConfig.get(DomainConfig.K_JMS_PORT).toString());
+         if (!NetUtils.isPortFree(port)) {
+              throw new DomainException(_strings.get("unavailablePort", port));
+          }                                
     } else {
             if (portBase != null && token.getTokenTypeDetails() instanceof PortTypeDetails) {
                   PortTypeDetails portTypeDetails = (PortTypeDetails)token.getTokenTypeDetails();

could you please confirm it and give me some suggestions?

Comment by Chris Kasso [ 19/Feb/14 ]

I'm able to duplicate the problem. It didn't exist in 3.1. In 3.1 the following entry is added to the domain.xml:

<jms-service type="EMBEDDED" default-jms-host="default_JMS_host">
<jms-host name="default_JMS_host" host="localhost" port="7777" admin-user-name="admin" admin-password="admin" lazy-init="true"/>
</jms-service>

I suspect this problem cropped up when the Config Modularity support was added to GF 4.0.

I'm not sure at this point whether the proposed fix is the best approach.

Comment by Alok Jain [ 03/Mar/14 ]

Fix looks good, I would like to wrap it in a if-else condition to avoid one additional call to NetUtils.isPortFree(port) method.

if (name.equals(JMS_PROVIDER_PORT_TOKEN_NAME) && _domainConfig.get(DomainConfig.K_JMS_PORT) != null)

{ port = Integer.valueOf(_domainConfig.get(DomainConfig.K_JMS_PORT).toString()); }

else

{ port = Integer.valueOf(domainProps.getProperty(token.getName())); }

if (!NetUtils.isPortFree(port))

{ throw new DomainException(_strings.get("unavailablePort", port)); }

The fix will resolve the issue corresponding to the JMS_PROVIDER_PORT, but if config modularity codes return some additional tokens and user tries to override them with --domainproperties argument than the similar check has to be added for those tokens also.

Comment by sergeich [ 29/Apr/15 ]

I confirm that this issue still exists and it is reproducible in Glassfish 4.1
Is there any idea when this bug will be fixed?





[GLASSFISH-20586] Disable META-INF/services lookup of Jersey in admin/rest module Created: 29/May/13  Updated: 29/Aug/13

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Libor Kramolis Assignee: martin.mares
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Jersey v2.1 will allow to disable META-INF/services lookup. See JERSEY-1846 for more information.



 Comments   
Comment by Libor Kramolis [ 29/May/13 ]
Index: nucleus/pom.xml
===================================================================
--- nucleus/pom.xml	(revision 62121)
+++ nucleus/pom.xml	(working copy)
@@ -139,7 +139,7 @@
         <gmbal.version>4.0.0-b001</gmbal.version>
         <woodstox.version>4.1.2</woodstox.version>
         <antlr.version>2.7.6</antlr.version>
-        <jersey.version>2.0</jersey.version>
+        <jersey.version>2.1-SNAPSHOT</jersey.version>
         <jackson.version>1.9.11</jackson.version>
         <jettison.version>1.3.3</jettison.version>
         <guava.version>14.0</guava.version>
Index: nucleus/admin/rest/rest-service/pom.xml
===================================================================
--- nucleus/admin/rest/rest-service/pom.xml	(revision 62121)
+++ nucleus/admin/rest/rest-service/pom.xml	(working copy)
@@ -122,6 +122,12 @@
         </dependency>
 
         <dependency>
+            <groupId>org.glassfish.jersey.containers</groupId>
+            <artifactId>jersey-container-grizzly2-http</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.kohsuke.metainf-services</groupId>
             <artifactId>metainf-services</artifactId>
             <optional>true</optional>
Index: nucleus/admin/rest/rest-service/src/main/java/org/glassfish/admin/rest/adapter/RestCommandResourceProvider.java
===================================================================
--- nucleus/admin/rest/rest-service/src/main/java/org/glassfish/admin/rest/adapter/RestCommandResourceProvider.java	(revision 62121)
+++ nucleus/admin/rest/rest-service/src/main/java/org/glassfish/admin/rest/adapter/RestCommandResourceProvider.java	(working copy)
@@ -55,11 +55,13 @@
 import org.glassfish.hk2.api.ServiceLocator;
 import org.glassfish.hk2.utilities.Binder;
 import org.glassfish.internal.api.ServerContext;
+import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainerProvider;
 import org.glassfish.jersey.media.sse.SseFeature;
 import org.glassfish.jersey.message.MessageProperties;
 import org.glassfish.jersey.server.ResourceConfig;
 import org.glassfish.jersey.server.ServerProperties;
 import org.glassfish.jersey.server.filter.CsrfProtectionFilter;
+import org.glassfish.jersey.server.filter.UriConnegFilter;
 
 /**
  * Responsible for providing ReST resources for {@code asadmin} and {@code cadmin} communication.
@@ -138,12 +140,14 @@
         for (Binder b : additionalBinders) {
             rc.register(b);
         }
+        rc.register(UriConnegFilter.class);
+        rc.register(GrizzlyHttpContainerProvider.class);
+
         rc.property(MessageProperties.LEGACY_WORKERS_ORDERING, true);
         //Disable as much as possible
         rc.property(ServerProperties.JSON_PROCESSING_FEATURE_DISABLE, true);
-        rc.property(ServerProperties.WADL_FEATURE_DISABLE, true);
-        rc.property(ServerProperties.BV_FEATURE_DISABLE, true);
         rc.property(ServerProperties.RESOURCE_VALIDATION_DISABLE, true);
+        rc.property(ServerProperties.METAINF_SERVICES_LOOKUP_DISABLE, true);
         return rc;
     }
     
Index: nucleus/admin/rest/rest-service/src/main/java/org/glassfish/admin/rest/adapter/AdminJerseyServiceIteratorProvider.java
===================================================================
--- nucleus/admin/rest/rest-service/src/main/java/org/glassfish/admin/rest/adapter/AdminJerseyServiceIteratorProvider.java	(revision 62121)
+++ nucleus/admin/rest/rest-service/src/main/java/org/glassfish/admin/rest/adapter/AdminJerseyServiceIteratorProvider.java	(working copy)
@@ -1,214 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License.  You can
- * obtain a copy of the License at
- * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
- * or packager/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at packager/legal/LICENSE.txt.
- *
- * GPL Classpath Exception:
- * Oracle designates this particular file as subject to the "Classpath"
- * exception as provided by Oracle in the GPL Version 2 section of the License
- * file that accompanied this code.
- *
- * Modifications:
- * If applicable, add the following below the License Header, with the fields
- * enclosed by brackets [] replaced by your own identifying information:
- * "Portions Copyright [year] [name of copyright owner]"
- *
- * Contributor(s):
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-package org.glassfish.admin.rest.adapter;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.ServiceConfigurationError;
-import org.glassfish.jersey.internal.ServiceFinder;
-import org.glassfish.jersey.internal.ServiceFinder.ServiceIteratorProvider;
-import org.glassfish.jersey.internal.spi.AutoDiscoverable;
-import org.glassfish.jersey.server.spi.ComponentProvider;
-
-/** Goal of this finder is to be fast and efficient.
- * It is hardcoded implementation.
- *
- * @author martinmares
- */
-public class AdminJerseyServiceIteratorProvider extends ServiceIteratorProvider {
-    
-    private static final Map<String, String[]> services = new HashMap<String, String[]>();
-    static {
-//        services.put(ContainerProvider.class.getName(), new String[] { 
-//            "org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainerProvider" 
-//        });
-        services.put(AutoDiscoverable.class.getName(), new String[] { 
-//            "org.glassfish.jersey.server.validation.internal.ValidationAutoDiscoverable",
-//                "org.glassfish.jersey.jsonp.internal.JsonProcessingAutoDiscoverable",
-                "org.glassfish.jersey.server.filter.internal.ServerFiltersAutoDiscoverable",
-//                "org.glassfish.jersey.server.wadl.internal.WadlAutoDiscoverable"
-        });
-        services.put(ComponentProvider.class.getName(), new String[] { 
-//            "org.glassfish.jersey.gf.cdi.CdiComponentProvider", 
-//                "org.glassfish.jersey.gf.ejb.EjbComponentProvider"
-        });
-    }
-    
-    private static final ThreadLocal<Boolean> applyDefinedValues = new ThreadLocal<Boolean>() {
-        
-        @Override
-        protected Boolean initialValue() {
-            return Boolean.FALSE;
-        }
-        
-    };
-    
-    private static final ServiceIteratorProvider defaultProvider = new ServiceFinder.DefaultServiceIteratorProvider();
-
-    public AdminJerseyServiceIteratorProvider() {
-        applyDefinedValues.set(Boolean.TRUE);
-    }
-    
-    public void disable() {
-        applyDefinedValues.remove();
-    }
-    
-    private String[] getServiceNames(Class service, String serviceName) {
-        if (serviceName == null) {
-            return services.get(service.getName());
-        } else {
-            return services.get(serviceName);
-        }
-    }
-    
-    @Override
-    public <T> Iterator<Class<T>> createClassIterator(Class<T> service, String serviceName, ClassLoader loader, boolean ignoreOnClassNotFound) {
-        final String[] values = getServiceNames(service, serviceName);
-        if (!applyDefinedValues.get() || values == null) {
-            return defaultProvider.createClassIterator(service, serviceName, loader, ignoreOnClassNotFound);
-        } else {
-            return new ClassIterator<Class<T>>(services.get(serviceName), loader, ignoreOnClassNotFound);
-        }
-    }
-
-    @Override
-    public <T> Iterator<T> createIterator(final Class<T> service, final String serviceName, final ClassLoader loader, final boolean ignoreOnClassNotFound) {
-        final String[] values = getServiceNames(service, serviceName);
-        if (!applyDefinedValues.get() || values == null) {
-            return defaultProvider.createIterator(service, serviceName, loader, ignoreOnClassNotFound);
-        } else {
-            return new Iterator<T>() {
-
-                Iterator<Class<T>> delegate = createClassIterator(service, serviceName, loader, ignoreOnClassNotFound);
-
-                @Override
-                public boolean hasNext() {
-                    return delegate.hasNext();
-                }
-
-                @Override
-                public T next() {
-                    try {
-                        return delegate.next().newInstance();
-                    } catch (Exception ex) {
-                        throw new ServiceConfigurationError(ex.getLocalizedMessage(), ex);
-                    }
-                }
-
-                @Override
-                public void remove() {
-                    delegate.remove();
-                }
-            };
-        }
-    }
-    
-    public static class ClassIterator<T extends Class> implements Iterator<T> {
-        
-        private final String[] names;
-        private final ClassLoader classLoader;
-        private final boolean ignoreOnClassNotFound;
-        
-        private int index = -1;
-        private String clazzName;
-        private T clazz;
-
-        private ClassIterator(String[] names, ClassLoader classLoader, boolean ignoreOnClassNotFound) {
-            this.names = names;
-            this.classLoader = classLoader;
-            this.ignoreOnClassNotFound = ignoreOnClassNotFound;
-        }
-        
-        @Override
-        public boolean hasNext() {
-            if (clazzName != null) {
-                return true;
-            }
-            if (names == null) {
-                return false;
-            }
-            //Find next index
-            while (clazzName == null) {
-                if ((++index) >= names.length) {
-                    return false;
-                }
-                clazzName = names[index];
-                if (ignoreOnClassNotFound) {
-                    try {
-                        clazz = (T) Class.forName(clazzName, true, classLoader);
-                    } catch (ClassNotFoundException ex) {
-                        //Search for next one
-                        clazzName = null;
-                    }
-                }
-            }
-            return true;
-        }
-
-        @Override
-        public T next() {
-            if (hasNext()) {
-                try {
-                    if (clazz != null) {
-                        return clazz;
-                    } else {
-                        return (T) Class.forName(clazzName, true, classLoader);
-                    }
-                } catch (Exception ex) {
-                    throw new ServiceConfigurationError(ex.getLocalizedMessage(), ex);
-                } finally {
-                    clazz = null;
-                    clazzName = null;
-                }
-            } else {
-                throw new NoSuchElementException();
-            }
-        }
-
-        @Override
-        public void remove() {
-            throw new UnsupportedOperationException();
-        }
-        
-    }
-    
-}
Index: nucleus/admin/rest/rest-service/src/main/java/org/glassfish/admin/rest/adapter/JerseyContainerCommandService.java
===================================================================
--- nucleus/admin/rest/rest-service/src/main/java/org/glassfish/admin/rest/adapter/JerseyContainerCommandService.java	(revision 62121)
+++ nucleus/admin/rest/rest-service/src/main/java/org/glassfish/admin/rest/adapter/JerseyContainerCommandService.java	(working copy)
@@ -41,8 +41,6 @@
 
 import com.sun.enterprise.v3.common.PropsFileActionReporter;
 import java.util.Collections;
-import java.util.Map;
-import java.util.Properties;
 import java.util.Set;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
@@ -69,7 +67,6 @@
 import org.glassfish.hk2.utilities.binding.AbstractBinder;
 import org.glassfish.internal.api.InternalSystemAdministrator;
 import org.glassfish.internal.api.ServerContext;
-import org.glassfish.jersey.internal.ServiceFinder;
 import org.glassfish.jersey.internal.inject.ReferencingFactory;
 import org.glassfish.jersey.internal.util.collection.Ref;
 import org.glassfish.jersey.process.internal.RequestScoped;
@@ -163,19 +160,13 @@
     }
 
     private JerseyContainer getJerseyContainer(ResourceConfig rc) {
-        AdminJerseyServiceIteratorProvider iteratorProvider = new AdminJerseyServiceIteratorProvider();
-        try {
-            ServiceFinder.setIteratorProvider(iteratorProvider);
-            final HttpHandler httpHandler = ContainerFactory.createContainer(HttpHandler.class, rc);
-            return new JerseyContainer() {
-                @Override
-                public void service(Request request, Response response) throws Exception {
-                    httpHandler.service(request, response);
-                }
-            };
-        } finally {
-            iteratorProvider.disable();
-        }
+        final HttpHandler httpHandler = ContainerFactory.createContainer(HttpHandler.class, rc);
+        return new JerseyContainer() {
+            @Override
+            public void service(Request request, Response response) throws Exception {
+                httpHandler.service(request, response);
+            }
+        };
     }
 
     private Set<? extends Binder> getAdditionalBinders() {
Comment by Libor Kramolis [ 28/Aug/13 ]

I've just committed change to trunk.

Comment by Libor Kramolis [ 29/Aug/13 ]

And commit has been reverted because of hudson jobs failures.





[GLASSFISH-20550] VERSION FOR JAVA EE SDK AND GLASSFISH ARE WRONG DURING INSTALLATION Created: 17/May/13  Updated: 17/May/13  Resolved: 17/May/13

Status: Closed
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b80_EE7MS6
Fix Version/s: 4.0_b85

Type: Bug Priority: Minor
Reporter: li.wu Assignee: Tom Mueller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

[ENV]
Windows2008 zh_CN 64bit

[SHIPHOME]
http://javaweb.us.oracle.com/java/re/javaeesdk/7.0/promoted/b80/archive/bundles/latest-sdk-jdk7-windows-x64-ml.exe



 Description   

1.Download shiphome and click it to install;
2."Java EE 6 SDK" shows up for several times during installation;
3."Glassfish Server v3.1" shows up for several times during installation. Pls
check the pictures attached.

This bug is migrated from bugdb 16517819.



 Comments   
Comment by li.wu [ 17/May/13 ]

Fixed in b85.





[GLASSFISH-20549] "JDK SELECTION" STEP SHOWS UP WITHOUT CONTENT IN INSTALLATION Created: 17/May/13  Updated: 17/May/13  Resolved: 17/May/13

Status: Closed
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b80_EE7MS6
Fix Version/s: 4.0_b85

Type: Bug Priority: Minor
Reporter: li.wu Assignee: Tom Mueller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

[ENV]
OEL5 64bit

[SHIPHOME]
http://javaweb.us.oracle.com/java/re/javaeesdk/7.0/promoted/b80/archive/bundles/java_ee_sdk-7-b80-unix-ml.sh



 Description   

1.Download shiphome and click it to install;
2."JDK Selection" step shows up during Introduction and Installation Type;
3.Go to Install Directory page and "JDK Selection" disappears.

This bug is migrated from bugdb 16527137.



 Comments   
Comment by li.wu [ 17/May/13 ]

Fixed in b85.





[GLASSFISH-20535] Intermittent failure in admin-devtest-trunk-windows hudson job (start-domain/restart-domain/start-instance/start-local-instance) Created: 15/May/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b89_RC5
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Tom Mueller Assignee: Byron Nevins
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7



 Description   

The admin-devtest-trunk-windows hudson job is failing intermittently with failures in the following commands:

start-domain
restart-domain
start-instance (via start-cluster)
start-local-instance

The hudson job page is here. Recent failing jobs have been: #3000, #3002, #3003, #3005.
http://hudson-sca.us.oracle.com/view/GF%20Trunk/job/admin-devtests-trunk-windows/



 Comments   
Comment by Tom Mueller [ 15/May/13 ]

This problem has shown up in the 4.0 branch job too:

http://hudson-sca.us.oracle.com/job/admin-devtests-4.0-windows/2/

Comment by Byron Nevins [ 23/May/13 ]

This reminds me of the Heisenberg uncertainty principle. The moment I add diag code to the portion of the tests that fail - POOF. They don't fail anymore. And something seemingly completely different fails.

I've marked it for 4.0.1

I don't know what the real problem is. I'll just keep adding more and better diagnosis code directly into the tests and we'll find out in due course.

Comment by Byron Nevins [ 23/May/13 ]

The failed test on the 4.0 branch is restart-domain. This issue is about a start-cluster issue.

I suspect that it's gremlins that are only seen in automated tests. I can't ever reproduce it.

Comment by Tom Mueller [ 24/May/13 ]

Byron, John Wells suggested adding a build step to the end of the hudson job that would look for an ASMain processes that are left after the run and then run jstack on them. This might help in determining if the failure to start the server is caused by a deadlock.

Comment by marina vatkina [ 24/May/13 ]

I'm wondering if it is the same problem as I observed on the gf-transaction-cluster-devtest since November, until I changed the tests to dynamically determine the ports grabbed by the instances in a new cluster.





[GLASSFISH-20509] GlassFish incompatible with Debian 7 due to LSB incompliance of asadmin create-service Created: 11/May/13  Updated: 13/May/13

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: mkarg Assignee: Byron Nevins
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GlassFish 3.1.2.2, Debian stable (7, "Wheezy"), OpenJDK 7u2+, amd64



 Description   

It seems GlassFish is incompatible with Debian 7 due to an LSB incompliance.

As a result GlassFish is neither starting at host boot, neither the update-rc.d script is able to modify the runlevel settings of the created Service. But manually invoking e. g. /etc/rc2.d/S20GlassFish_domain1 in fact does boot GlassFish correctly when executed manually at the command line!

An identified workaround is to execute the following commands:

  • sudo update-rc.d -f GlassFish_domain1 remove
  • sudo rm /etc/rcS.d/K20GlassFish_domain1
  • sudo update-rc.d GlassFish_domain1 Defaults

This sequence of commands actually fixed the problem very well, but certainly a future GlassFish release should produce rc*.d entries which do not need this Manual fix!

Notes:

  • "-f" is needed at update-rc.d because otherwise the command will not execute. The reason for this is that the rc*.d links produced by asadmin create-service seem to look "strange" in some way to the update-rc.d script. If I understand the output correctly, update-rc.d assumes that rc.local and GlassFish_domain1 scripts build a loop. The "-f" option Forces to ignore any such problems and simply kill all rc*.d links.
  • The manual deletion of the file in /etc/rcS.d is needed because even with the "-f" option, update-rc.d is not deleting the link in rcS.d. I suspect this is due to the fact that LSB defaults are K016 but not K016S?
  • I have not found out what actually the difference is between the original result of asadmin create-service, and the result of update-rc.d remove followed by update-rc.d default – besides the fact that the latter does not create a link in rcS.d, and sets sequence level 02 instead of 20.

I know that Debian is not officially supported, but as it looks as an LSB incomplicance to me, it would be good to fix this anyways.






[GLASSFISH-20494] use the JavaVersion class from ASMainHelper instead of the JDK class Created: 08/May/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b87_RC3
Fix Version/s: 4.1

Type: Improvement Priority: Major
Reporter: Tom Mueller Assignee: Byron Nevins
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

A new class, JavaVersion has been introduced in the common-util module to handle Java versions. This class can be used within ASMainHelper to replace the usage of the JDK class. JDK.java can then be removed.

This enhancement is just for code cleanup.






[GLASSFISH-20436] Provide command to identify the http port for a clustered instance independent of whether it uses the default cluster config Created: 29/Apr/13  Updated: 22/May/13

Status: Reopened
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b86_RC2
Fix Version/s: future release

Type: Improvement Priority: Major
Reporter: marina vatkina Assignee: kumara
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

There is no asadmin command to identify http port of the 1st instance in cluster. The currently available work around of 'asadmin get configs.config.<cluster-name>-config.system-property.HTTP_LISTENER_PORT.value' returns the default value, not the actual value of the assigned port in case the default port was not available at the time of the instance creation.



 Comments   
Comment by Tom Mueller [ 30/Apr/13 ]

Try the following get command for a server named "i1":

$ asadmin get servers.server.i1.system-property.HTTP_LISTENER_PORT.value

If the server is using the default value from the cluster, then you get this output:

remote failure: Dotted name path servers.server.i1.system-property.HTTP_LISTENER_PORT.value not found.
Command get failed.

If the server is using its own value, then you get this output:

servers.server.i1.system-property.HTTP_LISTENER_PORT.value=28081
Command get executed successfully.

Comment by Tom Mueller [ 30/Apr/13 ]

Marking this as resolved since there is a command sequence that provides this information.

If the desire is for a single command that provides this information, then we can reopen this issue and change it to be an RFE.

Comment by marina vatkina [ 30/Apr/13 ]

will change it to RFE





[GLASSFISH-20435] NullPointer exception in domain log on cluster or instance creation Created: 29/Apr/13  Updated: 30/Apr/13  Resolved: 30/Apr/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b86_RC2
Fix Version/s: 4.0_b87_RC3

Type: Bug Priority: Major
Reporter: marina vatkina Assignee: Tom Mueller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0-approved

 Description   

gf-transaction-cluster-devtest reports NPEs during "create-cluster" or "create-local-instance --cluster" call (the log reports various actions on different threads, and the instance log starts at 13:15:42.166-0700) for the 'selfrecovery' and 'autorecovery' tests in the transaction/ee suite. It doesn't happen in other tests.

These are the DAS server.log fragments:

1:

[2013-04-29T13:15:36.997-0700] [glassfish 4.0] [INFO] [membership.snapshot.analysis] [ShoalLogger] [tid: _ThreadID=108 _ThreadName=GMS ViewWindowThread Group-c1] [timeMillis: 1367266536997] [levelValue: 800] [[
GMS1016: Analyzing new membership snapshot received as part of event: JOINED_AND_READY_EVENT for member: server of group: c1]]

[2013-04-29T13:15:37.424-0700] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=55 _ThreadName=pool-8-thread-1] [timeMillis: 1367266537424] [levelValue: 1000] [[
Exception while processing config bean changes :
java.lang.NullPointerException
at java.lang.reflect.Proxy.getInvocationHandler(Proxy.java:656)
at org.jvnet.hk2.config.ConfigSupport.getImpl(ConfigSupport.java:246)
at com.sun.enterprise.v3.admin.listener.CombinedJavaConfigSystemPropertyListener$1.changed(CombinedJavaConfigSystemPropertyListener.java:249)
at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:288)
at com.sun.enterprise.v3.admin.listener.CombinedJavaConfigSystemPropertyListener.changed(CombinedJavaConfigSystemPropertyListener.java:195)
at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:400)
at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:390)
at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:280)
at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:278)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
]]

[2013-04-29T13:15:38.233-0700] [glassfish 4.0] [INFO] [NCLS-CLSTR-20001] [javax.enterprise.cluster.gms.bootstrap] [tid: _ThreadID=154 _ThreadName=pool-24-thread-1] [timeMillis: 1367266538233] [levelValue: 800] [[
Adding instance in1 to health history table.]]

2:
[2013-04-29T13:18:07.273-0700] [glassfish 4.0] [INFO] [membership.snapshot.analysis] [ShoalLogger] [tid: _ThreadID=240 _ThreadName=GMS ViewWindowThread Group-c1] [timeMillis: 1367266687273] [levelValue: 800] [[
GMS1016: Analyzing new membership snapshot received as part of event: JOINED_AND_READY_EVENT for member: server of group: c1]]

[2013-04-29T13:18:08.084-0700] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=234 _ThreadName=pool-49-thread-1] [timeMillis: 1367266688084] [levelValue: 1000] [[
Exception while processing config bean changes :
java.lang.NullPointerException
at java.lang.reflect.Proxy.getInvocationHandler(Proxy.java:656)
at org.jvnet.hk2.config.ConfigSupport.getImpl(ConfigSupport.java:246)
at com.sun.enterprise.v3.admin.listener.CombinedJavaConfigSystemPropertyListener$1.changed(CombinedJavaConfigSystemPropertyListener.java:249)
at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:288)
at com.sun.enterprise.v3.admin.listener.CombinedJavaConfigSystemPropertyListener.changed(CombinedJavaConfigSystemPropertyListener.java:195)
at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:400)
at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:390)
at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:280)
at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:278)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
]]

[2013-04-29T13:18:08.784-0700] [glassfish 4.0] [INFO] [NCLS-CLSTR-20001] [javax.enterprise.cluster.gms.bootstrap] [tid: _ThreadID=220 _ThreadName=pool-43-thread-1] [timeMillis: 1367266688784] [levelValue: 800] [[
Adding instance in1 to health history table.]]



 Comments   
Comment by Tom Mueller [ 30/Apr/13 ]

More information is needed on how to reproduce this issue.
I tried running the appserv-tests/devtests/transaction/ee tests by setting S1AS_HOME and APS_HOME and running "ant all", but the build fails. I tried just creating clustered instances and the message doesn't show up.
It would be helpful if the hudson job set "AS_LOGFILE" so that the commands that it executes would be recorded and the timestamps could be aligned with the server.log error messages.

Comment by marina vatkina [ 30/Apr/13 ]

The tests are executed by running 'ant all' (may be the S1AS_HOME and APS_HOME are not set properly?). The tests that report the NPE are 'selfrecovery' and 'autorecovery'

Comment by Tom Mueller [ 30/Apr/13 ]

To recreate the problem easily, do the following on a clean install:

asadmin start-domain
asadmin create-cluster c1
asadmin create-system-properties --cluster c1 a=b

The NullPointerException message is printed in the log during the 3rd command.

Comment by Byron Nevins [ 30/Apr/13 ]

Tom - Nice job turning it into a 3 command scenario. But #3 is wrong:

WRONG:
asadmin create-system-properties --cluster c1 a=b

RIGHT:
asadmin create-system-properties --target c1 a=b

Comment by Tom Mueller [ 30/Apr/13 ]
  • What is the impact on the customer of the bug?

How likely is it that a customer will see the bug and how serious is the bug?

If the customer adds a system property to a cluster config, they will see this NPE.

Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?
No. This was there in 3.1.2 also.
What CTS failures are caused by this bug?
None.

  • What is the cost/risk of fixing the bug?

How risky is the fix? How much work is the fix? Is the fix complicated?
Low risk. Just add checks for cluster==null in the right places.

  • Is there an impact on documentation or message strings?
    No
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Tests that set system properties.
  • Which is the targeted build of 4.0 for this fix?
    Next one.
  • If this an integration of a new version of a component from another project,
    what are the changes that are being brought in? This might be list of
    Jira issues from that project or a list of revision messages.
    N/A.
Comment by Tom Mueller [ 30/Apr/13 ]

Approved for 4.0.

Comment by Tom Mueller [ 30/Apr/13 ]

Fixed on the trunk in revision 61757.





[GLASSFISH-20415] [Regression] asadmin restart-domain command is failing when using --port, --port & --host, options Created: 26/Apr/13  Updated: 02/May/13  Resolved: 26/Apr/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b86_RC2
Fix Version/s: 4.0

Type: Bug Priority: Major
Reporter: Alex Pineda Assignee: Byron Nevins
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GF 4.0 build 86 (glassfish-4.0-b86-unix.sh*), JDK 1.7.0_21, OEL6 machine with 64 bit OS. Regression verified with GF 4.0 build 84 (java_ee_sdk-7-b84-jdk7-linux-x64.sh*). During installation, did not install Update tool.


Issue Links:
Duplicate
duplicates GLASSFISH-20110 RARE Restart Server|Domain client-sid... Resolved

 Description   

Test scenario is about the "restart options" of asadmin with default domain1 and a second domain (foo_domain). The scenario is basic and in GF4.0 build 84, all the commands are successful. In GF 4.0 build 86, they fail. The specific commands are:

o [test@wolfrun] $ asadmin start-domain domain1 (default domain)
o [test@wolfrun] $ asadmin --port 4848 --host wolfrun.us.oracle.com restart-domain

Build 84:
Successfully restarted the domain
Command restart-domain executed successfully.

Build 86 (after several minutes):
Command restart-domain failed.
Timed out waiting for the server to restart

o [test@wolfrun] $ asadmin --echo --host wolfrun.us.oracle.com restart-domain
asadmin --host wolfrun.us.oracle.com --port 4848 --interactive=true --echo=true --terse=false restart-domain --force=true --kill=false

Build 84:
Successfully restarted the domain
Command restart-domain executed successfully.

Build 86 (after several minutes):
Command restart-domain failed.
Timed out waiting for the server to restart

o [test@wolfrun] $ asadmin create-domain --adminport 52968 foo_domain
o [test@wolfrun] $ asadmin start-domain foo_domain
o [test@wolfrun] $ asadmin --port 52968 --host wolfrun.us.oracle.com restart-domain

Build 84:
Successfully restarted the domain
Command restart-domain executed successfully.

Build 86 (after several minutes):
Command restart-domain failed.
Timed out waiting for the server to restart



 Comments   
Comment by Byron Nevins [ 26/Apr/13 ]

Nice work finding this Alex!!
It's an edge case for 20110

Comment by Alex Pineda [ 02/May/13 ]

Verified issue is fixed in build 87. Bug can be closed now.





[GLASSFISH-20394] NPE in RelativePathResolver Created: 23/Apr/13  Updated: 24/Apr/13  Resolved: 24/Apr/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b85
Fix Version/s: 4.0_b86_RC2

Type: Bug Priority: Major
Reporter: Tim Quinn Assignee: Tim Quinn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0-approved

 Description   

Most references to the domain-scoped password alias store (looked up using hk2) in this class use the get... method which populates the field if necessary, but two references in one method do not, referring directly to the field itself, and those references can lead to NPEs.

  • What is the impact on the customer of the bug?

This is a regression. Diagnosing a connector devtest error led to this.

  • What is the cost/risk of fixing the bug?
    Very low risk. Two call sites in one class need to invoke a method (which is already used in other places in the class) instead of referring directly to a field.
  • Is there an impact on documentation or message strings?
    No
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    QL
  • Which is the targeted build of 4.0 for this fix?
    b86_RC2
  • If this an integration of a new version of a component from another project,
    what are the changes that are being brought in?
    n/a


 Comments   
Comment by Tim Quinn [ 24/Apr/13 ]

Fix checked in.

Project: glassfish
Repository: svn
Revision: 61604
Author: tjquinn
Date: 2013-04-24 00:42:12 UTC
Link:

Log Message:
------------
GLASSFISH-20394 - NPE in RelativePathResolver

Earlier changes introduced the getDomainScopedPasswordAliasStore method which, when needed, looks up an hk2 service. Two call sites in the class weren't converted to use the method instead of referring directly to the field. This led to NPEs.

This changes replaces the direct field references with invocations of the get... method.

Approved: Michael
Reviewed: Chris
Passed: QL, offending connector deftest that exposed the NPE

Revisions:
----------
61604

Modified Paths:
---------------
trunk/main/nucleus/common/internal-api/src/main/java/org/glassfish/internal/api/RelativePathResolver.java





[GLASSFISH-20379] Provide switch for jersey eager loading on/off Created: 23/Apr/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b85
Fix Version/s: 4.1

Type: Improvement Priority: Major
Reporter: martin.mares Assignee: martin.mares
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0-exclude

 Description   

There are some issues with parallel Jersey eager loading in some environments.
Sahoo ask for switch on/off this feature based on domain.xml value.



 Comments   
Comment by Sanjeeb Sahoo [ 26/Apr/13 ]

Unfortunately this is required to be fixed soon. It is affecting testing in some glassfish based distributions. For more details, send email.

Comment by martin.mares [ 29/Apr/13 ]

New related bug: 16731202

Comment by martin.mares [ 29/Apr/13 ]

Proposed optional configuration in domain.xml

<domain>
    ...
    <administration-interface-config lazy-init="true" />
    ...
</domain>
Comment by martin.mares [ 29/Apr/13 ]
  • What is the impact on the customer of the bug?

Enables switching on/off eager initialization of Jersey based admin framework using optional value in domain.xml
This feature is prioritized by HK2 people. For details, please, contact John W. or Sahoo

  • What is the cost/risk of fixing the bug?

Low

  • Is there an impact on documentation or message strings?

Only if we want to make this option public.

  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?

Any CLI tests

  • Which is the targeted build of 4.0 for this fix?

RC3

  • If this an integration of a new version of a component from another project,
    what are the changes that are being brought in? This might be list of
    Jira issues from that project or a list of revision messages.

N/A

Comment by Tom Mueller [ 29/Apr/13 ]

Do not check in this change for 4.0. If it is needed at all (and I strongly question that), wait until the 4.0 branch is created and check it into the trunk.

As for whether this is needed, please provide details about why this is really needed. From looking at the bug referenced above, it looks like the purpose of this would to work around some other bug that hasn't been found yet. Instead, let's find and fix that other bug.

Comment by michael.y.chen [ 29/Apr/13 ]

Tom, Martin, Sahoo, please figure out if this is needed for 4.0.1.

Comment by martin.mares [ 29/Apr/13 ]

Hi Sahoo,
As you see in upper comments it will be nice if you or John can mail (or comment) here more details about the core problem for Tom.
Thanks.

Comment by Sanjeeb Sahoo [ 30/Apr/13 ]

Reassigning this to Martin Mare. Every use of GlassFish does not require Jersey (e.g., embedded ejb container or embedde web container, etc.), so I strongly recommend to provide an option to disable initialization of a component unnecessarily. Let's not add to footprint to start fast.

Current state of things are many people including QA is spending time because of bug #16731202. We need to provide a work around so that teams can effectively carry out their tasks.

Comment by martin.mares [ 06/May/13 ]

Tom recommends:
1. temporarily disable eager loading until the concurrency problem is fixed.
2. continue working with the Jersey and integration teams to get the
concurrency problem fixed.
3. design a different method for triggering eager loading. For example,
one method might be to implement an @Async remote command that will
cause the command framework to be initialized (and Jersey loaded). The
start-domain command could then be modified to invoke that command after
the server has started (since we always want that initialization to
happen if a DAS is started with start-domain). This will allow embedded
environment to optionally choose if they want this to happen.

Comment by martin.mares [ 06/May/13 ]

SVN 61838: Temporary switch off eager loading of admin framework. - Lazy load: First CLI call triggers init.





[GLASSFISH-20362] Clean up Deprecated Code Created: 19/Apr/13  Updated: 19/Sep/14  Resolved: 03/May/13

Status: Closed
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Byron Nevins Assignee: Byron Nevins
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
depends on GLASSFISH-20110 RARE Restart Server|Domain client-sid... Resolved

 Description   

I left old stale code lying around with the fix for 20110. I didn't want to make more changes than absolutely necessary at the time.

Cleanup post 4.0



 Comments   
Comment by Byron Nevins [ 03/May/13 ]

Sending admin/server-mgmt/src/main/java/com/sun/enterprise/admin/servermgmt/cli/LocalServerCommand.java
Transmitting file data .
Committed revision 61826.





[GLASSFISH-20358] Intermittent issues stopping and starting the server with "java.lang.IllegalStateException: Service already unregistered." Created: 19/Apr/13  Updated: 22/Apr/13  Resolved: 22/Apr/13

Status: Closed
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b85
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Amy Roh Assignee: jwells
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0-approved

 Description   

Web devtests perform many stop/start for functionality testings that require server restart and failing to do so is affecting test results. This intermittent issue is causing multiple failures in web devtests.

The server fails to shut down with an error "java.lang.IllegalStateException: Service already unregistered." and subsequent restart fails since the shutdown did not happen.

According to Sahoo, "it will surely impact embeddability of glassfish which is leveraged in cloudlogic and other places".

[2013-04-25T20:22:24.190-0700] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=63 _ThreadName=Thread-16] [timeMillis: 1366946544190] [levelValue: 800] [[
Server shutdown initiated]]

[2013-04-25T20:22:24.191-0700] [glassfish 4.0] [WARNING] [NCLS-BOOTSTRAP-00029] [javax.enterprise.bootstrap] [tid: _ThreadID=63 _ThreadName=Thread-16] [timeMillis: 1366946544191] [levelValue: 900] [[
Exception while unregistering:
java.lang.IllegalStateException: Service already unregistered.
at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:123)
at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.unregisterService(EmbeddedOSGiGlassFishImpl.java:93)
at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.stop(EmbeddedOSGiGlassFishImpl.java:81)
at com.sun.enterprise.v3.admin.StopServer.doExecute(StopServer.java:79)
at com.sun.enterprise.v3.admin.StopDomainCommand.execute(StopDomainCommand.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:356)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
at org.glassfish.api.AsyncImpl$1$1.run(AsyncImpl.java:76)
]]

.....

[2013-04-25T20:22:47.601-0700] [glassfish 4.0] [INFO] [NCLS-CORE-00017] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1366946567601] [levelValue: 800] [[
GlassFish Server Open Source Edition 4.0 (re-continuous) startup time : Felix (3,641ms), startup services(3,534ms), total(7,175ms)]]

[2013-04-25T20:22:47.601-0700] [glassfish 4.0] [SEVERE] [NCLS-CORE-00019] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1366946567601] [levelValue: 1000] [[
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:344)
at sun.nio.ch.Net.bind(Net.java:336)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
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:87)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:450)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:439)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:95)
at org.glassfish.grizzly.config.GenericGrizzlyListener.start(GenericGrizzlyListener.java:168)
at com.sun.enterprise.v3.services.impl.GlassfishNetworkListener.start(GlassfishNetworkListener.java:94)
at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start(GrizzlyProxy.java:230)
at com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:470)
at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:393)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:281)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:328)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
]]

[2013-04-25T20:22:47.640-0700] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=51 _ThreadName=Thread-13] [timeMillis: 1366946567640] [levelValue: 800] [[
Server shutdown initiated]]



 Comments   
Comment by Amy Roh [ 19/Apr/13 ]

The server.log can be viewed from http://hudson-sca.us.oracle.com/job/webtier-dev-tests-bg/3047/artifact/glassfish-v3-image/glassfish4/glassfish/domains/domain1/logs/server.log.save. FYI, this intermittent issue started happening more consistently from 4/17.

Comment by jwells [ 19/Apr/13 ]

So the exception itself is innocuous, right? I mean, it just means that whatever service it is has already been removed which may happen if Felix comes down before this code is run. There must be some other underlying issue, as this one isn't going to stop any subsequent shutdown processing. This is the code printing out that error:

try

{ reg.unregister(); logger.log(Level.INFO, LogFacade.SERVICE_UNREGISTERED, this); }

catch (IllegalStateException e)

{ LogFacade.log(logger, Level.WARNING, LogFacade.SERVICE_UNREGISTRATION_EXCEPTION, e, e); }

Now, this could be indicative of some race condition that is not fully understood, but this particular warning is not serious. Is the process that had this still running when this happens? Can we get a jstack?

Comment by Amy Roh [ 19/Apr/13 ]

The server does fail to shut down and restart. The ISE is the only exception/error displayed in the server.log. It is possible that some race condition is happening. A jstack isn't available since the hanging issue is no longer happening, the process continues, and finishes the test suite.

Comment by Amy Roh [ 21/Apr/13 ]

This stack trace is sent to interested parties before. Including in the bug report for future reference since java.net is back up.

[2013-04-26T05:45:57.122-0700] [glassfish 4.0] [WARNING] [resources.resource-manager.connector-descriptor.bind.failure] [LogStrings.com.sun.appserv.connectors.internal.api] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1366980356771] [timeMillis: 1366980357122] [levelValue: 900] [[
RAR8706: Unable to bind connector descriptor for resource-adapter [ jaxr-ra ]. Following exception occurred : javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv=

{java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is java.lang.NullPointerException]]]

[2013-04-26T05:45:57.121-0700] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=16 _ThreadName=Thread-8] [timeMillis: 1366980357121] [levelValue: 1000] [[
java.lang.NullPointerException
at com.sun.enterprise.naming.impl.SerialContext.getORB(SerialContext.java:347)
at com.sun.enterprise.naming.impl.SerialContext.getProviderCacheKey(SerialContext.java:354)
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:384)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:329)
at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:675)
at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:692)
at javax.naming.InitialContext.rebind(InitialContext.java:431)
at javax.naming.InitialContext.rebind(InitialContext.java:431)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:210)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:196)
at com.sun.appserv.connectors.internal.ConnectorResourceManagerLifecycleListener.bindConnectorDescriptorProxies(ConnectorResourceManagerLifecycleListener.java:147)
at com.sun.appserv.connectors.internal.ConnectorResourceManagerLifecycleListener.bindConnectorDescriptors(ConnectorResourceManagerLifecycleListener.java:136)
at com.sun.appserv.connectors.internal.ConnectorResourceManagerLifecycleListener.resourceManagerStarted(ConnectorResourceManagerLifecycleListener.java:184)
at com.sun.appserv.connectors.internal.ConnectorResourceManagerLifecycleListener.resourceManagerLifecycleEvent(ConnectorResourceManagerLifecycleListener.java:177)
at org.glassfish.resourcebase.resources.listener.ResourceManager.notifyListeners(ResourceManager.java:132)
at org.glassfish.resourcebase.resources.listener.ResourceManager.postConstruct(ResourceManager.java:123)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:281)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:328)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)]]

[2013-04-26T05:45:58.958-0700] [glassfish 4.0] [INFO] [NCLS-CORE-00015] [javax.enterprise.system.core] [tid: _ThreadID=13 _ThreadName=RunLevelControllerThread-1366980356767] [timeMillis: 1366980358958] [levelValue: 800] [[
Shutdown requested
MultiException stack 1 of 1
MultiException stack 1 of 4
java.lang.RuntimeException: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

[Root exception is java.lang.NullPointerException]
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.postConstruct(InjectionManagerImpl.java:117)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:281)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:328)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:107)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:558)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:191)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:214)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:311)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv=

{java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is java.lang.NullPointerException]
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:334)
at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:675)
at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:692)
at javax.naming.InitialContext.rebind(InitialContext.java:431)
at javax.naming.InitialContext.rebind(InitialContext.java:431)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:210)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:196)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.postConstruct(InjectionManagerImpl.java:114)
... 21 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.naming.impl.SerialContext.getORB(SerialContext.java:347)
at com.sun.enterprise.naming.impl.SerialContext.getProviderCacheKey(SerialContext.java:354)
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:384)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:329)
... 28 more
MultiException stack 2 of 4
java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.container.common.impl.util.InjectionManagerImpl
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:346)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:107)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:558)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:191)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:214)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:311)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
MultiException stack 3 of 4
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl errors were found
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:226)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:311)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
MultiException stack 4 of 4
java.lang.IllegalStateException: Unable to perform operation: resolve on com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:340)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

[2013-04-26T05:45:59.018-0700] [glassfish 4.0] [SEVERE] [NCLS-CORE-00016] [javax.enterprise.system.core] [tid: _ThreadID=13 _ThreadName=RunLevelControllerThread-1366980356767] [timeMillis: 1366980359018] [levelValue: 1000] [[
Startup service failed to start
MultiException stack 1 of 1
MultiException stack 1 of 4
java.lang.RuntimeException: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

[Root exception is java.lang.NullPointerException]
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.postConstruct(InjectionManagerImpl.java:117)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:281)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:328)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:107)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:558)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:191)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:214)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:311)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv=

{java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

[Root exception is java.lang.NullPointerException]
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:334)
at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:675)
at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:692)
at javax.naming.InitialContext.rebind(InitialContext.java:431)
at javax.naming.InitialContext.rebind(InitialContext.java:431)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:210)
at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:196)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.postConstruct(InjectionManagerImpl.java:114)
... 21 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.naming.impl.SerialContext.getORB(SerialContext.java:347)
at com.sun.enterprise.naming.impl.SerialContext.getProviderCacheKey(SerialContext.java:354)
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:384)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:329)
... 28 more
MultiException stack 2 of 4
java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.container.common.impl.util.InjectionManagerImpl
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:346)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:107)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:558)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:77)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:191)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:214)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:311)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
MultiException stack 3 of 4
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl errors were found
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:226)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:311)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
MultiException stack 4 of 4
java.lang.IllegalStateException: Unable to perform operation: resolve on com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:340)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:158)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
]]

[2013-04-26T05:45:59.133-0700] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=57 _ThreadName=Thread-12] [timeMillis: 1366980359133] [levelValue: 800] [[
Server shutdown initiated]]

[2013-04-26T05:45:59.138-0700] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=58 _ThreadName=Thread-13] [timeMillis: 1366980359138] [levelValue: 800] [[
Server shutdown initiated]]

[2013-04-26T05:45:59.141-0700] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00027] [javax.enterprise.bootstrap] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1366980359141] [levelValue: 800] [[
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@66e9d9f0 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@5cf33dce.]]

[2013-04-26T05:45:59.401-0700] [glassfish 4.0] [INFO] [NCLS-JMX-00005] [javax.enterprise.system.jmx] [tid: _ThreadID=52 _ThreadName=Thread-11] [timeMillis: 1366980359401] [levelValue: 800] [[
JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://don-vm2.us.oracle.com:53510/jndi/rmi://don-vm2.us.oracle.com:53510/jmxrmi]]

[2013-04-26T05:46:00.150-0700] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00028] [javax.enterprise.bootstrap] [tid: _ThreadID=57 _ThreadName=Thread-12] [timeMillis: 1366980360150] [levelValue: 800] [[
Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@66e9d9f0 from service registry.]]

[2013-04-26T05:46:00.151-0700] [glassfish 4.0] [INFO] [] [] [tid: _ThreadID=57 _ThreadName=Thread-7] [timeMillis: 1366980360151] [levelValue: 800] [[
FileMonitoring shutdown]]

[2013-04-26T05:46:00.155-0700] [glassfish 4.0] [WARNING] [NCLS-BOOTSTRAP-00029] [javax.enterprise.bootstrap] [tid: _ThreadID=58 _ThreadName=Thread-13] [timeMillis: 1366980360155] [levelValue: 900] [[
Exception while unregistering:
java.lang.IllegalStateException: Service already unregistered.
at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:123)
at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.unregisterService(EmbeddedOSGiGlassFishImpl.java:93)
at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.stop(EmbeddedOSGiGlassFishImpl.java:81)
at com.sun.enterprise.v3.admin.StopServer.doExecute(StopServer.java:79)
at com.sun.enterprise.v3.admin.StopDomainCommand.execute(StopDomainCommand.java:96)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:537)
at org.glassfish.api.AsyncImpl$1$1.run(AsyncImpl.java:76)

Comment by jwells [ 22/Apr/13 ]

I have fixed two deadlocks in logging by adding dependencies in the services and have also ensured that the Globals service has been moved to start level 0 to ensure that it comes up prior to any services at level 1 get started (which will get rid of the NPE reported in this bug).

I have run quicklook and the EJB devtests...

Comment by jwells [ 22/Apr/13 ]

The change number that I believe fixes this is 61580.

Comment by jwells [ 22/Apr/13 ]

This has broken some upstream Hudsons. I have a fix, so I'll re-open this until the new and improved fix is in.

Comment by jwells [ 22/Apr/13 ]

Change 61582 uses a common API interface rather than the services themselves which is a better solution and should fix the upstream Hudsons.





[GLASSFISH-20334] Restart of domain during security devtests fails to start with ClassNotFoundException: Unable to load class 'org.osgi.util.tracker.ServiceTracker' Created: 17/Apr/13  Updated: 19/Apr/13  Resolved: 19/Apr/13

Status: Closed
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Craig Perez Assignee: Craig Perez
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

hudson-sca job security-devtests-trunk



 Description   

Intermittent failure of security devtests during a domain restart, the startup failed with:

[exec] Apr 16, 2013 11:41:47 PM com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder build
[exec] INFO: Updating system bundle.
[exec] Exception in thread "main" java.lang.reflect.InvocationTargetException
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[exec] at java.lang.reflect.Method.invoke(Method.java:601)
[exec] at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
[exec] at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
[exec] Caused by: java.lang.NoClassDefFoundError: org/osgi/util/tracker/ServiceTracker
[exec] at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime.newGlassFish(EmbeddedOSGiGlassFishRuntime.java:90)
[exec] at com.sun.enterprise.glassfish.bootstrap.GlassFishRuntimeDecorator.newGlassFish(GlassFishRuntimeDecorator.java:68)
[exec] at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntime.newGlassFish(OSGiGlassFishRuntime.java:88)
[exec] at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:113)
[exec] ... 6 more
[exec] Caused by: java.lang.ClassNotFoundException: Unable to load class 'org.osgi.util.tracker.ServiceTracker' because the bundle wiring for org.glassfish.main.core.glassfish is no longer valid.
[exec] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1494)
[exec] at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
[exec] at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
[exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
[exec] ... 10 more



 Comments   
Comment by Sanjeeb Sahoo [ 17/Apr/13 ]

The log message "INFO: Updating system bundle" is unexpected. That occurs when system detects a change in jar file in modules directory during restart. I doubt your hudson job changing modules directory content. The only possible reason I can think of based on experience is clock settings. For some reason, the jar files in modules dir have timestamp in future. We actually had this issue once with some of our build machines' clock settings a couple of months ago. May be it has resurfaced. Take a look at the jar files timestamps and compare it with distribution zip file's timestamp.

Comment by Craig Perez [ 17/Apr/13 ]

Interesting, the server log not too long before the failure is reporting for one of the test cases:

Caused by: java.security.cert.CertificateNotYetValidException: NotBefore: Wed Apr 17 02:25:52 PDT 2013

The job started at: Tue Apr 16 23:31:40 PDT 2013

And the last log message is: [2013-04-16T23:41:43.903-0700]

Comment by Tom Mueller [ 17/Apr/13 ]

Assigning back to Craig to gather more data. It appears that this may be related to some issue with the clock on the system being used.

If this problem cannot be reproduced, please close the issue.

Comment by shreedhar_ganapathy [ 19/Apr/13 ]

Craig, Can you please provide the data requested to we can make a decision on this issue?

Comment by Craig Perez [ 19/Apr/13 ]

I have not seen the problem since original failure and there have been several runs of the hudson job. It could well be that a particular slave has a clock issue?

I'll re-open if I start seeing this issue again or have more data.





[GLASSFISH-20272] Java Version Parsing Broken Badly on Mac Created: 10/Apr/13  Updated: 07/Jun/13  Resolved: 07/Jun/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Byron Nevins Assignee: Yamini K B
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

in JDK.java

getVersion() returns null when given the actual correct version string from current Macs:

"1.7.0_10-ea"

This causes havoc in code that needs to find a JDK or JRE.

The code is too simple. It's a one-line regex match. In this case it does not know what the "-ea" means and punts.



 Comments   
Comment by Byron Nevins [ 10/Apr/13 ]

FYI

JDK.java is in nucleus/common/common-util

Comment by Byron Nevins [ 10/Apr/13 ]

This is a great candidate for unit tests. JDK.java is very stand-alone, you can write up dozens of strings to test pretty quickly.

Comment by Byron Nevins [ 10/Apr/13 ]

I just noticed – the recent additions can't possibly work. JDK was designed to describe the current JDK we are running in. As a result – all of the state is static.

The new code creates instances of JDK – but the state is still static. So every time a new instance is created, the previous values are overwritten.
I.e. this code needs to go into the shop for a refit!

Please run any changes by me before checking in...

Comment by Byron Nevins [ 08/May/13 ]

Commit 61888 broke Admin Dev Tests on Windows. 100% reproducible and confirmed.

Comment by Yamini K B [ 07/Jun/13 ]

The commit was fine, Windows hudson job fails intermittently.





[GLASSFISH-20245] stop-domain command doesn't work when GlassFish_Platform=Static Created: 09/Apr/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b83
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Tom Mueller Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If GlassFish is started using the Static platform, i.e., with:

java -DGlassFish_Platform=Static -jar glassfish4/glassfish/modules/glassfish.jar

and:

asadmin stop-domain

is run from another window, the server doesn't stop.

The root cause of this is that the stop-domain command eventually calls StopServer.doExecute which expects to be able to get a GlassFish object from the ServiceLocator. However, with the Static platform, the GlassFish object isn't put into the ServiceLocator, so the stop-domain command loops forever.

One possible fix for this is to add the following to the GlassFishImpl constructor:

ServiceLocatorUtilities.addOneConstant(habitat, this, null, GlassFish.class);

However, I'm not sure if this is the right place to put it. I wasn't able to determine how the OSGi implementation ends up having the GlassFish object in the ServiceLocator, so this may duplicate that.






[GLASSFISH-20230] 4.0 Deployment Performance - writing out domain.xml twice for one deployment Created: 08/Apr/13  Updated: 15/Apr/13  Resolved: 15/Apr/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b83
Fix Version/s: 4.0_b85

Type: Bug Priority: Critical
Reporter: Hong Zhang Assignee: Tom Mueller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: 4_0-approved, devx_web

 Description   

In GlassFish 4.0, the initial deployment of a simple web application (after a fresh installation, start domain and deploy) triggers the writing out of the domain.xml twice: the profile collected for GlassFish 4.0 have two invocations of DomainXmlPersistence.save (2 invocations) which took about 5.4% of overall deployment time; whereas in the profile collected for GlassFish 3.1.2, there is one invocation of DomainXmlPersistence.save which took about 3.4% of the time.

In GlassFish 4.0, the first (extra) invocation happens in web container initialization:

In appserver/web/jspcaching-connector/src/main/java/org/glassfish/jspcaching/integration/GlassFishTldProvider.java, postConstruct method

WebContainer webContainer = cfg.getExtensionByType(WebContainer.class);

Then this invokes

./nucleus/admin/config-api/src/main/java/com/sun/enterprise/config/modularity/parser/ModuleConfigurationLoader.java, createConfigBeanForType method which triggers the domain.xml writing.

While this is part of the config modularity feature (aka zero config), based on the discussion with Tom, this should not produce a write of the domain.xml (these changes from config modularity should be just put in memory until there is another transaction that actually changes them).

So we should investigate how we could elimiate this extra domain.xml writing.

The second invocation is expected which happens at the end of the deployment to add the application related entries to the domain.xml.

The other related thing I observed for server start up: in GlassFish 4.0, after I start domain with a fresh installation, the domain.xml.bak will be created. Whereas in GlassFish 3.1.2, I don't see domain.xml.bak get created after the domain is started. Tom confirmed he is seeing the same thing and we don't want to write the domain.xml when we start the server. So we should investigate how we could elimiate this domain.xml writing also.



 Comments   
Comment by Masoud Kalali [ 10/Apr/13 ]
  • What is the impact on the customer of the bug? Deployment time is longer than expected.
  • How likely is it that a customer will see the bug and how serious is the bug? Customer would notice the change in application deployment time if they compare the time between 3.1.2 and 4.0.
  • Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)? It is a performance related bug.
  • What CTS failures are caused by this bug? No CTS is failing.
  • What is the cost/risk of fixing the bug? No risk, cost is very low.
  • How risky is the fix? How much work is the fix? Is the fix complicated? No risk and cost is very low, a fix is already devised and can be committed after approval process.
  • Is there an impact on documentation or message strings? No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish? None.
  • Which is the targeted build of 4.0 for this fix? 83
  • If this an integration of a new version of a component from another project, what are the changes that are being brought in? This might be list of Jira issues from that project or a list of revision messages.
Comment by Hong Zhang [ 10/Apr/13 ]

Masoud: thanks for the quick turn around! Will you fix address the initial deployment and also the issue reported for server start up?

Comment by Tom Mueller [ 10/Apr/13 ]

The initial domain.xml.bak file is created the first time the domain is started as a result of the following modifications to the configuration:

  • managed-job-config
  • batch-runtime-configuration
  • jms-service
  • connector-connection-pool
  • connector-resource
  • resource-ref

These configuration modifications cause the domain.xml to written 6 times, once for each transaction.
Since these changes are written to the domain.xml file, these transactions are not repeated the next time the server is started. However, if these 6 writes are avoided, then these 6 transactions will need to be repeated for every server start, so that may have a performance impact.

So the real concern is the writing of the domain.xml during application deployment. These writes are the result of the following modifications to the configuration:

  • cdi-service
  • web-container
  • 29 changes related to deploying the application

So there are actually 3 writes in 4.0 rather than the 1 write in 3.1.2. Eliminating the writes due to the config modularity changes will correct this problem.

However, if the cdi-service and web-container elements are never written to the domain.xml, then those two transactions will need to be repeated each time the server is started which might have a performance impact.

Comment by Tom Mueller [ 15/Apr/13 ]

Fixed in revision 61422.





[GLASSFISH-20160] asadmin get command referring to a default configured item fails Created: 03/Apr/13  Updated: 06/Apr/13  Resolved: 06/Apr/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b82_EE7MS7
Fix Version/s: 4.0_b84_RC1

Type: Bug Priority: Critical
Reporter: Tim Quinn Assignee: Tim Quinn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks GLASSFISH-19943 Audit module (webInvocation callback)... Resolved
Tags: 4_0-approved

 Description   

In 3.1.2.2 one can do this:

adc6140581:3.1.2.2 $ ./glassfish3/glassfish/bin/asadmin get server-config.security-service.audit-module.default.*
server-config.security-service.audit-module.default.classname=com.sun.enterprise.security.Audit
server-config.security-service.audit-module.default.name=default
server-config.security-service.audit-module.default.property.auditOn=false
Command get executed successfully.

In 4.0 this happens:

adc6140581:publish $ ./glassfish4/glassfish/bin/asadmin get server-config.security-service.audit-module.default.*
remote failure: Dotted name path server-config.security-service.audit-module.default.* not found.
Command get failed.

This is causing SQE tests to fail, as reported in GLASSFISH-19943

I am assigning this to Masoud, at least to start with.



 Comments   
Comment by Tim Quinn [ 03/Apr/13 ]

Linking this to the issue SQE filed.

Comment by Tim Quinn [ 03/Apr/13 ]

I meant to point out that in 3.1.2.2 the domain.xml contains an explicit audit-module element - and subelements - for the "default" module.

In 4.0 the SecurityServices config bean provides a default value for getAuditModules() (which returns "default").

Does this need to be addressed by restoring some previously-removed elements?

Comment by Tim Quinn [ 04/Apr/13 ]

Back in 2011 quite a bit of work was done to separate the appserver configuration and classes from the nucleus configuration and classes.

The audit-module section of domain.xml referred to a class that was moving from nucleus into the new appserver server/core-ee module, so the nucleus domain.xml template was revised to remove the audit-module section but that section was never placed into the new appserver-specific domain.xml template. The absence of that section in the appserver domain.xml is at least part of the reason the SQE tests mentioned in GLASSFISH-19943 are failing.

  • What is the impact on the customer of the bug?
    This is a regression.
  • What is the cost/risk of fixing the bug?
    Small - restoring the inadvertently-dropped <audit-module> element to the appserver domain.xml template.
  • Is there an impact on documentation or message strings?
    No
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    The test mentioned in GLASSFISH-19943
  • Which is the targeted build of 4.0 for this fix?
    b84
  • If this an integration of a new version of a component from another project,
    what are the changes that are being brought in? This might be list of
    Jira issues from that project or a list of revision messages.
    N/A
Comment by Tim Quinn [ 04/Apr/13 ]

Fix checked in.

Project: glassfish
Repository: svn
Revision: 61179
Author: tjquinn
Date: 2013-04-04 21:27:30 UTC
Link:

Log Message:
------------
GLASSFISH-20160 - asadmin get command referring to a default configured item fails

Back in 2011 quite a bit of work was done to separate the appserver configuration and classes from the nucleus configuration and classes.

The audit-module section of domain.xml referred to a class that was moving from nucleus into the new appserver server/core-ee module, so the nucleus domain.xml template was revised (one of the changes in svn rev 48070) to remove the audit-module section but that section was never placed into the new appserver-specific domain.xml template which was created a short while later.

This change restores the audit-module section in the server-config and default-config sections.

Reviewed by Tom Mueller
Approved by Michael
Passed QL tests

Revisions:
----------
61179

Modified Paths:
---------------
trunk/main/appserver/admin/template/src/main/resources/config/domain.xml

Comment by Tim Quinn [ 05/Apr/13 ]

The earlier fix to this issue, which added back a removed section of XML, introduced an error in the upgrade logic which is heavily dependent on the order of data in the domain.xml template.

The original change should stand but we now need to correct the upgrade logic to work with the corrected domain.xml template.

  • What is the impact on the customer of the bug?
    The upgrade (via start-domain --upgrade) does not work and leaves a CPU-bound DAS running.
  • What is the cost/risk of fixing the bug?
    The repair to the upgrade logic is relatively minor, updating it so it conforms to what is in the revised template domain.xml.
  • Is there an impact on documentation or message strings?
    No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    The GlassFish admin devtests which include the upgrade test.
  • Which is the targeted build of 4.0 for this fix?
    b84
  • If this an integration of a new version of a component from another project,
    what are the changes that are being brought in? This might be list of
    Jira issues from that project or a list of revision messages.
    N/A
Comment by Tim Quinn [ 06/Apr/13 ]

Fix checked in:

Project: glassfish
Repository: svn
Revision: 61214
Author: tjquinn
Date: 2013-04-05 23:16:32 UTC
Link:

Log Message:
------------
Additional fix for GLASSFISH-20160 - asadmin get command referring to a default configured item fails

An earlier check-in restored a long-ago removed bit of the domain.xml template for the default security audit-module, but that confused the upgrade logic that had been changed when the audit-module had been removed earlier.

This change fixes the upgrade problem.

Approved by Tom
Reviewed by Tom
Passed QL, the upgrade GlassFish admin devtest

Revisions:
----------
61214

Modified Paths:
---------------
trunk/main/nucleus/admin/config-api/src/main/java/org/glassfish/config/support/DefaultConfigUpgrade.java





[GLASSFISH-20133] Server occasionally fails to restart on Windows Created: 02/Apr/13  Updated: 19/Sep/14  Resolved: 17/Apr/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b82_EE7MS7
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Tom Mueller Assignee: Byron Nevins
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 Enterprise


Issue Links:
Duplicate
is duplicated by GLASSFISH-20110 RARE Restart Server|Domain client-sid... Resolved

 Description   

The admin devtests on Windows occasionally become unstable because of tests that are unable to restart a domain.
For example, the restart-domain test case sometimes produces the following output:

restart-domain:
[java] Listening for transport dt_socket at address: 9010
[java] ##### Non-Verbose: Only Failures Are Printed #####
[java] ######### FAILURE #########
[java] Command restart-domain failed.
[java]
[java] Remote server does not listen for requests on [localhost:4848]. Is the server up?
[java] Unable to get remote commands.
[java] Closest matching local command(s):
[java] restart-domain
[java]
[java]
[java] ######### FAILURE #########
[java] Command delete-domain failed.
[java]
[java] A file or folder within domain pwdomain at C:\files\hudson\workspace\admin-devtests-trunk-windows\glassfish4\glassfish\domains\pwdomain is in use. Stop using it before deleting the domain.
[java]

The delete-domain failed because the server was still running.

Between these two tests that failed, there is a stop-domain test which succeeded. The stop-domain probably succeeded because the server was hung, so stop-domain was unable to connect so it thought the domain was down even though it really wasn't down.

This failure then causes more tests to fail in the admin devtests suite.
This failure does not happen on every run.



 Comments   
Comment by Byron Nevins [ 12/Apr/13 ]

This is important enough to keep at P3 but not important enough to fix post HCF for GF4.
It is intermittent and difficult to reproduce.

Eventually I need to take a few days and revamp all of the start/stop commands to all use the same exact way of determining if a server is "alive" or not. We currently have a mix of techniques.

Also – this would be far too risky to fix post HCF...





[GLASSFISH-20131] LDAP-based admin authorization does not work with group names other than asadmin Created: 02/Apr/13  Updated: 02/Apr/13  Resolved: 02/Apr/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Tim Quinn Assignee: Tim Quinn
Resolution: Works as designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If you use the configure-ldap-for-admin command to use LDAP for admin security then authentication works but authorization does not unless the LDAP group you use is "asadmin."



 Comments   
Comment by Tim Quinn [ 02/Apr/13 ]

This problem is a side-effect of the more stringent admin authorization that's now in place. That logic currently detects that an authenticated user is an administrator by checking the Subject for a Principal with name "asadmin." This works fine for the default file-based realm but not for LDAP if the group name that represents GlassFish administrators is some other group.

Comment by Tim Quinn [ 02/Apr/13 ]

Actually the LDAP group name mapping should already be taking care of converting the user-configured group name to asadmin. Still looking. It might be a problem in the set-up of the test LDAP server being used for the test.

Comment by Tim Quinn [ 02/Apr/13 ]

It now looks as if the data in the sample LDAP directory did not add the admin user as a member to the configured group. GlassFish searches for the already-authenticated user by asking the group for the unique member with the uid of the user. In this case because the group was there but had no members, the LDAP query returned no results so the Subject in GlassFish did not have a Principal for the administrator group, so that user was denied access to admin functions.

I am closing this because the code seems to be working as designed.





[GLASSFISH-20127] copy-config usage is not clear Created: 02/Apr/13  Updated: 19/Sep/14

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b82_EE7MS7
Fix Version/s: 4.1

Type: Bug Priority: Major
Reporter: Anissa Lam Assignee: Bhakti Mehta
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Usage for copy-config :

Usage: asadmin [asadmin-utility-options] copy-config
[--systemproperties <systemproperties>]
[?|-help[=<help(default:false)>]] configs ...

Its not clear what configs .... mean.

man page synopsis is clear.

SYNOPSIS
copy-config [--help]
[--systemproperties (name=value)[:name=value]*]
source-configuration-name destination-configuration-name



 Comments   
Comment by Tom Mueller [ 02/Apr/13 ]

The "configs ..." part of the usage message is what is automatically generated for any operand that takes multiple values. To provide a clearer usage message will require providing a custom usagetext value in the LocalStrings.properties file.

Too late for 4.0 - targeting for 4.0.1.





[GLASSFISH-20125] configure-ldap-for-admin command does not work Created: 01/Apr/13  Updated: 02/Apr/13  Resolved: 02/Apr/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0
Fix Version/s: 4.0_b83

Type: Bug Priority: Major
Reporter: Tim Quinn Assignee: Tim Quinn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The configure-ldap-for-admin command reports success but further attempts to log-in as an administrator do not work.



 Comments   
Comment by Tim Quinn [ 01/Apr/13 ]

The new security configuration (the security-services section in domain.xml) is involved in authentication and authorization decisions, as well as the older config for the admin file realm.

The configure-ldap-for-admin command alters the older configuration according to the user's command-line arguments but was never changed to update the newer configuration.

Comment by Tim Quinn [ 02/Apr/13 ]

Fix checked in:

Project: glassfish
Repository: svn
Revision: 61080
Author: tjquinn
Date: 2013-04-02 00:06:17 UTC
Link:

Log Message:
------------
Fix for GLASSFISH-20125 - configure-ldap-for-admin command does not work

The configure-ldap-for-admin command was never updated to reflect the new security configuration added to domain.xml. As a result the LDAP login module was never used during authentication, even after the command was run.

These changes to the command make the additional alterations in the new security configuration so that the LDAP login module is used correctly.

Note that some classes were moved from the security/core module to security/services so that the command logic (formerly in security/core) could work with the newer config classes (in security/services).

Tests: QL, manual tests with Ramesh's LDAP server (thanks, Ramesh)

Revisions:
----------
61080

Modified Paths:
---------------
trunk/main/nucleus/security/core/src/main/java/com/sun/enterprise/security/cli/LocalStrings.properties
trunk/main/nucleus/security/services/src/main/java/org/glassfish/security/services/provider/authorization/SimpleAuthorizationProviderImpl.java

Added Paths:
------------
trunk/main/nucleus/security/services/src/main/resources
trunk/main/nucleus/security/services/src/main/resources/org/glassfish/security
trunk/main/nucleus/security/services/src/main/java/org/glassfish/security/services/commands/LDAPAdminAccessConfigurator.java
trunk/main/nucleus/security/services/src/main/java/org/glassfish/security/services/impl/LDAPLoginModule.java
trunk/main/nucleus/security/services/src/main/resources/org
trunk/main/nucleus/security/services/src/main/resources/org/glassfish
trunk/main/nucleus/security/services/src/main/resources/org/glassfish/security/services/commands/LocalStrings.properties
trunk/main/nucleus/security/services/src/main/resources/org/glassfish/security/services/commands
trunk/main/nucleus/security/services/src/main/resources/org/glassfish/security/services





[GLASSFISH-20110] RARE Restart Server|Domain client-side reporting failures - RACE condition Created: 30/Mar/13  Updated: 26/Apr/13  Resolved: 26/Apr/13

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b82_EE7MS7
Fix Version/s: 4.0_b86_RC2

Type: Bug Priority: Critical
Reporter: Sanjeeb Sahoo Assignee: Byron Nevins
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Dependency
blocks GLASSFISH-20362 Clean up Deprecated Code Closed
Duplicate
duplicates GLASSFISH-20133 Server occasionally fails to restart ... Resolved
is duplicated by GLASSFISH-20415 [Regression] asadmin restart-domain c... Resolved
Related
is related to GLASSFISH-19672 Race Condition when stopping server c... Resolved
is related to GLASSFISH-17116 list-instances lets asadmin timeout w... Resolved
Tags: 4_0-approved

 Description   

There are numerous intermittent failures seen in various hudson jobs and all indicate that server is shutting down for no apparent reason mentioned in the log file. It needs to be investigated ASAP. The latest such falure is seen in [1].

[1] http://gf-hudson.us.oracle.com/hudson/job/gf-trunk-build-continuous/13961



 Comments   
Comment by Tom Mueller [ 17/Apr/13 ]

This issue might be related to GLASSFISH-20133 (these might be duplicates).

Comment by Tom Mueller [ 17/Apr/13 ]

Byron, please evaluate whether this is a duplicate of GLASSFISH-20133.

Comment by Byron Nevins [ 17/Apr/13 ]

The root problem is known and scheduled for fixing in 4.0.1

It's unlikely to bite a user.

zThe problem is that we use 2 different ways to verify if a server is officially RUNNING or STOPPED.
That causes tight timing problems when Hudson is hammering commands one after the next.

Comment by Byron Nevins [ 17/Apr/13 ]

duplicate of 20133

Comment by Sanjeeb Sahoo [ 17/Apr/13 ]

There are two reasons for reopening this bug, viz:

a) This bug was filed earlier than GLASSFISH-20133, so if at all these two are same issues, close GLASSFISH-20133 as a duplicate.

b) I don't exactly understand why this is not a priority. We have seen this bug outside hudson environment as well and on multiple platforms. e.g., I have seen it my linux development environment. Bill Shannon has seen this in his Solaris environment. In both cases, the bug was seen while running QuickLook test suite.

Comment by Byron Nevins [ 17/Apr/13 ]

What is it blocking? Lowering to P2...

Comment by Byron Nevins [ 17/Apr/13 ]

This issue is bereft of detail.

E.g. I was told separately that QL fails on both Linux and Solaris:

I don't have any feel for your QL failures. Everytime? Intermittent? Occasional? Rare?

Comment by Byron Nevins [ 17/Apr/13 ]

I dropped everything in order to work on this as of right now...

Comment by Sanjeeb Sahoo [ 17/Apr/13 ]

Changing the synopsys back to describe the problem more accurately.

Comment by Byron Nevins [ 17/Apr/13 ]

copy of my email to Shreedhar:

=================

Here is what PROBABLY happens:

We use several different ways to see if a server is running.
1. Look for a pid file if we're running locally
2. run a remote command like "uptime". If we get a response, server is running
3. I forget – there might be a third.

You can see we can get timing problems. The pid file may get generated a millisecond BEFORE Grizzly is all set up. Or vice-versa.

The solution is to use the exact same criteria to establish RUNNING versus STOPPED for all commands.

Which is quite difficult and risky to get just right.

Comment by Byron Nevins [ 17/Apr/13 ]

I've run QL a dozen times in a row. No failures.

I'm going to have to get invasive (in the source code) to force this error...

Comment by Byron Nevins [ 17/Apr/13 ]

To be fixed for 4.0.1
Priority remains at P2

Comment by Sanjeeb Sahoo [ 17/Apr/13 ]

I don't understand the timing aspect. What we see from logs (which is still available in the referenced hudson job) is that server shutsdown automatically. Can you exqlain when that can haqqen (read q as the char before it as my key board is malfucntioning)? I can't recollect to have come across this kind of situation before. So, surely something in 4.0 is triggering this behavior.

Comment by Sanjeeb Sahoo [ 17/Apr/13 ]

I feel we should not defer this bug without understanding the root cause.

Comment by Byron Nevins [ 17/Apr/13 ]

I don't see any evidence of the server shutting down "automatically".
Where? Please paste it in here...

Comment by Byron Nevins [ 17/Apr/13 ]

Here are the CLI commands from that run:

98 03/29/2013 21:34:46 EXIT: 0 asadmin start-domain domain1
99 03/29/2013 21:34:52 EXIT: 0 asadmin create-jvm-options -Djava.security.manager
100 03/29/2013 21:34:54 EXIT: 0 asadmin stop-domain
101 03/29/2013 21:35:02 EXIT: 0 asadmin start-domain domain1
102 03/29/2013 21:45:14 EXIT: 1 nadmin --host localhost --port 4848 --secure=false --terse=false --echo=false --interactive=false start-domain --verbose=false --watchd og=false --debug=false --domaindir /scratch/java_re/BUILD_AREA/workspace/gf-trunk-build-continuous/gfv3-wp/glassfish4/glassfish/domains domain1
103 03/29/2013 21:45:23 EXIT: 1 asadmin restart-domain domain1
04 03/29/2013 21:50:31 EXIT: 0 asadmin deploy --upload ../../dist/basicweb/hellojsp.war
===============

which was triggered by these commands:
1. start-domain
2. create-jvm-options
3. stop-domain
4. start-domain
5. restart-domain

    • fails. Waits 10 minutes because it *INCORRECTLY* thinks the server did not restart. But it *did* restart based on the next cli commands
      6. deploy – which can't possibly succeed if the server is not running.
Comment by Sanjeeb Sahoo [ 18/Apr/13 ]

Byron,

Let me try to answer why I said the server was shutting down automatically." I was definitely influenced by the following comment made by Tom on 21 March over email while responding to some hudson job failure messages:

We've been seeing occasional failures of other test suites (GF admin devtests, nucleus admin devtests) in which there seems to be this behavior too, where it looks like the server just dies.

I will let Tom explain what made him come to this conclusion.

When I had seen QL failing in my local environment once (unfortunately I don't have the logs available to look at now - ask Bill if he has it), it was to do with the cluster test. The nature of failure made me come to similar conclusion as Tom.

You may be spot on with your analysis that server is not really crashing or automatically shutting down. Rather, it's just that asadmin client is failing to correctly detect that it's started. If that's the case, it is definitely as severe a problem as we initially thought and you can update the synopsys and priority. If we don't want to fix it now, I am hoping we can fix our tests to be more resilient.

Finally, do we know why we have started to see this behavior (failing to detect server has started correctly) only recently? I can't recollect to have seen such issue before. What change has trigged this issue?

Thanks,
Sahoo

Comment by Byron Nevins [ 18/Apr/13 ]

It's quite rare. But definitely there. The last time the continuous build had it was 45 runs ago:

http://gf-hudson.us.oracle.com/hudson/job/gf-trunk-build-continuous/14089/

So the first big job is to make it reproducible

Comment by Amy Roh [ 18/Apr/13 ]

This issue is causing multiple failures in web devtests. Web devtests perform many start/stop for functionality testings that require server restart and failing to do so is affecting test results.

stopDomain:
[echo] run.xml:stopping domain...
[exec] CLI306: Warning - The server located at /Users/aroh/glassfish/v3-8-2/all/main/appserver/distributions/glassfish/target/glassfish4/glassfish/domains/domain1 is not running.
[exec] Command stop-domain executed successfully.

setOSConditions:

setToolWin:

setToolUnix:

setToolProperty:

setS1ASclassPath:

init-common:

startDomainUnix:
[echo] Starting DAS
[exec] There is a process already using the admin port 4848 – it probably is another instance of a GlassFish server.
[exec] Command start-domain failed.
[exec] Result: 1
[echo] run.xml:doing wait for localhost:8080...
[echo] run.xml:DONE doing wait for localhost:8080...

In order to reproduce, run "ant all" from $APS_HOME/devtests/web.

Comment by Byron Nevins [ 18/Apr/13 ]

This hypothesis was super-easy to test. It is not the problem:

"server may be starting too fast to detect"

Comment by Byron Nevins [ 19/Apr/13 ]

There is no known way to reproduce the problem which makes it difficult to prove that it is fixed.

I've fixed it.

we were using several different techniques simultaneously to see if the server was restarted.

Namely:
(1) compare timestamp of the local password file
(2) compare the "uptime" of the old server versus the uptime of the new server

I.e. we were using quite indirect methods.

I changed it to use something that is guaranteed to work. Here is the new algorithm for restart-domain (local)

1. get the PID of the running server (might be "-1" if the server isn't running)
2. tell the server to restart itself
3. In a loop – try fetching the PID. Once it changes – we are done, the server has restarted.

I've submitted the changes to Tom for review...

Comment by Byron Nevins [ 19/Apr/13 ]

In summary, when this intermittent bug appears the client running restart-domain will not recognize that the server (domain or instance) restarted correctly. After 10 minutes it times out. The server is running. It's a false negative.

The impact on the customer is annoyance. The major impact is in automated tests.
It is unlikely that the customer will bump into this issue. He would have to do a start/stop/restart in fast succession.
It is not a serious bug because it is just the client reporting incorrect results. The server-side is working fine.
OTOH - it depends on one's opinion of what's serious. It gives the user a bad impression of the product if he sees it.
The cost to fix it is minimal, in fact it is already fixed and waiting to go in. If it doesn't go into 4.0 it'll go into 4.0.1

The bug appears rarely in Quick Look tests. Currently in about 1 out of 50 Hudson runs of the continuous dev builds.

Not only is the fix not complicated - it is the other way 'round. The existing code is overly complex. The fixed code is much much simpler.

There is little risk. Automated tests, including QuickLook test this area all the time.

No doc impact.

QA need only run their usual standard tests start/stop/restart
This is a core lifecycle fix.

Comment by Tom Mueller [ 19/Apr/13 ]

Approved for 4.0. I've updated the fix version.

Comment by Byron Nevins [ 20/Apr/13 ]

Sending admin/server-mgmt/src/main/java/com/sun/enterprise/admin/servermgmt/cli/LocalServerCommand.java
Sending admin/server-mgmt/src/main/java/com/sun/enterprise/admin/servermgmt/cli/RestartDomainCommand.java
Sending cluster/cli/src/main/java/com/sun/enterprise/admin/cli/cluster/RestartLocalInstanceCommand.java
Transmitting file data ...
Committed revision 61575.

Comment by Byron Nevins [ 26/Apr/13 ]

Does not handle the case where restart-domain is run by asadmin (local command) but does NOT use the local password for authentication.

Namely restart-domain -P 4848 -H whatever

Comment by Byron Nevins [ 26/Apr/13 ]

Oops. reopened wrong issue. I should have reopened the issue this is a duplicate of!

Comment by Byron Nevins [ 26/Apr/13 ]

Sorry I got confused with a raft of similar issues.

Comment by Byron Nevins [ 26/Apr/13 ]

Sending server-mgmt/src/main/java/com/sun/enterprise/admin/servermgmt/cli/LocalServerCommand.java
Sending server-mgmt/src/main/java/com/sun/enterprise/admin/servermgmt/cli/RestartDomainCommand.java
Sending server-mgmt/src/main/java/com/sun/enterprise/admin/servermgmt/cli/StopDomainCommand.java
Transmitting file data ...
Committed revision 61693.





[GLASSFISH-20071] Asadmin command for listing the versions of all components Created: 27/Mar/13  Updated: 28/Jun/13

Status: Open
Project: glassfish
Component/s: admin
Affects Version/s: 4.0_b81
Fix Version/s: future release

Type: New Feature Priority: Major
Reporter: myfear Assignee: Romain Grécourt
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: Fishcat

 Description   

It would be great to have something like:

Asadmin --versions

Which lists all the versions of the bundled components (e.g jersey, eclipselink)

That would make testing a lot easier...



 Comments   
Comment by Tom Mueller [ 27/Mar/13 ]

Some commands that are related to this:

pkg list

This lists the versions of all of the GlassFish packages. However, this shows the GlassFish version number, not necessarily the version number of the embedded component.

asadmin osgi lb

This lists a version for each OSGi bundle (JAR) in the system.





[GLASSFISH-20056] Failed to load admin console, when restarting the server from windows services. Created: 26/Mar/13  Updated: 27/Mar/13  Resolved: 27/Mar/13

Status: Resolved
Project: glassfish
Component/s: admin, deployment, installation
Affects Version/s: 4.0_b81
Fix Version/s: 4.0_b83

Type: Bug Priority: Critical
Reporter: Mohamed Taman Assignee: Hong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 SP1
glassfish-4.0-b81-windows-ml


Issue Links:
Related
is related to GLASSFISH-20074 severe message about not cleaning thr... Open
Tags: fishcat, install

 Description   

Failed to load admin console, when restarting the server from windows services.

1- Go to windows services.
2- Select "domain1 GlassFish Server" service.
3- From left click --> Start.
4- Open Admin console at "http://localhost:4848/".

The GlassFish Server Administration Console appears with the following message:

Welcome to GlassFish Server Open Source Edition 4.0 (build 81).

Status: The Admin Console Application is not yet installed.

If the browser does not refresh the page automatically please reload the page.

and in the server.log the following errors thrown:

.............
[2013-03-26T15:05:44.565+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364303144565] [levelValue: 800] [[
  Grizzly Framework 2.3 started in: 2ms - bound to [/0.0.0.0:3,700]]]

[2013-03-26T15:05:44.590+0200] [glassfish 4.0] [INFO] [] [org.glassfish.ha.store.spi.BackingStoreFactoryRegistry] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364303144590] [levelValue: 800] [[
  Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry]]

[2013-03-26T15:05:44.621+0200] [glassfish 4.0] [INFO] [] [] [tid: _ThreadID=1 _ThreadName=Thread-3] [timeMillis: 1364303144621] [levelValue: 800] [[
  ** GlassFishBatchExecutorServiceProvider.postConstruct() called]]

[2013-03-26T15:05:44.671+0200] [glassfish 4.0] [INFO] [NCLS-CORE-00015] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364303144671] [levelValue: 800] [[
  Shutdown requested
MultiException stack 1 of 2
java.lang.NullPointerException
	at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:206)
	at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:282)
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:329)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
	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:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.v3.server.ApplicationLoaderService
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:347)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
	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:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
]]

[2013-03-26T15:05:44.672+0200] [glassfish 4.0] [SEVERE] [NCLS-CORE-00016] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364303144672] [levelValue: 1000] [[
  Startup service failed to start
MultiException stack 1 of 2
java.lang.NullPointerException
	at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:206)
	at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:282)
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:329)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
	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:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.v3.server.ApplicationLoaderService
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:347)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
	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:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
]]

[2013-03-26T15:05:44.716+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=56 _ThreadName=Thread-6] [timeMillis: 1364303144716] [levelValue: 800] [[
  Server shutdown initiated]]

[2013-03-26T15:05:44.761+0200] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00027] [javax.enterprise.bootstrap] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364303144761] [levelValue: 800] [[
  Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@3f7b7a85 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@61dce8cd.]]

[2013-03-26T15:05:45.022+0200] [glassfish 4.0] [INFO] [] [org.glassfish.jersey.server.ApplicationHandler] [tid: _ThreadID=57 _ThreadName=pool-10-thread-1] [timeMillis: 1364303145022] [levelValue: 800] [[
  Initiating Jersey application, version Jersey: 2.0-m13-2 2013-03-12 11:01:14...]]

[2013-03-26T15:05:45.718+0200] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00028] [javax.enterprise.bootstrap] [tid: _ThreadID=56 _ThreadName=Thread-6] [timeMillis: 1364303145718] [levelValue: 800] [[
  Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@3f7b7a85 from service registry.]]


 Comments   
Comment by Mohamed Taman [ 26/Mar/13 ]

Even command line interface doesn't run, and start-domain takes a very long time to run and just show me long dots ............ as the following:

C:\glassfish4\bin>asadmin
Use "exit" to exit and "help" for online help.
asadmin> start-domain
Waiting for domain1 to start ..........................................................................................................
.......................................................................................................................................
.......................................................................................................................................
..........................................................

I have terminated "asadmin" run with "Ctrl + C", then tried to restart the service and it gives me the following error:

Error 1067: The process terminated unexpectedly

The solution is to re-install the app server.

Comment by Tom Mueller [ 26/Mar/13 ]

Hong, can you please look at the ApplicationLoaderService to see why it is getting an NPE there?

Comment by Hong Zhang [ 26/Mar/13 ]

Mohamed: can you please provide the exact steps to reproduce this, such as how you installed GlassFish as a windows service? Did you perform other steps before you try to access console after start the server? I am not familiar with Windows and I could not reproduce this on other platform (Linux).

Comment by Hong Zhang [ 26/Mar/13 ]

Tried this on a windows 7 box and could not reproduce this there either. This is what I did:

1. Installed glassfish-4.0-b81-windows-ml.exe on windows 7 box.
2. Do asadmin create-service to make the GlassFish a service.
3. Use the windows services manager to start the GlassFish service.
4. Access the admin console, the console loads up as expected and no exception in the server.log.

If you could reproduce this consistently, please send the exact steps to reproduce (starting from the installation).

Comment by Jeremy_Lv [ 27/Mar/13 ]

I have tried the latest version and glassfish-4.0-b81-windows-ml.exe both in the platform of windows xp and win7 but the console loads up as expected without any error exception...

Comment by Mohamed Taman [ 27/Mar/13 ]

I have realized where is the problem, if you go normally there is no problem as you have said before, but to reproduce the case follow the following steps:

1- From Glassfish home, run as admin start-domain.
2- Open web admin console.
3- Choose the domain, then check the option of "Load console after DAS startup", then click save.
6- Restart the service, and open the admin console you will get the described error.

{quote]
"Status: The Admin Console Application is not yet installed."

and log file reports:

[2013-03-27T13:01:58.842+0200] [glassfish 4.0] [INFO] [NCLS-CORE-00015] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364382118842] [levelValue: 800] [[
  Shutdown requested
MultiException stack 1 of 2
java.lang.NullPointerException
	at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:206)
	at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:282)
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:329)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
	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:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.v3.server.ApplicationLoaderService
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:347)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
	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:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
]]

[2013-03-27T13:01:58.843+0200] [glassfish 4.0] [SEVERE] [NCLS-CORE-00016] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364382118843] [levelValue: 1000] [[
  Startup service failed to start
MultiException stack 1 of 2
java.lang.NullPointerException
	at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:206)
	at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:282)
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:329)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
	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:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.v3.server.ApplicationLoaderService
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:347)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
	at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$DefaultActivator.activate(RunLevelControllerImpl.java:359)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.activateRunLevel(RunLevelControllerImpl.java:778)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.upActiveRecorder(RunLevelControllerImpl.java:734)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$Worker.run(RunLevelControllerImpl.java:629)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl$SyncProceedToWorker.proceedTo(RunLevelControllerImpl.java:896)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:559)
	at org.glassfish.hk2.runlevel.utilities.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:339)
	at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:483)
	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:280)
	at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:179)
	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:170)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
	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:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
]]

[2013-03-27T13:01:58.881+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=56 _ThreadName=Thread-6] [timeMillis: 1364382118881] [levelValue: 800] [[
  Server shutdown initiated]]

[2013-03-27T13:01:58.926+0200] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00027] [javax.enterprise.bootstrap] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1364382118926] [levelValue: 800] [[
  Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@3e77576b as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@75ee618.]]

[2013-03-27T13:01:59.233+0200] [glassfish 4.0] [INFO] [] [org.glassfish.jersey.server.ApplicationHandler] [tid: _ThreadID=57 _ThreadName=pool-10-thread-1] [timeMillis: 1364382119233] [levelValue: 800] [[
  Initiating Jersey application, version Jersey: 2.0-m13-2 2013-03-12 11:01:14...]]

[2013-03-27T13:01:59.883+0200] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00028] [javax.enterprise.bootstrap] [tid: _ThreadID=56 _ThreadName=Thread-6] [timeMillis: 1364382119883] [levelValue: 800] [[
  Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@3e77576b from service registry.]]

[2013-03-27T13:02:13.152+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=71 _ThreadName=pool-15-thread-1] [timeMillis: 1364382133152] [levelValue: 800] [[
  Grizzly Framework 2.3 started in: 5ms - bound to [/0.0.0.0:2,020]]]

[2013-03-27T13:02:13.164+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=71 _ThreadName=pool-15-thread-1] [timeMillis: 1364382133164] [levelValue: 800] [[
  Grizzly Framework 2.3 started in: 3ms - bound to [/0.0.0.0:8,181]]]

[2013-03-27T13:02:13.386+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=88 _ThreadName=Thread-10] [timeMillis: 1364382133386] [levelValue: 800] [[
  Problem while attempting to install admin console!
MultiException stack 1 of 2
java.lang.NullPointerException
	at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:206)
	at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:282)
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:329)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
	at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:573)
	at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:560)
	at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201)
	at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98)
MultiException stack 2 of 2
java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.v3.server.ApplicationLoaderService
	at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:347)
	at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
	at org.glassfish.hk2.runlevel.internal.RunLevelContext.findOrCreate(RunLevelContext.java:107)
	at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2203)
	at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:573)
	at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:560)
	at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201)
	at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98)
]]

[2013-03-27T13:02:16.926+0200] [glassfish 4.0] [INFO] [] [org.glassfish.jersey.server.ApplicationHandler] [tid: _ThreadID=43 _ThreadName=admin-listener(3)] [timeMillis: 1364382136926] [levelValue: 800] [[
  Initiating Jersey application, version Jersey: 2.0-m13-2 2013-03-12 11:01:14...]]

[2013-03-27T13:02:17.308+0200] [glassfish 4.0] [INFO] [NCLS-REST-00001] [javax.enterprise.admin.rest] [tid: _ThreadID=43 _ThreadName=admin-listener(3)] [timeMillis: 1364382137308] [levelValue: 800] [[
  Listening to REST requests at context: /management/domain.]]
Comment by Jeremy_Lv [ 27/Mar/13 ]

Mohamed:
I will try your steps to reproduce it...

Thanks.

Comment by Jeremy_Lv [ 27/Mar/13 ]

Yes, It can be reproduced as the later steps you have list.

Comment by Jeremy_Lv [ 27/Mar/13 ]

Here's more information about this failure:
When the domain is stopped after enable "Load console after DAS startup", it will cause the following SEVERE:

[2013-03-27T20:46:29.589+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName=Thread-25] [timeMillis: 1364384789589] [levelValue: 1000] [[
  The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]]

[2013-03-27T20:46:29.590+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName=Thread-25] [timeMillis: 1364384789590] [levelValue: 1000] [[
  The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]]

[2013-03-27T20:46:29.591+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName=Thread-25] [timeMillis: 1364384789591] [levelValue: 1000] [[
  The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]]

[2013-03-27T20:46:29.592+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=135 _ThreadName=Thread-25] [timeMillis: 1364384789592] [levelValue: 1000] [[
  The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@136a4ce]) and a value of type [org.glassfish.admingui.theme.AdminguiThemeContext] (value [org.glassfish.admingui.theme.AdminguiThemeContext@7dd207]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.]]
Comment by Jeremy_Lv [ 27/Mar/13 ]

I have try to change the code as follows:

===================================================================
--- ApplicationLoaderService.java	(revision 60917)
+++ ApplicationLoaderService.java	(working copy)
@@ -187,6 +187,12 @@
         systemApplications = domain.getSystemApplications();
         for (Application systemApp : systemApplications.getApplications()) {
           appOrderInfoMap.put(systemApp, new Integer(appOrder++));
+          if (Boolean.valueOf(systemApp.getDeployProperties().getProperty
+                  (ServerTags.LOAD_SYSTEM_APP_ON_STARTUP))) {
+                  if (deployment.isAppEnabled(systemApp) || loadAppOnDAS(systemApp.getName())) {
+                    DeploymentOrder.addApplicationDeployment(new ApplicationOrderInfo(systemApp, appOrderInfoMap.get(systemApp).intValue()));
+                  }
+              }
         }
         List<Application> standaloneAdapters =
             applications.getApplicationsWithSnifferType(ServerTags.CONNECTOR, true);
@@ -197,16 +203,6 @@
         for (Application app : allApplications) {
           appOrderInfoMap.put(app, new Integer(appOrder++));
         }
-        
-        for (Application systemApp : systemApplications.getApplications()) {
-            // check to see if we need to load up this system application
-            if (Boolean.valueOf(systemApp.getDeployProperties().getProperty
-                (ServerTags.LOAD_SYSTEM_APP_ON_STARTUP))) {
-                if (deployment.isAppEnabled(systemApp) || loadAppOnDAS(systemApp.getName())) {
-                  DeploymentOrder.addApplicationDeployment(new ApplicationOrderInfo(systemApp, appOrderInfoMap.get(systemApp).intValue()));
-                }
-            }
-        }

After doing this, the domain can be start successfully, but some of the severe messages related to the web comes out as :

[2013-03-27T20:54:36.910+0900] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=88 _ThreadName=Thread-13] [timeMillis: 1364385276910] [levelValue: 900] [[
  java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server
java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server
	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2069)
	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
	at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
	at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
	at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
	at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
	at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:401)
	at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201)
	at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98)
]]

[2013-03-27T20:54:36.911+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=88 _ThreadName=Thread-13] [timeMillis: 1364385276911] [levelValue: 1000] [[
  Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server
	at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
	at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
	at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
	at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
	at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:401)
	at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201)
	at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98)
]]

[2013-03-27T20:54:36.912+0900] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=88 _ThreadName=Thread-13] [timeMillis: 1364385276912] [levelValue: 1000] [[
  Exception during lifecycle processing
java.lang.Exception: java.lang.Exception: Virtual server __asadmin already has a web module __admingui loaded at / therefore web module __admingui cannot be loaded at this context path on this virtual server
	at com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)
	at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
	at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
	at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
	at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:401)
	at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:201)
	at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:98)
]]

[2013-03-27T20:54:36.912+0900] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=88 _ThreadName=Thread-13] [timeMillis: 1364385276912] [levelValue: 1000] [[
  Exception while loading the app]]

[2013-03-27T20:54:36.991+0900] [glassfish 4.0] [SEVERE] [NCLS-CORE-00041] [javax.enterprise.system.core] [tid: _ThreadID=88 _ThreadName=Thread-13] [timeMillis: 1364385276991] [levelValue: 1000] [[
  Application deployment failed: Exception while loading the app]]
Comment by Hong Zhang [ 27/Mar/13 ]

Mohamed: thanks for the detailed steps and now I could reproduce it also on my linux box.

Jeremy: thanks for the investigation on this, it was very helpful! There does seem to be strange timing issue here associated with the NPE. I tried to get the order information out of the map as a separate step before constructing the ApplicationOrderInfo and that made the NPE disappear also so I made that change. I also saw the already loaded exception afterwards. It seems the InstallerThread (which is to load the console application in normal case) tried to load it again in this case, I added a check there to not load it again if it's already loaded.

I saw the same severe