Comments (4)
I have a bunch of unsynced commits that makes a bunch of improvements and resolves the other issues. Thanks for finding this one. You saved me a bunch of debugging time. I will change the code so that JAVA_HOME is provided as an argument to the elasticsearch process. My ideal would be to install java to a custom directory and not have to mess with environment variables and the registry. The only problem with that approach is, in my view, the best way to know if java is installed is to read the registry. Lastly for the java and elasticsearch processes I am capturing StandardError once the process has ended. I will look into enabling events for trace information like you have.
from elasticsearch-azure-paas.
I was wrong. Don't know why I thought the batch file accepted java_home as an argument. However, I should be able to set custom Environment variables for the process and achieve the same effect. The reason elasticsearch isn't exiting is a "pause" in the batch script when it encounters the no JAVA_HOME error.
from elasticsearch-azure-paas.
So the JAVA_HOME issue is related to how processes get their environment variables. Apparently, they inherit them from their calling process. When you call SetEnviromentVariable a broadcast message (WM_SETTINGCHANGE) is sent to all processes informing them of the change. This is an async processes so even if your process handles that message, your operation which depends on the updated value could very well occur before this message is received. You can read more here.
from elasticsearch-azure-paas.
By setting the JAVA_HOME variable like this:
Environment.SetEnvironmentVariable(JAVA_HOME, javaHome, EnvironmentVariableTarget.Process);
The variable gets picked up immediately and a recycle is not needed
from elasticsearch-azure-paas.
Related Issues (13)
- RoleRoot missing separator character when deployed to Azure HOT 1
- Elastic Search shutdown HOT 2
- Error using Azure worker role temp folder for download HOT 3
- es_heap_size HOT 4
- Azure files share HOT 17
- Store additional plugins in storage HOT 2
- Bootstrap Bulk Data HOT 1
- Implement internal load balancing
- Elasticsearch command line plugin install HOT 1
- Can this be run in web jobs? HOT 23
- Elasticsearch binding 'problem' when deployed to Azure HOT 1
- [feature request] file based discovery HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-azure-paas.