Search code examples
glassfishglassfish-3

Glassfish, JDBC Connection pool advanced tab throwing error


On some of our servers, we are getting errors when trying to access the advanced tab on the connection pools page in Glassfish (3.1.2 (build 23))

type Exception report

message
descriptionThe server encountered an internal error () that prevented it from 
fulfilling this request.

exception
java.lang.IllegalStateException: PWC3991: getOutputStream() has already been called for 
this response note The full stack traces of the exception and its root causes are 
available in the GlassFish Server Open Source Edition 3.1.2 logs.

We are also getting errors on the SSL tab of the http-listeners in default or server config

class java.lang.RuntimeException

Not sure if they are related or 2 seperate problems

I did a search using the error number in the first problem and the only thing I found was a guy that was updating from glassfish 2 to glassfish 3 and some jvm property wasn't migrated automatically. We aren't doing any upgrades, so I didn't think it was that, but I added it anyway and it didn't make a difference.

The other strange thing is that we have other servers that have no problems. They are basically the same setup, the only difference that I can see is that it works on the servers that are multi-server setups, and don't work on the servers where we have everything on one box (and just to clarify in both scenarios, glassfish only exists on one box, it is only that in the multi server setup, the DB, and services are on different machines from the glassfish)

I have tried copying the domain.xml from a working server and it doesn't make any difference. The only changes were:

Not working version

<protocol name="http-listener-1">
   <http timeout-seconds="250" default-virtual-server="server" max-connections="10000" 
    <compressable-mime-type="text/html,text/xml,text/plain,application/json">
    file-cache enabled="true"></file-cache>
   </http>
   <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="">    
   </ssl>
</protocol>

working version

<protocol name="http-listener-1">
  <http timeout-seconds="250" default-virtual-server="server" max-connections="10000" 
     compressable-mime-type="text/html,text/xml,text/plain,application/json">
     <file-cache enabled="true"></file-cache>
  </http>
</protocol>

and

not working

<secure-admin enabled="true" special-admin-indicator="aaaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaa">
<secure-admin-principal dn="CN=<hostname>,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>
<secure-admin-principal dn="CN=<hostname>-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>

<secure-admin enabled="true" special-admin-indicator="aaaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaa">
secure-admin-principal dn="CN=<other_host>,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>
<secure-admin-principal dn="CN=<other-host>-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>

I can't see any other changes between the two domain.xmls, and changing one to the other made no difference. There doesn't appear to be anything in the log files, so I am unsure where to continue looking, or what kind of things I should be looking for.


Solution

  • Looks like the problem was caused by an install script (that we wrote) not cleaning up an existing installation. The problem only occurred when we were trying to install a newer version of glassfish on top of an existing one. Our install script didn't delete the old glassfish directories before installing the new package, which was what was causing the issue