ES_JAVA_HOME is not set correctly because of a space in the directory extension - elasticsearch

I am facing an issue while setting up elasticsearch on my windows machine as a service.
error details
C:\Users\Jyoti Prakash\Downloads\MARKVI\elk\elasticsearch\bin
λ elasticsearch-service.bat install
warning: ignoring JAVA_HOME=C:\Program Files\Java\jdk-18.0.1.1; using bundled JDK
Installing service : elasticsearch-service-x64
Using ES_JAVA_HOME : C:\Users\Jyoti Prakash\Downloads\MARKVI\elk\elasticsearch\jdk
'C:\Users\Jyoti' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Failed installing 'elasticsearch-service-x64' service
The issue is in the file extension C:\Users\Jyoti Prakash\Downloads\MARKVI\elk\elasticsearch\jdk there is a space in my name.
What I tried so far: I created a environment variable called ES_JAVA_HOME with the file name, but still not working. And I am trying this with version Of elasticSearch 8.3.0
I have tried one more option, I downloaded 8.2.1 and same thing working fine and able to start the service.
How to solve this? Couldn't find similar post so raising it.

Related

How to get Kotlinc 1.8.0 to run with Ubuntu on Windows

I installed Kotlinc through the zip file kotlin-compiler-1.8.0.zip and extracted it and moved the kotlinc\bin files to my C:\Program files. I later then verified that I had installed it correctly by running the kotlinc -version command in the terminal and got back info: kotlinc-jvm 1.5.21 (JRE 16.0.2+7-67). So I believe I have that working just fine. So I believe now the error is arising from Java somehow.
When I go to run my simple hello world program with this:
kotlinc main.kt -include-runtime -d main.jar
I am met with the error:
/mnt/c/Program Files/kotlinc/bin/kotlinc: line 98: java: command not found
Previously I was just getting: kotlinc command not found. I later read on StackOverflow someone else was having the same problem and the answer to that solution was just add it to the environment Variable path, in which I did but I very soon then ran into this issue.
I have since tried everything I have came across on this issue, I've reinstalled the kotlinc compiler and java and put the Java\jdk16.0.2\bin in my environment variable path as well. When I try to run the simple command kotlinc help in Ubuntu I am also met with the same line 98: java command not found error.

Why the system cannot find the specified path?

I have an issue where I am trying to run: terraform init in module folder of my project and I am receiving an error below. When I am running terraform init not in module but in the main folder everything is right I am getting: Terraform has been successfully initialized!
I am working on Windows 10 with Terraform version 0.14.6
I have a file in specific directory. Why am I receiving this error?
Initializing the backend...
Initializing provider plugins...
- Finding hashicorp/aws versions matching "~> 3.24.1"...
- Installing hashicorp/aws v3.24.1...
Error: Failed to install provider
Error while installing hashicorp/aws v3.24.1: open
.terraform\providers\registry.terraform.io\hashicorp\aws\3.24.1\windows_amd64\terraform-provider-aws_v3.24.1_x5.exe:
The system cannot find the path specified.
I moved all files to c:\terraform folder and it works fine. I don't why because I have turned on long path in windows and the whole path is 116 signs not over 255.

Elasticsearch 7.3 upgrade with homebrew

I was using Elasticsearch 6.8 via homebrew, and I was trying to upgrade to 7.3. Previously, on 6.8 I already got a warning about a log file that did not exist, but the server would still run - so I did nothing.
Now with 7.3, I get an error and the server won’t run:
Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
output:
[0.002s][error][logging] Error opening log file 'logs/gc.log': No such file or directory
[0.002s][error][logging] Initialization of output 'file=logs/gc.log' using options 'filecount=32,filesize=64m' failed.
error:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Invalid -Xlog option '-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:111)
at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:79)
at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:57)
at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:89)
I tried creating the dir/file where elasticsearch was installed, but that did not work for me (or i did something wrong).
Reference: https://onecompiler.com/questions/3uwszcf3x/homebrew-installed-elasticsearch-failing-to-start
I have fixed this by changing the relative logs/gc.log path to an absolute path. Follow the below steps to solve the issue
Open jvm.options file which is located at /usr/local/etc/elasticsearch/jvm.options
Change the relative path to an absolute path
from the following
# JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
to
# JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file=/usr/local/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
Restart elasticsearch $ brew services restart elasticsearch-full or just start it without daemon - $ elasticsearch

Error -60005 when install Cocos2d-iPhone v3 RC4

When I try to install Cocos2d-iphone 3.0.0 RC4, I got an error: (run without sudo)
Error -60005 occurred while executing script with privileges.
So, I try to show its package content and use terminal to do: cd ...Cocos2D Installer 3.0.0.app/Contents/MacOS
I try this command: (with sudo)
sudo ./Cocos2D\ Installer\ 3.0.0
It works but I got log with some errors:
[1m>>> Installing Cocos2D-v3.0.0 files (B[m
[1m>>> Installing Cocos2D-v3.0.0 templates (B[m
[4m[1mCocos2D Template Installer (Cocos2D-v3.0.0)(B[m
Error: [31m✖︎(B[m Script cannot be executed as root.
In order for it to work properly, please execute the script again without 'sudo'.
If you want to know more about how to use this script execute '/Users/viethung/Downloads/Cocos2D-v3.0.0/install.sh --help'.
[1m>>> Building/Installing Cocos2D-v3.0.0 documentation, this may take a minute.... (B[m
appledoc version: 2.2 (build 963)
Generation step 4/5 failed: GBDocSetInstallGenerator failed generating output, aborting!
Documentation set was installed, but couldn't reload documentation within Xcode.
Xcode got an error: No documentation set present at specified path.
[1m>>> Cocos2D-v3.0.0 installation complete! (B[m
Are there any way is better than this way?
I have same problem.
I think you installed old cocos2d-iphone and it caused this problem.
You should remove old cocos2d-iphone first. I removed:
~/Library/Developer/Xcode/cocos2d v3.x
And install again. It works for me.
Hope it works for you :)

Error after running build() to create R package in RStudio

I am trying to build an R package using RStudio on Windows 8 Pro. When I attempt to build the package by running build() I get the error:
"C:/Program Files/R/R-30~1.2/bin/x64/R" --vanilla CMD build "H:\File Assembly\FileAssembler" \
--no-manual --no-resave-data
'C:\Program' is not recognized as an internal or external command, operable program or batch file.
Error: Command failed (1)
I already have MiKTEX installed and I have checked this by:
Sys.which("pdflatex")
pdflatex
"C:\\Program Files (x86)\\MIKTEX~1.9\\miktex\\bin\\pdflatex.exe"
The R version I am using is: R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Loading library(devtools) and running find_rtools(T) gives:
find_rtools(T)
Scanning path...
ls : c:\Rtools\bin\ls.exe
gcc: c:\Rtools\GCC-46~1.3\bin\gcc.exe
VERSION.txt
Rtools version 3.1.0.1942
Version: 3.1
[1] TRUE
In addition, the path for rtools exes are:
Sys.which("ls.exe")
ls.exe
"c:\\Rtools\\bin\\ls.exe"
Sys.which("gcc.exe")
gcc.exe
"c:\\Rtools\\GCC-46~1.3\\bin\\gcc.exe"
And checking the path in R:
Sys.getenv('PATH')
[1] "C:\\Program Files\\R\\R-3.0.2\\bin\\x64;c:\\Rtools\\bin;c:\\Rtools\\gcc-4.6.3\\bin;……other paths…………;C:\\Program Files (x86)\\MiKTeX 2.9\\miktex\\bin\\"
I would really appreciate help with identifying what I have missed out.
This is a common error caused by a space in the install location path (C:\Program Files). The solution, and the official R recommendation is that you never install R in a location with spaces in it on Windows if you want to be able to install packages from source.
from http://cran.r-project.org/bin/windows/rw-FAQ.html#How-do-I-install-R-for-Windows_003f:
If you want to be able to build packages from sources, we recommend
that you choose an installation path not containing spaces.
I had the same problem.
Took some time to find that Rcmd.exe was removed by the Kaspersky antivirus.
once I detected that it was easy to fix.
good luck
Offer

Resources