Issue in setting system variable ES_PATH_CONF for elasticsearch - elasticsearch

I have cloned elasticsearch project from GitHub to my local machine. Built it successfully and imported it into eclipse.
When I am trying to run the main() method in org.elasticsearch.bootstrap.ElasticSearch class (which is the entry point for starting elasticsearch) getting the following error:
ERROR: the system property [es.path.conf] must be set
I tried setting the system variable ES_PATH_CONF to
E:\Elasticsearch\Github\elasticsearch-master\distribution\src\main\resources\config.
But it’s not working I am still getting the same error. Is the above location to ES_PATH_CONF variable correct? Is there any other way to solve this?

The location of the config directory can be set with following VM Option:
-Des.path.conf=/path/to/config/
Also, in your situation, it might be necessary to set the Elasticsearch path.home variable:
-Des.path.home=/path/to/elasticsearch/home/dir

Related

spring.flyway.locations property is unable to read files from specified location in kubernetes

I am using flyway script to migrate the database.
In my project setup I have dev env scripts in the default location : /db/migration/
Also a specific location (under root) for pp scripts: /my_app/flyway_pp/
application-preprod.properties
spring.flyway.baseline-on-migrate = true
spring.flyway.locations=filesystem:/my_app/flyway-pp
My application runs as a image in kubernetes cluster. I have checked using classpath: and filesystem: both. But nothing is getting picked up from flyway_pp folder and instead it is picking up from default location always /db/migration/.
My doubt is may be in the kubernetes env it is not able to resolve the path correctly.
But what should I do in this case.

Terraform throwing error:error configuring Terraform AWS Provider: The system cannot find the path specified

I was facing issue with running aws command via cli with certificate issue. So as per some blogs, I was trying to fix the issue using setx AWS_CA_BUNDLE "C:\data\ca-certs\ca-bundle.pem" command.
Now even after I removed the variable AWS_CA_BUNDLE from my aws configure file, terraform keeps throwing the below error on terraform apply.
Error: error configuring Terraform AWS Provider: loading configuration: open C:\data\ca-certs\ca-bundle.pem: The system cannot find the path specified.
Can someone please tell me where terraform/aws cli is taking this value from and how to remove it? I have tried deleting the entire aws config and credential files still this error is thrown, uninstall aws cli and reinstalling.
If its set in some system/environment variable, can you please tell me how to reset it to default value?
The syntax to add ca_bundle variable to config file is wrong.
Your config file should look like this
[default]
region = us-east-1
ca_bundle = dev/apps/ca-certs/cabundle-2019mar05.pem
But as I understand you want to use environment variable (AWS_CA_BUNDLE).
AWS_CA_BUNDLE:
Specifies the path to a certificate bundle to use for HTTPS certificate validation.
If defined, this environment variable overrides the value for the profile setting ca_bundle. You can override this environment variable by using the --ca-bundle command line parameter.
I would suggest remove environment variable (AWS_CA_BUNDLE) and add ca_bundle to config file. The delete .terraform folder and run terraform init
Go environment variables and delete the environment variable created by AWS_CA_BUNDLE. Shut down Terminal and again start. Run the commands now it will work properly.

Build Chainlink Node from Source, not sure how to reference GCP SQL instance

I've recently built a chainlink node from source (no Docker). When trying to start the node, it's still looking for a local postgresql so I receive this error:
You must set DATABASE_URL env variable. HINT: If you are running this to set up your local test database, try DATABASE_URL=postgresql://postgres#localhost:5432/chainlink_test?sslmode=disable logger=1.4.1#8843bef
This happens even when I have the environmental variable set to:
DATABASE_URL=postgresql://linkster:password#10.5.0.3:5432/link
Also I have this set in a .env where I'm trying to start the node.
I know the GCP SQL instance, database and user exists since I can log in successfully using this:
PGPASSWORD=password psql -h 10.5.0.3 -p 5432 -d "link" -U "linkster"
Looking through the menu, I don't see a way to reference an external database. Did I miss something? Or is there a directory I need to have the .env file?
looking at the node source code, .env files are not natively supported. The only reason they work with running a node through docker, is because docker can take a --env-file parameter, which it then uses to create the environment variables for the container.
When running from source, you should manually set all environment variables in the environment that you're in. eg:
export DATABASE_URL=postgresql://linkster:password#10.5.0.3:5432/link

The JMETER_HOME environment variable is not defined correctly

I'm getting this error when trying to run this jmeter sentence from a maven project in java.
jmeter -g DIRECTORY -o DIRECTORY
When I run it in cmd it works perfectly but when I try to run it using this:
processBuilder.command("cmd.exe","/c","jmeter -g DIRECTORY -o DIRECTORY");
processBuilder.directory(new File("C:\\apache-jmeter-5.3\\bin"));
try {
Process process = processBuilder.start();
It says The JMETER_HOME environment variable is not defined correctly
When I run the command echo %JMETER_HOME% it returns C:\apache-jmeter-5.3
What I found weird is that in other PC it all works fine and that one doesn't have the JMETER_HOME variable defined, so I tried deleting the variable from this PC but it won't delete, it's not appearing in the system variables window but when I echo it's there.
What is going on?
Thanks in advance
So you want us to guess what is the difference between one your PC and the other one without providing any information apart from incomplete code?
I can only state that I cannot reproduce your issue and yes, I don't have JMETER_HOME variable set anywhere.
If you're using Maven maybe it worth considering looking at JMeter Maven Plugin which can automatically download JMeter, run the test and generate the HTML reporting dashboard.
Also be informed that according to JMeter Best Practices you're supposed to use the latest version of JMeter so consider upgrading to JMeter 5.4.3 (or whatever is the latest version of JMeter available at JMeter Downloads page) on next available opportunity.
I faced same issue of JMETER_HOME not been set, even though I tried setting that Env variable.
I was tying to launch the Jmeter on the Virtual system (VM) using command prompt, and didn't succeed.
I able to solve it by running the command prompt as admin and launching Jemter, it worked fine.
Note: make sure you have the set the Env. PATH set to the bin folder of Jmeter

Elasticsearch failed to start - CreateJavaVM Failed

sorry if this is a trivial question, but I've been banging my head against this and I'm getting nowhere, so I thought I'd throw it up.
I'm trying to install Elasticsearch on an Windows 2008 server on Azure. It appears to have installed correctly, but I cannot get it to start.
I have looked around for similar errors and double-checked my JAVA_HOME variable - it appears to be correct, as does the config file.
I also expanded out the heap size via editing the java options files, still no luck.
Any help would be greatly appreciated
Output Log file
JAVA_HOME variable
Which version are you installing? The latest, which would be 5.5.0?
Which installation method did you use? The ZIP or the MSI file?
The last line in your Output Log file screenshot actually shows the error message: The data area passed to a system call is too small.
I'm taking a wild guess: You set Java_HOME in the user variables, but it must be set in the system variables.

Resources