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
Related
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.
I had downgraded to Elasticsearch 6.X (from 7.x) using Homebrew and started to get a warning.
OpenJDK 64-Bit Server VM warning: Cannot open file logs/gc.log due to No such file or directory
How do you fix it?
I've looked at a similar error on Elasticsearch 8 which gives an error but the answer does not resolve this.
The differences are:
different Elasticsearch version 6.X not 7.x
warning not an error
I am using JDK 8 not 9.
Elasticsearch 6.X
Solution:
#
# /usr/local/etc/elasticsearch/jvm.options
# - directories might be specific for Homebrew installation
#
## JDK 8 GC logging
...
# Before
8:-Xloggc:logs/gc.log
# After
8:-Xloggc:/usr/local/var/log/elasticsearch/gc.log
...
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.
OS : 'CentOS 6.5
'
ElasticSearch version : '2.3.0'
Master's puppet version: '3.8.7'
Client's puppet version : '3.7.4'
Base module version before upgrade : '0.10.2'
Base module version after upgrade : '5.1.0'
Error: could not retrieve catalog from remote server: Error 400 on
SERVER: invalid parameter elasticsearch_package_name on
Elasticsearch_plugin[license] at
/etc/puppet/environments/production/modules/elasticsearch/manifests/plugin.pp:169
on node bla-test01.dom'
Hi,
This error started after we upgraded our Elasticsearch's base (Official from puppet forge) module from version '0.10.2' to '5.1.0'. Our puppet module of elasticsearch worked just fine before the upgrade.
Since the upgrade this error occurred whenever puppet ran on our nodes.
After we saw this case we tried to restart our puppetserver service. Since the restart, the error occurs once every 3-4 runs of puppet and we have no idea why.
Looking at the elastic/elasticsearch module which is the one you seem to be using i can see that the elastic_plugin custom type did not have the elasticsearch_package_name parameter in version 0.11.0 however the 5.1.0 version does. This looks to me that you may have updated the module on the system but have not restarted the puppet server so it still has the 0.11.0 custom type/provider ruby files loaded.
Restart the puppet master server and see if that fixes the issue
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 :)