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.
Related
I try to use dependency-check-maven in every test build job in Jenkins:
mvn org.owasp:dependency-check-maven:6.2.2:aggregate -DskipSystemScope=true -Dformat=ALL -DprettyPrint=true -DcentralAnalyzerEnabled=false -DassemblyAnalyzerEnabled=false -DyarnAuditAnalyzerEnabled=false -DbundleAuditAnalyzerEnabled=false -DversionCheckEnabled=true
Unfortunately I have a problem with few projects and Node Audit Analyzer, which checks package-lock.json files.
During running Maven's plugin there's a warning in log:
[WARNING] An error occurred while analyzing '/var/lib/jenkins/workspace/testbuild/project/module-web/src/main/resources/dev/package-lock.json' (Node Audit Analyzer).
which cause final error:
[ERROR] Failed to execute goal org.owasp:dependency-check-maven:6.2.2:aggregate (default-cli) on project project: One or more exceptions occurred during dependency-check analysis: One or more exceptions occurred during analysis:
[ERROR] AnalysisException: Failed to read results from the NPM Audit API (NodeAuditAnalyzer); the analyzer is being disabled and may result in false negatives.
[ERROR] caused by SocketException: Connection reset
[ERROR] AnalysisException: Failed to read results from the NPM Audit API (NodeAuditAnalyzer); the analyzer is being disabled and may result in false negatives.
[ERROR] caused by IOException: Error writing to server
In most problematic projects there's only one error: SocketException: Connection reset OR IOException: Error writing to server, but sometimes there are both of them in the same build log.
To use this plugin I added parameter -DnodeAuditAnalyzerEnabled=false but it's not a solution I want to accept.
I tried to execute Maven in debug mode. Here's a stacktrace with mentioned error:
[DEBUG] Error reading dependency or connecting to NPM Audit API
java.io.IOException: Error writing to server
at sun.net.www.protocol.http.HttpURLConnection.writeRequests (HttpURLConnection.java:699)
at sun.net.www.protocol.http.HttpURLConnection.writeRequests (HttpURLConnection.java:711)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0 (HttpURLConnection.java:1585)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1492)
at java.net.HttpURLConnection.getResponseCode (HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode (HttpsURLConnectionImpl.java:347)
at org.owasp.dependencycheck.data.nodeaudit.NodeAuditSearch.submitPackage (NodeAuditSearch.java:176)
at org.owasp.dependencycheck.data.nodeaudit.NodeAuditSearch.submitPackage (NodeAuditSearch.java:133)
at org.owasp.dependencycheck.analyzer.NodeAuditAnalyzer.analyzePackage (NodeAuditAnalyzer.java:188)
at org.owasp.dependencycheck.analyzer.NodeAuditAnalyzer.analyzeDependency (NodeAuditAnalyzer.java:145)
at org.owasp.dependencycheck.analyzer.AbstractAnalyzer.analyze (AbstractAnalyzer.java:131)
at org.owasp.dependencycheck.AnalysisTask.call (AnalysisTask.java:88)
at org.owasp.dependencycheck.AnalysisTask.call (AnalysisTask.java:37)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
at java.lang.Thread.run (Thread.java:748)
[WARNING] An error occurred while analyzing '/var/lib/jenkins/workspace/testbuild/project/module-web/src/main/resources/dev/package-lock.json' (Node Audit Analyzer).
[DEBUG]
org.owasp.dependencycheck.analyzer.exception.AnalysisException: Failed to read results from the NPM Audit API (NodeAuditAnalyzer); the analyzer is being disabled and may result in false negatives.
at org.owasp.dependencycheck.analyzer.NodeAuditAnalyzer.analyzePackage (NodeAuditAnalyzer.java:197)
at org.owasp.dependencycheck.analyzer.NodeAuditAnalyzer.analyzeDependency (NodeAuditAnalyzer.java:145)
at org.owasp.dependencycheck.analyzer.AbstractAnalyzer.analyze (AbstractAnalyzer.java:131)
at org.owasp.dependencycheck.AnalysisTask.call (AnalysisTask.java:88)
at org.owasp.dependencycheck.AnalysisTask.call (AnalysisTask.java:37)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
at java.lang.Thread.run (Thread.java:748)
Caused by: java.io.IOException: Error writing to server
at sun.net.www.protocol.http.HttpURLConnection.writeRequests (HttpURLConnection.java:699)
at sun.net.www.protocol.http.HttpURLConnection.writeRequests (HttpURLConnection.java:711)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0 (HttpURLConnection.java:1585)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1492)
at java.net.HttpURLConnection.getResponseCode (HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode (HttpsURLConnectionImpl.java:347)
at org.owasp.dependencycheck.data.nodeaudit.NodeAuditSearch.submitPackage (NodeAuditSearch.java:176)
at org.owasp.dependencycheck.data.nodeaudit.NodeAuditSearch.submitPackage (NodeAuditSearch.java:133)
at org.owasp.dependencycheck.analyzer.NodeAuditAnalyzer.analyzePackage (NodeAuditAnalyzer.java:188)
at org.owasp.dependencycheck.analyzer.NodeAuditAnalyzer.analyzeDependency (NodeAuditAnalyzer.java:145)
at org.owasp.dependencycheck.analyzer.AbstractAnalyzer.analyze (AbstractAnalyzer.java:131)
at org.owasp.dependencycheck.AnalysisTask.call (AnalysisTask.java:88)
at org.owasp.dependencycheck.AnalysisTask.call (AnalysisTask.java:37)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
at java.lang.Thread.run (Thread.java:748)
[INFO] Finished Node Audit Analyzer (31 seconds)
In the same log in debug mode I found URL used by the anylyzer - https://registry.npmjs.org/-/npm/v1/security/audits Maybe this service has some limits?
I would be grateful for any help.
I was getting a similar error:
NodeAuditAnalyzer failed on ...\package-lock.json
An error occurred while analyzing '...\package-lock.json' (Node Audit Analyzer).
Deleting package-lock.json and the node_modules directory then running npm install to recreate fixed the issue.
An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate. Original error spawn ENOTDIR
I am trying to start an android app using Appium Desktop app. Appium server shows the following error log;
Starting '/home/santoshpc/Android/Sdk/build-tools/28.0.3/apksigner'
with args
'["sign","--key","/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8","--cert","/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem","/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk"]'
[ADB] Got an error during apksigner execution: Command
'/home/santoshpc/Android/Sdk/build-tools/28.0.3/apksigner sign --key
/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8
--cert /tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem
/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
exited with code 1 [ADB] apksigner stderr: Exception in thread "main"
java.nio.file.FileSystemException:
/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk:
Read-only file system [ADB] at
sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
[ADB] at
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
[ADB] at
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
[ADB] at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:447) [ADB]
at
sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
[ADB] at java.nio.file.Files.move(Files.java:1395) [ADB] at
com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:342) [ADB]
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89)
[ADB] [ADB] Cannot use apksigner tool for signing. Defaulting to
sign.jar. Original error: Command
'/home/santoshpc/Android/Sdk/build-tools/28.0.3/apksigner sign --key
/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.pk8
--cert /tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/keys/testkey.x509.pem
/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
exited with code 1; StdErr: Exception in thread "main"
java.nio.file.FileSystemException:
/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk:
Read-only file system [ADB] at
sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
[ADB] at
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
[ADB] at
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
[ADB] at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:447) [ADB]
at
sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
[ADB] at java.nio.file.Files.move(Files.java:1395) [ADB] at
com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:342) [ADB]
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89)
[ADB] [ADB] Resigning apk. [UiAutomator2] Deleting UiAutomator2
session [UiAutomator2] Deleting UiAutomator2 server session [WD Proxy]
Matched '/' to command name 'deleteSession' [UiAutomator2] Did not get
confirmation UiAutomator2 deleteSession worked; Error was:
UnknownError: An unknown server-side error occurred while processing
the command. Original error: Trying to proxy a session command without
session id [ADB] Running
'/home/santoshpc/Android/Sdk/platform-tools/adb -P 5037 -s
0123456789ABCDEF shell am force-stop eu.niko.smart.naswi.main'
[Logcat] Stopping logcat capture [ADB] Removing forwarded port socket
connection: 8200 [ADB] Running
'/home/santoshpc/Android/Sdk/platform-tools/adb -P 5037 -s
0123456789ABCDEF forward --remove tcp:8200' [UiAutomator2] Unable to
remove port forward 'Error executing adbExec. Original error: 'Command
'/home/santoshpc/Android/Sdk/platform-tools/adb -P 5037 -s
0123456789ABCDEF forward --remove tcp:8200' exited with code 1';
Stderr: 'error: listener 'tcp:8200' not found'; Code: '1''
[BaseDriver] Event 'newSessionStarted' logged at 1552282079530
(11:12:59 GMT+0545 (+0545)) [MJSONWP] Encountered internal error
running command: Error: Could not sign with default certificate.
Original error spawn ENOTDIR [MJSONWP] at
ADB.apkSigningMethods.signWithDefaultCert
(/tmp/.mount_AppiumGDrtg1/resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/apk-signing.js:124:13)
[HTTP] <-- POST /wd/hub/session 500 9847 ms - 206 [HTTP] [HTTP] -->
DELETE /wd/hub/session [HTTP] {} [HTTP] No route found. Setting
content type to 'text/plain' [HTTP] <-- DELETE /wd/hub/session 404 5
ms - 57
I have added following DesiredCapabilities
{
"noReset": true,
"automationName": "uiautomator2",
"appPackage": "myapp package name",
"appActivity": "my app activity name",
"deviceName": "My device",
"platformName": "android"
}
Appium Desktop version: 1.11.1
OS - ubuntu
For me what worked is going to Appium Desktop configurations and changing the JAVA_HOME from
/usr/java/bin
to
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
This is a bug in the "apk-signing.js" file residing in location /usr/lib/node_modules/appium/node_modules/appium-adb/build/lib/tools.
Possible Solutions:
It can be permission issue. The appium is executed without root
privilege so it cannot make the changes to the apk. Executing appium
with root/admin privilege solves the problem. (works only if
apk-signing.js is bug free)
It's working fine for specific appium's versions as they don't have
bug free apk-signing.js like appium version 1.7.2.
This is final solution if above 2 will not work. You have to modify the file apk-signing.js
./node-v6.11.4-linux-armv7l/lib/node_modules/appium/node_modules/appium-adb/build/lib/tools/apk-signing.js
so it would return a true even if it looks not signed. Edit file as mentioned below.
287 case 20:
288 context$1$0.prev = 20;
289 context$1$0.t0 = context$1$0’catch’;
290
291 _loggerJs2[‘default’].debug(“App not signed with debug cert.”);
292 return context$1$0.abrupt(‘return’, true);
Please check this link for editing the file and for more details.
https://discuss.appium.io/t/appium-1-7-1-canot-singin-appium-uiautomator2-server-debug-androidtest-apk/19233/4
Hope it will help.
redissonClient.getNodesGroup().pingAll()
Returning true but still getting the exception ->
[10-09-2018 21:00:05.337] [redisson-netty-2-6]
[ERROR]
DNSMonitor$1$1:98 cr_id= parent_reqid= reqid=
Unable to resolve
xxxx.redis.cache.windows.net java.net.UnknownHostException: failed to
resolve 'xxxx.redis.cache.windows.net' after 4 queries
Fixed in 2.15.1 / 3.10.1 versions
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
I've configured Apache Ignite 1.8.0 programmatically and can start a server with a single node, but when another node joins, they cannot communicate and I receive many of the following two messages in the logs. These continue until the other node is stopped.
ERROR 12:52:39,187-0800 [*Initialization*] util.nio.GridDirectParser: Failed to read message [msg=null, buf=java.nio.DirectByteBuffer[pos=5 lim=420 cap=32768], reader=null, ses=GridSelectorNioSessionImpl [selectorIdx=0, queueSize=1, writeBuf=java.nio.DirectByteBuffer[pos=0 lim=32768 cap=32768], readBuf=java.nio.DirectByteBuffer[pos=5 lim=420 cap=32768], recovery=null, super=GridNioSessionImpl [locAddr=/10.97.184.106:5702, rmtAddr=/10.97.189.92:58788, createTime=1484945559174, closeTime=0, bytesSent=0, bytesRcvd=420, sndSchedTime=1484945559174, lastSndTime=1484945559174, lastRcvTime=1484945559185, readsPaused=false, filterChain=FilterChain[filters=[GridNioCodecFilter [parser=o.a.i.i.util.nio.GridDirectParser#21e93eaf, directMode=true], GridConnectionBytesVerifyFilter], accepted=true]]]
class org.apache.ignite.IgniteException: Invalid message type: -84
at org.apache.ignite.internal.managers.communication.GridIoMessageFactory.create(GridIoMessageFactory.java:805)
at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$5.create(TcpCommunicationSpi.java:1631)
at org.apache.ignite.internal.util.nio.GridDirectParser.decode(GridDirectParser.java:76)
at org.apache.ignite.internal.util.nio.GridNioCodecFilter.onMessageReceived(GridNioCodecFilter.java:104)
at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:107)
at org.apache.ignite.internal.util.nio.GridConnectionBytesVerifyFilter.onMessageReceived(GridConnectionBytesVerifyFilter.java:113)
at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:107)
at org.apache.ignite.internal.util.nio.GridNioServer$HeadFilter.onMessageReceived(GridNioServer.java:2332)
at org.apache.ignite.internal.util.nio.GridNioFilterChain.onMessageReceived(GridNioFilterChain.java:173)
at org.apache.ignite.internal.util.nio.GridNioServer$DirectNioClientWorker.processRead(GridNioServer.java:918)
at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:1583)
at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:1516)
at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1289)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:745)
WARN 12:52:39,188-0800 [*Initialization*] communication.tcp.TcpCommunicationSpi: Failed to process selector key (will close): GridSelectorNioSessionImpl [selectorIdx=0, queueSize=1, writeBuf=java.nio.DirectByteBuffer[pos=0 lim=32768 cap=32768], readBuf=java.nio.DirectByteBuffer[pos=5 lim=420 cap=32768], recovery=null, super=GridNioSessionImpl [locAddr=/10.97.184.106:5702, rmtAddr=/10.97.189.92:58788, createTime=1484945559174, closeTime=0, bytesSent=0, bytesRcvd=420, sndSchedTime=1484945559174, lastSndTime=1484945559174, lastRcvTime=1484945559185, readsPaused=false, filterChain=FilterChain[filters=[GridNioCodecFilter [parser=o.a.i.i.util.nio.GridDirectParser#21e93eaf, directMode=true], GridConnectionBytesVerifyFilter], accepted=true]]
ERROR 12:52:39,189-0800 [*Initialization*] communication.tcp.TcpCommunicationSpi: Closing NIO session because of unhandled exception.
class org.apache.ignite.internal.util.nio.GridNioException: Invalid message type: -84
at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:1595)
at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:1516)
at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1289)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteException: Invalid message type: -84
at org.apache.ignite.internal.managers.communication.GridIoMessageFactory.create(GridIoMessageFactory.java:805)
at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$5.create(TcpCommunicationSpi.java:1631)
at org.apache.ignite.internal.util.nio.GridDirectParser.decode(GridDirectParser.java:76)
at org.apache.ignite.internal.util.nio.GridNioCodecFilter.onMessageReceived(GridNioCodecFilter.java:104)
at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:107)
at org.apache.ignite.internal.util.nio.GridConnectionBytesVerifyFilter.onMessageReceived(GridConnectionBytesVerifyFilter.java:113)
at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:107)
at org.apache.ignite.internal.util.nio.GridNioServer$HeadFilter.onMessageReceived(GridNioServer.java:2332)
at org.apache.ignite.internal.util.nio.GridNioFilterChain.onMessageReceived(GridNioFilterChain.java:173)
at org.apache.ignite.internal.util.nio.GridNioServer$DirectNioClientWorker.processRead(GridNioServer.java:918)
at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:1583)
... 4 more
Version information.
>>> +----------------------------------------------------------------------+
>>> Ignite ver. 1.8.0#20161205-sha1:9ca40dbeb7d559fcb299bdb6f5c90cdf8ce7e533
>>> +----------------------------------------------------------------------+
>>> OS name: Windows Server 2012 R2 6.3 amd64
>>> CPU(s): 2
>>> Heap: 3.6GB
>>> VM name: 13752#host
>>> Grid name: T-XXX
>>> Local node [ID=983EC5A0-2D9A-40C9-B4C3-3D59739BDDB9, order=1, clientMode=false]
>>> Local node addresses: [hostname.example.com/0:0:0:0:0:0:0:1, /10.97.184.106, /127.0.0.1]
>>> Local ports: TCP:5702 TCP:5703 TCP:5705
One of the similar issues I've found in my research is that it is recommended to disable the shared memory feature (setSharedMemoryPort -1) as a first step in removing a problem like this.
The server is running on Windows and the other server joining the cache is on OSX.
INFO 12:50:17,569-0800 [*Initialization*] ignite.internal.IgniteKernal%T-XXX: OS: Windows Server 2012 R2 6.3 amd64
How do I prevent these errors? Have I configured the cluster poorly or is there an incompatibility between the two machines I am using?
Very likely it's a misconfiguration issue. This can happen if discovery SPI on one node tries to connect to communication SPI on another node. See this post: http://apache-ignite-users.70518.x6.nabble.com/Invalid-message-type-84-error-td9869.html