I have a virtual machine with Centos7 in virtual box. I have installed there glassfish 5.0 from here: Full platform - glassfish 5.0. I simply unzipped the folder in /opt. I'm using "host-only".
The following is my java version:
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
I have enabled secure admin with the following command:
asadmin --host localhost --port 4848 enable-secure-admin
I go in vm shell and digit "ifconfig" to know the ip.
Then, I go in power shell (win + x) of my windows host and type, to connect via ssh:
ssh user#x.x.x.x
Then:
cd /opt/glassfish5/bin
./asadmin start-domain domain1
Then I come back to my host, I open google chrome and:
http://x.x.x.x:8080 seems fine
http://x.x.x.x:4848 forces to https and then the browser tells me it's impossible to reach the website
I have tried to uninstall secure-admin (at least before glassfish gave me the exception which said that secure-admin was needed for DAS or anything like that):
./asadmin --host localhost --port 4848 disable-secure-admin
but I get the following exception:
NCLS-ADMIN-00010
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Command disable-secure-admin failed.
I get the following exception in my log after calling admin console:
[2018-05-16T16:35:59.644+0200] [glassfish 5.0] [WARNING] [] [org.glassfish.grizzly.filterchain.DefaultFilterChain] [tid: _ThreadID=42 _ThreadName=admin-listener(3)] [timeMillis: 1526481359644] [levelValue: 900] [[
GRIZZLY0013: Exception during FilterChain execution
java.lang.NoClassDefFoundError: sun/security/ssl/SupportedEllipticCurvesExtension
at sun.security.ssl.HelloExtensions.<init>(HelloExtensions.java:82)
at sun.security.ssl.HandshakeMessage$ClientHello.<init>(HandshakeMessage.java:362)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:223)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:984)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:924)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:921)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1379)
at org.glassfish.grizzly.ssl.SSLUtils.executeDelegatedTask(SSLUtils.java:274)
at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:708)
at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:622)
at org.glassfish.grizzly.ssl.SSLBaseFilter.handleRead(SSLBaseFilter.java:334)
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: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)
]]
The answer is your version of Java is too new for GlassFish. I already answered this here: https://stackoverflow.com/a/49998266/212224
To stop the java.lang.NoClassDefFoundError you need to use a version of Java no higher than 8u151
This is due to a change in internal JDK classes which Grizzly uses for
HTTP/2.
GlassFish 5.0 does not have the latest version of Grizzly which is
compatible with the latest Java 8 updates. If you are using GlassFish
5.0 and see these errors, you have 2 choices:
Downgrade Java to 8u152 or earlier
Download the latest GlassFish 5.0.1 nightly, where this should be fixed
Ref:
https://github.com/javaee/glassfish/issues/22436#issuecomment-374829430
Related
I'm using Selenium for testing from Java code, it's started automatically with maven, when I run mvn verify it uses gecko-driver to start new firefox instance for selenium:
final FirefoxOptions opts = new FirefoxOptions();
if (HEADLESS_MODE) {
opts.addArguments(ARG_HEADLESS);
}
return new FirefoxDriver(opts);
It's working fine on my machine (and on machines of other developers) in both modes "headless" and normal. Now I'm trying to run Selenium tests with CI builds in Alpine Linux Docker container. When I tried to run it as-is, I've got an error:
mozrunner::runner INFO Running command: "/usr/bin/firefox"
"-marionette" "--headless" "-foreground" "-no-remote"
"-profile" "/tmp/rust_mozprofile.pW1sbkcv98QN"
Error: GDK_BACKEND does not match available displays.
Then I installed all suggested tools (dbus and xvfb) from this post and started it before running tests:
apk add xvfb dbus
dbus-uuidgen > /etc/machine-id
export DISPLAY=:99
Xvfb $DISPLAY -ac &
mvn verify
but now Selenium tests are hadning for about 10 seconds and failing with error
1565433736375 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.1ZMsJ0Hy95V0"
1565433738424 Marionette INFO Listening on port 2828
!!! [Child][MessageChannel] Error: (msgtype=0x3E0003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv
[Child 2191] ###!!! ABORT: Aborting on channel error.: file /home/buildozer/aports/community/firefox-esr/src/firefox-52.8.1esr/ipc/glue/MessageChannel.cpp, line 2152
[Child 2191] ###!!! ABORT: Aborting on channel error.: file /home/buildozer/aports/community/firefox-esr/src/firefox-52.8.1esr/ipc/glue/MessageChannel.cpp, line 2152
!!! [Child][MessageChannel] Error: (msgtype=0x3E0003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv
It seems I'm doing something wrong here, what is the correct way to run headless Selenium tests in Alpine Linux Docker container? I'd prefer to configure existing Docker image instead of using Selenium images, because the migration will be expensive.
Update:
Selenium version is 3.141.59
Gecko-driver version is v0.24.0-linux64
Firefox-ESR version is: 52.8.1-r0
Update2:
xvfb, dbus and exported DISPLAY are not actually needed to run Firefox in headless mode - just run firefox --headless and it's all.
As per Mozilla --headless flag is not supported in Firefox 52-esr.Headless flag was introduced in version 55 (for Linux) and 56 (Mac/Windows) . Please try on latest Firefox ESR release.
This is what im trying to do:
I have an glassfish installation on my raspberry pi 3 which i want to use as a remote domain with netbeans.
I know that i need the DAS for this.
When i try to enter the admin console over the webbrowser via xxx.xxx.xxx.xxx:4848 and enter my credentials in the console im getting this error:
admin console error
Now i have read that i need to enable the secure admin in order to access the console with a remote host with the following commands:
start-domain
enable-secure-admin
<< enter username and password >>
stop-domain
start-domain
After that i cant reach the admin console anymore and im getting the following error:
error after changing secure admin
EDIT:
In the server.log im getting this error:
[2017-03-09T00:18:13.870+0100] [glassfish 5.0] [WARNING] [] [org.glassfish.grizzly.filterchain.DefaultFilterChain] [tid: _ThreadID=46 _ThreadName=admin-listener(1)] [timeMillis: 1489015093870] [levelValue: 900] [[
GRIZZLY0013: Exception during FilterChain execution
java.lang.NullPointerException
at org.glassfish.grizzly.portunif.BackChannelFilter.handleWrite(BackChannelFilter.java:111)
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.DefaultFilterChain.write(DefaultFilterChain.java:397)
at org.glassfish.grizzly.http2.Http2ConnectionOutputSink.writeDownStream(Http2ConnectionOutputSink.java:144)
at org.glassfish.grizzly.http2.Http2ConnectionOutputSink.writeDataDownStream(Http2ConnectionOutputSink.java:200)
at org.glassfish.grizzly.http2.DefaultOutputSink.flushToConnectionOutputSink(DefaultOutputSink.java:609)
at org.glassfish.grizzly.http2.DefaultOutputSink.writeEmptyFin(DefaultOutputSink.java:675)
at org.glassfish.grizzly.http2.DefaultOutputSink.close(DefaultOutputSink.java:627)
at org.glassfish.grizzly.http2.Http2Stream.onProcessingComplete(Http2Stream.java:466)
at org.glassfish.grizzly.http2.Http2ServerFilter.handleEvent(Http2ServerFilter.java:569)
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:952)
at org.glassfish.grizzly.filterchain.FilterChainContext.notifyDownstream(FilterChainContext.java:934)
at org.glassfish.grizzly.http.io.OutputBuffer.endRequest(OutputBuffer.java:397)
at org.glassfish.grizzly.http.server.Response.finish(Response.java:516)
at org.glassfish.grizzly.http.server.HttpServerFilter.afterService(HttpServerFilter.java:384)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:290)
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.filterchain.FilterChainContext$1.run(FilterChainContext.java:202)
at org.glassfish.grizzly.filterchain.FilterChainContext.resume(FilterChainContext.java:226)
at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:242)
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(Unknown Source)
]]
So after a few more hours of trying around, i managed to find the solution for my problem.
The newest version of glassfish (v 5.0 nightly) is bugged. An older version of glassfish (v 4.1.2) is working perfectly fine.
I am using Linux Mint 17.3 . i want to configure JBOSS server in my system. whenever i command sh.standalone.sh it is showing following screen but doesnot starting server.
indra#Jarvis ~/jboss-as-7.1.1.Final/bin $ sh standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/indra/jboss-as-7.1.1.Final
JAVA: /usr/lib/jvm/java-8-oracle/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
=========================================================================
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
09:45:02,152 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
09:45:02,517 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
09:45:02,629 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
^C09:47:05,537 INFO [org.jboss.as] JBAS015950: JBoss AS 7.1.1.Final "Brontes" stopped in 1ms
i wait for 15 min but it is not starting .
please someone guide me.
JBoss AS 7.1.1.Final does not work with Java 8, https://developer.jboss.org/message/926279#926279. You consider migrating to WildFly 10 as it requires Java 8.
I am trying to configure a slave for my jenkins Master. I did the below steps.
enabled passwordless auth to remote host(GNU LINUX)
Configured the slave on master
I can see the slave.jar being copied to remote host folder. But it is failing with the below error
Expanded the channel window size to 4MB
[11/07/14 19:11:54] [SSH] Starting slave process: cd "/test/app/abc/slavetest" && /usr/java /jdk1.6.0_29 -XX:MaxPermSize=2048m -Xmx2048m -jar slave.jar
bash: /usr/java/jdk1.6.0_29: is a directory
hudson.util.IOException2: Slave JVM has terminated. Exit code=126
at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:953)
at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:133)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:711)
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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)
Caused by: java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:200)
at hudson.remoting.Channel.<init>(Channel.java:419)
at hudson.remoting.Channel.<init>(Channel.java:398)
at hudson.remoting.Channel.<init>(Channel.java:394)
at hudson.remoting.Channel.<init>(Channel.java:383)
at hudson.remoting.Channel.<init>(Channel.java:375)
at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:344)
at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:945)
... 7 more
[11/07/14 19:11:54] Launch failed - cleaning up connection
[11/07/14 19:11:54] [SSH] Connection closed.
Any idea what I am doing wrong?
You have your slave's path to the java executable misconfigured:
/usr/java /jdk1.6.0_29 -XX:MaxPermSize=2048m -Xmx2048m -jar slave.jar
The blank space should be removed, and the full path should be
/usr/java/jdk1.6.0_29/bin/java
I just ran into this as well. Best to check the docker container/slave's java path by logging into the container and running whereis java.
The java path of the host and agent are probably not the same. And that jar and the java command is being executed from within the agent.
I updated to 3.1.2-23 today and now the thing won't start. It's a brand new install and 3.1.1 worked fine. I have uninstalled 3.1.2 and re-installed 3.1.1 from the distribution exe, and it works again. I made no other changes. I'm stumped. Anyway, here's the error after typing asadmin start-domain domain1. Any ideas?
Launching GlassFish on Felix platform
Waiting for domain1 to start ..[#|2012-03-07T18:00:52.189-0600|INFO|glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=main;|Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2 (build 23)|#]
[#|2012-03-07T18:00:52.588-0600|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=32;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.46 started in: 11ms - bound to [0.0.0.0:7676]|#]
[#|2012-03-07T18:00:52.588-0600|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=25;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.46 started in: 38ms - bound to [0.0.0.0:8181]|#]
[#|2012-03-07T18:00:52.588-0600|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=29;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.46 started in: 20ms - bound to [0.0.0.0:3700]|#]
[#|2012-03-07T18:00:52.588-0600|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.46 started in: 57ms - bound to [0.0.0.0:8080]|#]
[#|2012-03-07T18:00:52.588-0600|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=24;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.46 started in: 31ms - bound to [0.0.0.0:4848]|#]
.[#|2012-03-07T18:00:52.736-0600|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=1;_ThreadName=main;|The Admin Console is already installed, but not yet loaded.|#]
[#|2012-03-07T18:00:52.765-0600|INFO|glassfish3.1.2|org.hibernate.validator.util.Version|_ThreadID=1;_ThreadName=main;|Hibernate Validator 4.2.0.Final|#]
[#|2012-03-07T18:00:52.949-0600|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|Startup service failed to start : com.sun.enterprise.security.admin.cli.SecureAdminStartupCheck|#]
[#|2012-03-07T18:00:52.976-0600|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=36;_ThreadName=Thread-21;|Server shutdown initiated|#]
[#|2012-03-07T18:00:52.976-0600|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=36;_ThreadName=Thread-21;|Already stopped, so just returning|#]
Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "Grizzly-kernel-thread(1)"
Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "Grizzly-kernel-thread(1)"
Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "Grizzly-kernel-thread(1)"
.Error starting domain domain1.
The server exited prematurely with exit code 0.
Have you tried?
./asadmin start-domain --upgrade
When that is done you should be able to start and stop your server the usual way.
Sometimes it even doesn't work after ./asadmin start-domain --upgrade.
If you still get the "Startup service failed to start : com.sun.enterprise.security.admin.cli.SecureAdminStartupCheck" after the command above, try following:
Create new domain with ./asadmin create-domain domain2
Backup your cacerts.jks and keystore.jks in domain1
Copy cacerts.jks and keystore.jks from new domain2 into domain1
Start domain1 ./asadmin start-domain domain1
Enjoy!
Then you can revert your backupped cacerts.jks and keystore.jks back. Domain will work.