OpenJDK 64-Bit Server VM warning Elasticsearch not working in windows 10 - elasticsearch

I cannot seem to find anything related to my problem in stack overflow. I've downloaded jdk 13.0 and elasticsearch 7.4.0.
On cmd setting path to C:\Users\Desktop\download\elasticsearch-7.4.0-windows-x86_64\elasticsearch-7.4.0\bin I execute:
elasticsearch.bat
Which outputs:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <?> at index 9: C:\Users\???\AppData\Local\Temp\elasticsearch
at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
at org.elasticsearch.common.io.PathUtils.get(PathUtils.java:60)
at org.elasticsearch.env.Environment.<init>(Environment.java:95)
at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:69)
at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:95)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
I've read https://github.com/elastic/elasticsearch/issues/43911 and people say they've solved it by increasing the ram in kubernetes. I have no knowledge of kubernetes and I'm not using it so I've decided to post this question.
Could someone tell me why running elasticserach.bat is failing?
EDIT : as developer suggested
I've read https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html and followed the procedure and still gives me same error message.
But my path seems pretty odd compared to the resource I've followed. This is my path:
C:\Users\myname\Desktop\download\jdk-13.0.1_windows-x64_bin\jdk-13.0.1
which gave me same error as before.
I've noticed java.exe is inside bin folder which is inside jdk-13.0.1 so I've tried setting value for system variable as
C:\Users\myname\Desktop\download\jdk-13.0.1_windows-x64_bin\jdk-13.0.1\bin
and now it give me:
"could not find java in JAVA_HOME or bundled at C:\Users\myname\Desktop\download\elasticsearch-7.4.0-windows-x86_64\elasticsearch-7.4.0\jdk"
I clearly see java.exe inside bin folder, why is it saying it cannot find it?

Related

can't run integrated WebLogic 12.2.1.4 server on Windows 10

I have windows 10 machine, and JDeveloper 12.2.1.4.0 , when i try to run the weblogic server for the first time i get this error :
Adding environment variable to WLST script USER_MEM_ARGS = -Xms32m -Xmx1024m -XX:MaxPermSize=384m
Log File: C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain.log
Label: JDEVADF_PT.12.2.1.4.0_GENERIC_190911.2248.S
Product Home: D:\Oracle\Middleware\BPM_12.4\jdeveloper\jdev\
Domain: C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\DefaultDomain
BuildDefaultDomain1.py 2020-06-05 09:14:45
cmd.exe /c ""D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py""
Cannot run program "cmd.exe" (in directory "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin"): Malformed argument has embedded quote: "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py"
java.io.IOException: Cannot run program "cmd.exe" (in directory "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin"): Malformed argument has embedded quote: "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py"
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at oracle.jdevimpl.adrs.weblogic.wlst.ScriptRunnerImpl.runScript(ScriptRunnerImpl.java:106)
at oracle.jdevimpl.adrs.weblogic.builder.DomainScriptRunnerImpl.runScript(DomainScriptRunnerImpl.java:146)
at oracle.jdevimpl.adrs.weblogic.builder.DefaultDomainBuilder.createDomain(DefaultDomainBuilder.java:606)
at oracle.jdevimpl.adrs.weblogic.builder.DefaultDomainBuilder.build(DefaultDomainBuilder.java:274)
at oracle.jdevimpl.adrs.weblogic.builder.DefaultDomainBuilder$1.run(DefaultDomainBuilder.java:225)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Caused by: java.lang.IllegalArgumentException: Malformed argument has embedded quote: "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py"
at java.lang.ProcessImpl.needsEscaping(ProcessImpl.java:279)
at java.lang.ProcessImpl.createCommandLine(ProcessImpl.java:202)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:436)
at java.lang.ProcessImpl.start(ProcessImpl.java:140)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 9 more
i did some research and most people tell that the solution in the following url is fixing the problem
http://unversioned.blogspot.com/2015/12/jdeveloper-12c-generic-installer-cannot-create-weblogic-domain.html
but the problem is when i open the javashell.py file , i don't find an entry for
_osTypeMap =
it Doesn't Exist in the file
Also , another solution the people said it worked is by adding this line
Djdk.lang.Process.allowAmbiguousCommands=true
but they didn't said where to add it and what is the exact steps !
There is a known issue with JDeveloper, WLS 12.2.1.4 and JDK 8 opened at My Oracle Support : Bug 30670839 : INTEGRATED WLS CANNOT BE CREATED WHEN USING JDK1.8.0_231
There is no patch available for now but you can try the workaround provided in the bug note : Revert back to JDK shipped with JDeveloper
If we see, problem is with the type of command that JDeveloper executes to start the weblogic instance is old and therefore does not work correctly, however below solution is working. It did solve the issue in my machine
We must modify this file:
C:<JDEVELOPER Install Path>\ide\bin\ide.conf
Add the following line:
AddVMOption -Djdk.lang.Process.allowAmbiguousCommands = true
Post modification, save the file.
Restart the Jdeveloper, compile and launch the weblogic server.

Starting a payara 5 has encountered

I have build a very simple project of hello world in
Payara 5 (5.181)
JSF 2.3
JDK 1.8
CDI 2.0
Maven
and encountered a problem
Unable to start server due following issues: Launch process failed with exit code 1
in console it throws an error of :
Error: Could not find or load main class server\payara5\glassfish.lib.grizzly-npn-bootstrap.jar
[PIC] Payara 5 Error
It seems that the Payara Tools for Eclipse suffer by several bugs that may cause this. In my case, the following workarounds helped:
The Payara installation path should not contain spaces (e.g. Program Files\Payara)
It seems that only Java 8 is supported at the time
Open the domain.xml configuration file for the domain you are trying to start (typically payara_install_path/glassfish/domains/domain1/config/domain1.xml) and search for "Xbootclasspath". You should find a couple of lines like
<jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options>
<jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options>
<jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options>
<jvm-options>[1.8.0u191|1.8.0u500]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
Depending of your installed Java version (try running java --version) and choose the appropriate line (most likely the last one). Remove the remaining lines and remove the [...] part at the beginning of the chosen line so you will get something like
<jvm-options>-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
After this, the tools seem to start normally.
The Problem is with Java version. The grizzly-npn-bootstrap-1.8.1.jar Jar is placed in bootclasspath, thats why it requires proper java version to start payara server. So remove unnecessary bootstrap jar from domain.xml.
In Windows:
1) Go To ---C:\Users\xxxx\payara5\glassfish\domains\domain1\config\domain.xml
2) According to my java verson(java version "1.8.0_191") I deleted the following lines from domain.xml. So delete according to your java version.
<jvm-options>[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar</jvm-options>
<jvm-options>[1.8.0u121|1.8.0u160]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.7.jar</jvm-options>
<jvm-options>[1.8.0u161|1.8.0u190]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.jar</jvm-options>
3) Remove this [1.8.0u191|1.8.0u500] part from jvm-options & Edit the line in your domain.xml(w.r.t java -version) as shown below
<jvm-options>-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.8.1.jar</jvm-options>
4) restart your server.
As Radkovo said, "The Payara installation path should not contain spaces (e.g. Program Files\Payara)", so I moved the Payara to the Documents folder.
Problem solved!

ES Won't Start on Win x64 Java SE 8 u 171/2

I have Win 10 x64. I updated to Java 8 Update 171. Attempting to run ES up with this command line
cd bin
elasticsearch.bat -Ecluster.name=ABTest_Cluster_00 -Enode.name=ABTest_Node_00
resulted in failure to start with this rather cryptic error
Common was unexpected at this time
I upgraded to 172 and it was the same. (Disclaimer: It might have been "not expected" rather than "unexpected" but I'm not re-installing 172 to check it and then downgrading again.)
I had a look in jvm.options and the only place I could find "common" was in a comment
# turn off a JDK optimization that throws away stack traces for common
# exceptions because stack traces are important for debugging
-XX:-OmitStackTraceInFastThrow
Downgrading to je 8 U 162 fixed the issue and all was well.
My local DynamoDB ran up OK under the latest Java. Is this an issue with how I'm starting ES (don't think so - it's been working for ages)? Is an issue with ES or Java? Is there a work around that anyone knows of as I'd rather run the latest Java.
For me helped to change in elasticsearch.bat from %JAVA% to !JAVA! in line 47
With elastic 6.6.2
change line 46 of elasticsearch.bat - from %JAVA% to !JAVA!
change line 60 of elasticsearch-env.bat - from %JAVA% to !JAVA!

Unable to run SparkR in Rstudio

I cant use sparkR in Rstudio because im getting some error: Error in sparkR.sparkContext(master, appName, sparkHome, sparkConfigMap, :
JVM is not ready after 10 seconds
I have tried to search for the solution but cant find one. Here is how I have tried to setup sparkR:
Sys.setenv(SPARK_HOME="C/Users/alibaba555/Downloads/spark") # The path to your spark installation
.libPaths(c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"), .libPaths()))
library("SparkR", lib.loc="C/Users/alibaba555/Downloads/spark/R") # The path to the lib folder in the spark location
library(SparkR)
sparkR.session(master="local[*]",sparkConfig=list(spark.driver.memory="2g")*
Now execution starst with a message:
Launching java with spark-submit command
C/Users/alibaba555/Downloads/spark/bin/spark-submit2.cmd
sparkr-shell
C:\Users\ALIBAB~1\AppData\Local\Temp\Rtmp00FFkx\backend_port1b90491e4622
And finally after a few minutes it returns an error message:
Error in sparkR.sparkContext(master, appName, sparkHome,
sparkConfigMap, : JVM is not ready after 10 seconds
Thanks!
It looks like the path to your spark library is wrong. It should be something like: library("SparkR", lib.loc="C/Users/alibaba555/Downloads/spark/R/lib")
I'm not sure if that will fix your problem, but it could help. Also, what versions of Spark/SparkR and Scala are you using? Did you build from source?
What seemed to be causing my issues boiled down to the working directory of our users being a networked mapped drive.
Changing the working directory fixed the issue.
If by chance you are also using databricks-connect make sure that the .databricks-connect file is copied into the %HOME% of each user who will be running Rstudio or set up databricks-connect for each of them.

SonarQube 5.1 PAM - no jpam in java.library.path

I'm unable to use PAM plugin on SonarQube 5.1 on Debian 8 (64bit).
I did setup according to https://github.com/SonarCommunity/sonar-pam and still getting following error during login:
Java::JavaLang::UnsatisfiedLinkError (no jpam in java.library.path):
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
java.lang.Runtime.loadLibrary0(Runtime.java:849)
java.lang.System.loadLibrary(System.java:1088)
net.sf.jpam.Pam.<clinit>(Pam.java:51)
org.sonar.plugins.pam.PamConfiguration.newInstance(PamConfiguration.java:61)
org.sonar.plugins.pam.PamConfiguration.getPAM(PamConfiguration.java:49)
org.sonar.plugins.pam.PamAuthenticator.authenticate(PamAuthenticator.java:45)
org.sonar.api.security.SecurityRealm$1.doAuthenticate(SecurityRealm.java:60)
Here's setup (sonar is located at /var/lib/sonarqube-5.1):
/var/lib/sonarqube-5.1/lib/JPam-1.1.jar
native libs (64bit and 32bit) have been put to /var/lib/sonarqube-5.1/bin/linux-x86-64/lib/libjpam.so and /var/lib/sonarqube-5.1/bin/linux-x86-32/lib/libjpam.so (just for sure in case sonar was run as 32bit)
All directories leading to native libraries and libraries themselves have +rx access
Any idea what can be causing problem?
I'd print the java.library.path variable. The only thing I can think of is that the jpam lib is in the wrong place or there is an issue with permissions. (Did you check the SonarQube user can actually read that file?)
UPDATE
Check java.library.path in Settings->System Info page
Move jpam lib to one of those paths

Resources