This will probably get flagged as a duplicate of this, but it hasn't yet been answered and I don't have enough rep to ask them if they have found a solution.
So I have Glassfish4 setup on a Raspi on my LAN. I can see port 8080 just fine. However, when I go to the Admin port I see this.
So I need to enable Secure Admin. Everything goes smooth until restart-domain.
pi#raspberrypi:/home/downloads/glassfish4/glassfish/bin $ sudo ./asadmin change-admin-password
Enter admin user name [default: admin]>admin
Enter the admin password>
Enter the new admin password>
Enter the new admin password again>
Command change-admin-password executed successfully.
pi#raspberrypi:/home/downloads/glassfish4/glassfish/bin $ sudo ./asadmin enable-secure-admin
Enter admin user name> admin
Enter admin password for user "admin">
You must restart all running servers for the change in secure admin to take effect.
Command enable-secure-admin executed successfully.
pi#raspberrypi:/home/downloads/glassfish4/glassfish/bin $ sudo ./asadmin restart-domain
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
NCLS-ADMIN-00010
...
After that I cannot even check the Admin Log-in screen. So I check the logs and here is what is happening.
[2016-06-30T13:34:57.035-0500] [glassfish 4.0] [WARNING] [] [org.glassfish.grizzly.filterchain.DefaultFilterChain] [tid: _ThreadID=33 _ThreadName=admin-listener(3)] [timeMillis: 1467311697035] [levelValue: 900] [[
Exception during FilterChain execution
java.lang.RuntimeException: Could not generate dummy secret
at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1429)
at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:535)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:813)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.glassfish.grizzly.ssl.SSLConnectionContext.unwrap(SSLConnectionContext.java:172)
at org.glassfish.grizzly.ssl.SSLUtils.handshakeUnwrap(SSLUtils.java:268)
at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:596)
at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:545)
at org.glassfish.grizzly.ssl.SSLBaseFilter.handleRead(SSLBaseFilter.java:266)
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:745)
Caused by: java.lang.RuntimeException: Could not generate dummy secret
at sun.security.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:152)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:246)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:919)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:916)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1369)
at org.glassfish.grizzly.ssl.SSLUtils.executeDelegatedTask(SSLUtils.java:252)
at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:631)
... 23 more
Caused by: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/ECB/PKCS1Padding
at javax.crypto.Cipher.getInstance(Cipher.java:540)
at sun.security.ssl.JsseJce.getCipher(JsseJce.java:229)
at sun.security.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:116)
... 31 more
]]
I going out on a limb and thinking it has to do with security-keys, but the constant looping of message in the shell makes me think otherwise.
Thanks for any help. I can provide more things if you think it will help.
I had the same problem after clean install of glassfish-5.0-web-b16-07_30_2017 on Solaris 11.3 with JDK 1.8.0_60-b27. Was trying to update Solaris 11.3 jdk-8 package, but the answer from Oracle repository was "no updates available". But I knew that there was newer version of JDK. So after downloading the file jdk-8u144-solaris-x64.tar.gz and installing it everythig started to work :)
Related
I've configured a Glassfish 5.0 instance with an AJP connector that would work as load balancer even though at the moment I have only one glassfish.
In domain.xml I have the followin:
<http-service>
<access-log></access-log>
<virtual-server network-listeners="http-listener-1,http-listener-2,jk-connector" id="server"></virtual-server>
<virtual-server network-listeners="admin-listener" id="__asadmin"></virtual-server>
</http-service>
where jk-connector is the one I use from the load balancer.
<network-config>
...
<protocols>
<protocol name="jk-connector">
<http default-virtual-server="server">
<file-cache></file-cache>
</http>
</protocol>
</protocols>
</network-config>
then there is the listener
<network-listeners>
<network-listener protocol="jk-connector" jk-enabled="true" port="8009" name="jk-connector" thread-pool="http-thread-pool" transport="tcp"></network-listener>
</network-listeners>
My Apache http.conf is as follows:
LoadModule headers_module modules/mod_headers.so
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
<IfModule mod_rewrite.c>
Options +Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteMap uc int:toupper
#rewrite per compatibilita' con vecchie URL dei servizi
RewriteRule ^/services/(.)(.*)$ /api/${uc:$1}$2Services?%{QUERY_STRING} [PT]
#RewriteRule ^/services/(.)(.*)$ http://%{HTTP_HOST}/api/${uc:$1}$2Services?%{QUERY_STRING} [R=301,L]
#solo nel caso di un GET
RewriteCond %{REQUEST_METHOD} GET
ReWriteRule ^(.*)/login.jsf;jsessionid=[A-Za-z0-9\.]+(.*)$ $1/login.jsf$2 [L,R=301]
</IfModule>
The exception is:
GRIZZLY0013: Exception during FilterChain execution
java.lang.NullPointerException
at org.glassfish.grizzly.http.ajp.AjpHandlerFilter.encodeHttpPacket(AjpHandlerFilter.java:282)
at org.glassfish.grizzly.http.ajp.AjpHandlerFilter.handleWrite(AjpHandlerFilter.java:245)
at org.glassfish.grizzly.filterchain.ExecutorResolver$8.execute(ExecutorResolver.java:111)
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.write(FilterChainContext.java:890)
at org.glassfish.grizzly.filterchain.FilterChainContext.write(FilterChainContext.java:858)
at org.glassfish.grizzly.http.io.OutputBuffer.flushBuffer(OutputBuffer.java:1092)
at org.glassfish.grizzly.http.io.OutputBuffer.flushBinaryBuffers(OutputBuffer.java:1066)
at org.glassfish.grizzly.http.io.OutputBuffer.flushAllBuffers(OutputBuffer.java:1036)
at org.glassfish.grizzly.http.io.OutputBuffer.close(OutputBuffer.java:754)
at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:244)
at org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:179)
at java.nio.channels.Channels$WritableByteChannelImpl.implCloseChannel(Channels.java:469)
at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:365)
at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:178)
at org.primefaces.application.resource.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:87)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:667)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1580)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:338)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:652)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:591)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:371)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:238)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:463)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:168)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:242)
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:539)
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:593)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
at java.lang.Thread.run(Thread.java:748)
Using JDK 1.8.0_131, Glassfish 5.0, Apache 2.4.2
Seems like you are facing this Glassfish bug (and this one).
You can try the latest Glassfish 5 build which is available here: http://download.oracle.com/glassfish/5.0.1/nightly
Unfortunately it looks like there is currently no solution besides manually fixing the grizzly JAR file.
You can try the following:
Download the grizzly 2.4 sources (https://github.com/javaee/grizzly/archive/2.4.x.zip) and extract them
Open the project grizzly-http-ajp and build it, if the build fails due to missing dependencies, change the project version to 2.4.3 in pom.xml
If it compiles without problems, open the class AjpHandlerFilter
Do the following change near line 276 so the code looks like this:
if (contentBuffer.hasRemaining()) {
return AjpMessageUtils.appendContentAndTrim(memoryManager,
encodedBuffer, contentBuffer);
} else if (encodedBuffer == null) {
encodedBuffer = Buffers.EMPTY_BUFFER;
}
Save and compile the project
Go to /grizzly-2.4.x/modules/http-ajp/target/classes/org/glassfish/grizzly/http/ajp/ and copy the the generated .class file for AjpHandlerFilter
Update the AjpHandlerFilter.class in the glassfish-grizzly-extras-all.jar (inside glassfish/glassfish/modules) of your Glassfish installation. You can do this with jar uf ${jar-file} ${class-file}. You need to make sure that the path is correct and you that you replace the old .class file in the JAR
Alternativly you can try to find the sources of the project glassfish-grizzly-extras-all, fix the problem there and build a new glassfish-grizzly-extras-all.jar.
I'm working on a web project with Java EE, and it works smooth on my computer, but when I export into a war and upload it into the server I'm receiving the following error:
[2017-02-01T23:29:09.439+0100] [Payara 4.1] [INFO] [] [] [tid: _ThreadID=40 _ThreadName=admin-thread-pool(1)] [timeMillis: 1485988149439] [levelValue: 800] [[
================== availabilityEnabled skipped]]
[2017-02-01T23:31:07.548+0100] [Payara 4.1] [INFO] [NCLS-REST-00003] [javax.enterprise.admin.rest] [tid: _ThreadID=5211 _ThreadName=admin-thread-pool(143)] [timeMillis: 1485988267548] [levelValue: 800] [[
An error occurred while processing the request. Please see the server logs for details.
org.glassfish.jersey.server.ContainerException: java.lang.OutOfMemoryError: GC overhead limit exceeded
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer$ResponseWriter.rethrow(GrizzlyHttpContainer.java:324)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer$ResponseWriter.failure(GrizzlyHttpContainer.java:306)
at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:509)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:334)
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:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
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:466)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:169)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
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:526)
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:593)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
]]
[2017-02-01T23:31:08.403+0100] [Payara 4.1] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=38 _ThreadName=deployment-jar-scanner] [timeMillis: 1485988268403] [levelValue: 1000] [[
Exception while visiting org/eclipse/persistence/internal/jpa/querydef/CriteriaQueryImpl.class of size 21034
java.lang.OutOfMemoryError: GC overhead limit exceeded
]]
In my computer, it works without any problem, with a stable memory usage around 450,000Kb - the jvm allowed memory in the server is 512Mb, is there a problem in the server or could be something in my code? as I can only see references to glassfish and sun libraries.
When you receive an OutOfMemoryError, the stacktrace is not relevant at all. The code in the stacktrace just requires allocation of additional memory, but the memory can be consumed by objects created somewhere else.
Investigate which objects consume the memory, for example using a profiler, VisualGC or analyze the heap dump. In particular, seek for classes defined in your application, which have an unusually high number of instances in memory.
Also, think what might be different between the 2 environments. Is it possible that the application reads data from DB during deployment, and the data in DBs differ?
The usage of 450MB on your local computer is quite close to the limit of 512MB - it is possible that the server consumes more memory than your local server, because of the different server configuration. Compare how much memory is consumed by the server and your local server before you try deploying the application.
I am using GlassFish (GlassFish 4) an application server for my JAVA Enterprise application.
Sometimes,i need to restart it, usually when the fames error appeared:
Could not find sub module [MyApp_webapp.war] as defined in
application.xml
To resolve this error, i try to delete the cache of the Ear from the folder application located in the domaine folder of Glassfish. To delete the folder,i need to stop the server before.
Of course, a stopping of the server will not let the other application running! and this is not good especially when those application are in use!
I tried to create two different domain:
domain1 and domain2 with the following properties:
domain1: Glassfish Admin console url= localhost:4848 and
<network-listeners>
<network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
<network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
<network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>
domain2: url= localhost:4242 and
<network-listeners>
<network-listener port="8081" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
<network-listener port="8182" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
<network-listener port="4242" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>
Then i tried to deploy two EARs : app1.ear on domain1 and app2.ear on domain2.
the first app1.ear can be launched on localhost:8080/app1-web
the second one app2.ear cannot be launched on localhost:8081/app2-web and i got this error on log file:
[2016-01-27T18:09:44.956+0100] [glassfish 4.1] [SEVERE] [AS-WEB-CORE-00037] [javax.enterprise.web.core] [tid: _ThreadID=123 _ThreadName=http-listener-1(5)]
[timeMillis: 1453914584956] [levelValue: 1000] [[
An exception or error occurred in the container during the request processing
java.lang.ClassCastException: org.glassfish.grizzly.config.ContextRootInfo cannot be cast to org.apache.catalina.Context
at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:597)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:353)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
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.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)
]]
Am i missing something to configure on My different domains?
Thanks a lot
I think the solution is undeploy your ear archive. check this: https://docs.oracle.com/cd/E18930_01/html/821-2432/geyvr.html
It's for glassfish 3.1 but i think it's the same for GF4
I have some problems with my GF4 and SSL.
I have installed GF4 and made every change listed at this tutorial
Everything went fine but now that I want to use the GF Server online and on an pruductiv enviroment, I want to change the SSL Cert to a bought one. I already bought a SSL123 Thawte SSL Cert which is just Domain signed (should be enough for starters). Now I have the .key the .csr and .crt file.
I already looked up, how to import a given Key and CRT File into an existing Keystore. (using openssl and producing and p12 file)
Now if I just stop the GF domain and erase the two alias "s1as" and "glassfish-instance" and import the new SSL Cert under this alias, I cannot start the domain again. I get the following two errors in the server.log:
[2014-05-28T14:33:55.105+0200] [glassfish 4.0] [WARNING] [] [org.glassfish.grizzly.config.SSLConfigurator] [tid: _ThreadID=28 _ThreadName=http-listener-2(4)] [timeMillis: 1401280435105] [levelValue: 900] [[
GRIZZLY0050: SSL support could not be configured!
java.io.IOException: A MultiException has 2 exceptions. They are:
1. java.lang.Error: java.security.UnrecoverableKeyException: Cannot recover key
2. java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.security.ssl.SSLUtils
at org.glassfish.grizzly.config.ssl.JSSE14SocketFactory.init(JSSE14SocketFactory.java:162)
at org.glassfish.grizzly.config.SSLConfigurator.initializeSSLContext(SSLConfigurator.java:249)
at org.glassfish.grizzly.config.SSLConfigurator.configureSSL(SSLConfigurator.java:131)
at org.glassfish.grizzly.config.SSLConfigurator$InternalSSLContextConfigurator.createSSLContext(SSLConfigurator.java:389)
at org.glassfish.grizzly.ssl.SSLEngineConfigurator.createSSLEngine(SSLEngineConfigurator.java:180)
at org.glassfish.grizzly.ssl.SSLBaseFilter$SSLTransportFilterWrapper.handleRead(SSLBaseFilter.java:968)
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:745)
]]
[2014-05-28T14:33:55.124+0200] [glassfish 4.0] [WARNING] [] [org.glassfish.grizzly.filterchain.DefaultFilterChain] [tid: _ThreadID=28 _ThreadName=http-listener-2(4)] [timeMillis: 1401280435124] [levelValue: 900] [[
Exception during FilterChain execution
java.lang.NullPointerException
at org.glassfish.grizzly.ssl.SSLEngineConfigurator.createSSLEngine(SSLEngineConfigurator.java:185)
at org.glassfish.grizzly.ssl.SSLBaseFilter$SSLTransportFilterWrapper.handleRead(SSLBaseFilter.java:968)
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:745)
]]
I already have tried other configurations, changed the Cert Password, changed the master-Password but I cannot get this to work...
I hope someone can give me the right way to look at.
Thanks
Edit 1:
I used the SSL Cert on my Apache2.2. Everything works nice there.
This is most likely a password issue. In a staging environment you can try to set all passwords (including master password for the server) to be the same. Note that this is a bad idea in a production environment! You can also try vm options to specify different passwords to be used for the key.
I'm having problems with Glassfish 4.0 + Netbeans 7.4...
whenever i try to run my project i get this erros:
ant -f D:\\Projetos\\NetBeans\\Sullimar -Dbrowser.context=D:\\Projetos\\NetBeans\\Sullimar\\web\\index.html -DforceRedeploy=false -Dclient.urlPart=/index.html -Ddirectory.deployment.supported=true -Dnb.wait.for.caches=true -Dnb.internal.action.name=run.single run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
In-place deployment at D:\Projetos\NetBeans\Sullimar\build\web
GlassFish Server, deploy, null, false
D:\Projetos\NetBeans\Sullimar\nbproject\build-impl.xml:1045: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 0 seconds)
and my glassfish server output:
Informations: visiting unvisited references
Informations: Created HTTP listener http-listener-1 on host/port 0.0.0.0:2869
Informations: Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
Informatios: Created HTTP listener admin-listener on host/port 0.0.0.0:4848
Grave: Cannot start container web, exception: A MultiException has 2 exceptions. They are:
1. java.lang.IllegalArgumentException: virtual server server has an invalid docroot C:\Users\ThaĆs\GlassFish_Server\glassfish\domains\domain1/docroot
2. java.lang.IllegalStateException: Unable to perform operation: post construct on com.sun.enterprise.web.WebContainer
Grave: Aborting, Failed to start container com.sun.enterprise.web.WebContainer
Grave: Exception while deploying the app [Sullimar]
Grave: Exception during lifecycle processing
java.lang.Exception: Aborting, Failed to start container com.sun.enterprise.web.WebContainer
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:736)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:374)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
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 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.StaticHttpHandler.service(StaticHttpHandler.java:297)
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:744)
Grave: Exception while deploying the app [Sullimar] : Aborting, Failed to start container com.sun.enterprise.web.WebContainer
What do I do to fix these errors? In my Services tab I can access my databases, and my dabatase connection to my Sullimar database works fine (I can view the data...) so I can't underastand the problem.
Thanks a million!
the error is easy, you need delete in WEB-INF/web.xml
Take a look at your server.log file.
It's located under /$YouGlassfishRoot/glassfish/domains/$Domain/logs/server.log
The problem is probably your server's jdk version.
Got the S.O.B to work. Turns out Windows firewall was blocking Netbeans (as it should), which for whatever reason requires incoming connections for deployment.
Try create a rule allowing inbound TCP for C:\program files\netbeans 8.0\bin\netbeans64.exe
I had similar problem on Windows 7, for you it's to late, but it could help somebody else. First there was no server.log file in GLASSFISH_INSTALATION_DIRECTORY\glassfish\domains\domain1\logs and the reason was that my user didn't have rights to write anywhere in GLASSFISH_INSTALATION_DIRECTORY (glassfish was installed with netbeans )
after fixing that I found "...Invalid resource : jdbc/..." exception and fix for that can be found at this webpage https://netbeans.org/kb/docs/web/jsf20-crud.html under Troubleshooting paragraph