chewpoclypse
chewpoclypse

Reputation: 530

Glassfish 4 - cannot log into Administration Console

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.

Admin Web page

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.

Upvotes: 2

Views: 2922

Answers (1)

Ernestas Gruodis
Ernestas Gruodis

Reputation: 8787

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 :)

Upvotes: 1

Related Questions