Skip to content

Commit

Permalink
Don't let ubuntu try to install its crazy jayatana agent.
Browse files Browse the repository at this point in the history
By default, our security stuff will reject this (as do other apps).
See https://bugs.launchpad.net/ubuntu/+source/jayatana/+bug/1441487

However its not really the user's fault, ubuntu screws up here by
installing this agent by default. We don't want any agents.

So instead, we drop it like this:

```
$ bin/elasticsearch
Warning: Ignoring JAVA_TOOL_OPTIONS=-Bogus1 -Bogus2
Please pass JVM parameters via JAVA_OPTS instead
[2015-09-25 23:34:39,777][INFO ][node                     ] [Doctor Bong] version[3.0.0-SNAPSHOT], pid[19044], build[2f5b6ea/2015-09-26T03:18:16Z]
...
```

Closes #13785
  • Loading branch information
rmuir committed Sep 26, 2015
1 parent 70fcda0 commit d484376
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions distribution/src/main/resources/bin/elasticsearch
Expand Up @@ -113,6 +113,14 @@ if [ -z "$ES_CLASSPATH" ]; then
exit 1
fi

# don't let JAVA_TOOL_OPTIONS slip in (e.g. crazy agents in ubuntu)
# works around https://bugs.launchpad.net/ubuntu/+source/jayatana/+bug/1441487
if [ "x$JAVA_TOOL_OPTIONS" != "x" ]; then
echo "Warning: Ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS"
echo "Please pass JVM parameters via JAVA_OPTS instead"
unset JAVA_TOOL_OPTIONS
fi

# Special-case path variables.
case `uname` in
CYGWIN*)
Expand Down
7 changes: 7 additions & 0 deletions distribution/src/main/resources/bin/plugin
Expand Up @@ -59,6 +59,13 @@ if [ -n "$ES_ENV_FILE" ]; then
fi
fi

# don't let JAVA_TOOL_OPTIONS slip in (e.g. crazy agents in ubuntu)
# works around https://bugs.launchpad.net/ubuntu/+source/jayatana/+bug/1441487
if [ "x$JAVA_TOOL_OPTIONS" != "x" ]; then
echo "Warning: Ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS"
unset JAVA_TOOL_OPTIONS
fi

if [ -x "$JAVA_HOME/bin/java" ]; then
JAVA=$JAVA_HOME/bin/java
else
Expand Down

0 comments on commit d484376

Please sign in to comment.