I've installed Elastichsearch 1.7 via Homebrew, which is now "keg-only". I don't fully understand this, but it means that I can't run it simply using elasticsearch like I used to, but I still need to. My Node.js app only works with this version. Is there anything I can do to symlink it or whatever is necessary for other tools to detect it? Any help would be really appreciated.
Homebrew info:
elasticsearch#1.7: stable 1.7.6 [keg-only]
Distributed search & analytics engine
https://www.elastic.co/products/elasticsearch
/usr/local/Cellar/elasticsearch#1.7/1.7.6_1 (38 files, 29.7M)
Built from source on 2017-02-09 at 17:45:23
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/elasticsearch#1.7.rb
==> Requirements
Required: java >= 1.7 ✔
==> Caveats
Data: /usr/local/var/elasticsearch/elasticsearch_ourcore/
Logs: /usr/local/var/log/elasticsearch/elasticsearch_ourcore.log
Plugins: /usr/local/var/lib/elasticsearch/plugins/
Config: /usr/local/etc/elasticsearch/
This formula is keg-only, which means it was not symlinked into /usr/local.
This is an alternate version of another formula.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/elasticsearch#1.7/bin:$PATH"' >> ~/.zshrc
To have launchd start elasticsearch#1.7 now and restart at login:
brew services start elasticsearch#1.7
Or, if you don't want/need a background service you can just run:
elasticsearch --config=/usr/local/opt/elasticsearch#1.7/config/elasticsearch.yml
Related
I've installed Elasticsearch using brew on macos Monterey
brew install elasticsearch
But I can't start the service
brew services start elasticsearch
brew info elasticsearch
This are the log
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
at java.base/java.lang.System.setSecurityManager(System.java:416)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)
If you run:
brew info elasticsearch
You will see:
Deprecated because it is switching to an incompatible license. Check out opensearch instead!
So you should either use opensearch, which is:
a community-driven, open source search and analytics suite derived from Apache 2.0 licensed Elasticsearch 7.10.2 & Kibana 7.10.2.
or if you want to stay with Elasticsearch use the official installation method for macOS which consists of using a tar.gz:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.1.2-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.1.2-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-8.1.2-linux-x86_64.tar.gz.sha512
tar -xzf elasticsearch-8.1.2-linux-x86_64.tar.gz
cd elasticsearch-8.1.2/
alternatively you can use an official Docker image.
Just adding something which might be useful for someone.
If you're running elastic on a Mac M1 architecture, depending on how you run elastic, you might need to setup this property:
xpack.ml.enabled=- false
For Mac Users
System Settings > Privacy & Security > Developer Tools
Check/Add the terminal and start the elastic search from the terminal.
As stated in documentation, plugins can be installed through the following command:
$ sudo bin/elasticsearch-plugin install analysis-icu
However, when installing with more than one plugins, the system prompted the followings
$ sudo bin/elasticsearch-plugin install analysis-icu repository-s3
ERROR: Found multiple arguments for option [arguments], but you asked for only one
https://github.com/elastic/elasticsearch/blob/master/docs/plugins/plugin-script.asciidoc
As of the latest version ES 7.5.2, you can only install one plugin at a time.
The ability to install multiple plugins at once has been added very recently and will only be available from ES 7.6 onwards, which has not yet been released. 7.6 should be coming out anytime now since there are only 2 issues and 4 PRs left open. Stay tuned...
I need old Elasticsearch for my work. but I couldn't install Elasticsearch 1.2.1 with brew
Development environment
$ brew --version
Homebrew 0.9.5 (git revision 567b; last commit 2015-12-23)
The procedure I tried
I tried the following process
$ brew search elasticsearch
elasticsearch ✔ homebrew/versions/elasticsearch20
homebrew/versions/elasticsearch17 ✔
There is no elasticsearch10.
So, I tracked down this guidance.
Homebrew install specific version of formula?
And typed this command.
$ brew info elasticsearch
elasticsearch: stable 2.1.1, HEAD
Distributed search & analytics engine
https://www.elastic.co/products/elasticsearch
/usr/local/Cellar/elasticsearch/2.1.1 (52 files, 31M)
Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/elasticsearch.rb
==> Caveats
Data: /usr/local/var/elasticsearch/elasticsearch_kent/
Logs: /usr/local/var/log/elasticsearch/elasticsearch_kent.log
Plugins: /usr/local/Cellar/elasticsearch/2.1.1/libexec/plugins/
Config: /usr/local/etc/elasticsearch/
To have launchd start elasticsearch at login:
ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents
Then to load elasticsearch now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
Or, if you don't want/need launchctl, you can just run:
elasticsearch
And also typed this command, however couldn't find out a key to installing elasticsearch version 1.2.1
$ brew versions elasticsearch
Error: The `versions` command is no longer supported.
You can use the homebrew-versions tap instead:
https://github.com/Homebrew/homebrew-versions
Or use `brew log` to browse the git history.
I need some help to bridge myself to installing elasticsearch 1.2.1 with brew.
Could you steer my steps?
If you're just trying to do this for local development, then it's probably easier to just download and untar Elasticsearch into a directory.
$ cd /path/to/install/at
$ wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.2.1.tar.gz
$ tar -xf elasticsearch-1.2.1.tar.gz
$ cd elasticsearch-1.2.1
Once untarred, you can optionally delete the tarball:
$ rm elasticsearch-1.2.1.tar.gz
From there, it's just a matter of configuring (as desired) and starting Elasticsearch.
$ vi config/elasticsearch.yml
$ bin/elasticsearch
Note: Elasticsearch 1.2.1 is an extremely old version. I strongly recommend that you upgrade to a more recent release to gain reliability and security. For example, ES 1.2.1 uses MVEL scripting, which is bad at best.
For your production scenario (after New Years, of course), you can easily perform a rolling restart from ES 1.2.1 to ES 1.7.4 to gain a lot of features and stability without much risk. If you have dedicated master nodes, then I recommend starting with them first to get a few extra benefits upfront.
I want to install Logstash for NodeJs on windows 7, but I am not able to find proper steps for the same.
Can any one please help!
There is the option of node-logstash if you want a node.js alternative to Logstash. This isn't something I'm using myself (I'm using nxlog in Windows instead) but it looks like a decent alternative to the standard JRuby Logstash if you need to forward logs from Windows.
Instructions from the readme are below:
Installation
Install NodeJS, version >= 0.10, or io.js.
Install build tools
Debian based system: apt-get install build-essential
Centos system: yum install gcc gcc-c++ make
Install zmq dev libraries: This is required to build the node zeromq module.
Debian based system: apt-get install libzmq1. Under recent releases, this package is present in default repositories. On ubuntu lucid, use this ppa. On debian squeeze, use backports.
Centos 6: yum install zeromq zeromq-devel. Before, you have to add the rpm zeromq repo : curl http://download.opensuse.org/repositories/home:/fengshuo:/zeromq/CentOS_CentOS-6/home:fengshuo:zeromq.repo > /etc/yum.repos.d/zeromq.repo
Clone repository: git clone git://github.com/bpaquet/node-logstash.git && cd node-logstash
Install dependencies: npm install.
The executable is in bin/node-logstash-agent
You have scripts in dists folder to build packages. Actually, only debian is supported.
As per the comment, logstash has nothing to do with nodejs.
What you're looking to do is install Logstash on Windows, something that you can find out about by using google, there will be loads of guides out there describing how to do this.
You would then need to configure logstash to look in the right location for the log files it needs to process, and then set up filters to handle nodejs style logs (which as far as I understand aren't very well standardised). You then need to configure an output (logstash is essentially a unix pipe on steroids and needs somewhere to save the logs it has processed). Elasticsearch is the most common thing to save logs to.
Personally, in my environment, I would install logstash on a CentOS server, as it's a well established process, and ship the logs from your Windows 7 machine to the logstash server using either logstash forwarder or nxlog. That way you can have logs coming in from a number of different sources and you can still reboot your Windows machine every few days as required by Windows update without your logstash server going down.
I'm trying to install Elasticsearch 1.1.0 on OSX Mavericks but i got the following errors when i'm trying to start:
:> ./elasticsearch
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.Version
at org.elasticsearch.bootstrap.Bootstrap.buildErrorMessage(Bootstrap.java:252)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:236)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Also when i'm executing the same command with -v arg, i got this error:
:> ./elasticsearch -v
Exception in thread "main" java.lang.NoSuchFieldError: LUCENE_36
at org.elasticsearch.Version.<clinit>(Version.java:42)
Here's my environment:
Java version
>: java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
Instalation path (downloaded .tar.gz archive from elasticsearch download page and extracted here):
/usr/local/elasticsearch-1.1.0
ENV vars:
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
CLASSPATH=/usr/local/elasticsearch-1.1.0/lib/*.jar:/usr/local/elasticsearch-1.1.0/lib/sigar/*.jar
UPDATE
i finally make it working, unfortunally not sure how because i tried a lot of changes :). But here's a list of changes i made that can help:
i removed jdk and jre and reinstalled on a clean env.
http://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jdk.html#A1096855
i deleted all the cache dirs.I suppose this can be the 'cause' for that it's working now
~/Library/Caches
/Library/Caches
i removed CLASSPATH env var.
ES_PATH and ES_HOME env vars are not set either, but i think this is not so important.
Note: now it's working also if i'm installing with brew.
Thanks.
You should really consider using brew. It's a great tool that will take care of dependencies, version control and much more.
To install Elasticsearch using brew, simply:
brew update
brew install elasticsearch
Boom! Done.
After that follow Elasticsearch instructions :
To have launchd start Elasticsearch at login:
ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents
Then to load Elasticsearch now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
Or, if you don't want/need launchctl, you can just run:
elasticsearch
As there are not very good instructions for actually "installing" it onto a Mac:
Short Version:
Install Java (prefer latest supported release)
Set JAVA_HOME environment variable.
Download Elasticsearch version (tar or zip).
Extract Elasticsearch from the downloaded file.
Run bin/elasticsearch from the extracted directory.
Long version:
Download Java
Only need the JRE if you will not be writing code on the same machine.
I assume that you are getting the latest JDK, which is currently JDK 8 (as you appear to have, and I have installed working on my machine).
Download and extract Elasticsearch and extract it into some directory.
For example: mkdir -p ~/dev/elasticsearch
Optionally move the downloaded file to there:
mv Downloads/elasticsearch* ~/dev/elasticsearch
Extract the downloaded file:
cd ~/dev/elasticsearch (if you moved it in step 2)
If it's the zip, then unzip elasticsearch-1.1.0.zip (or if you don't want to cd into the directory, then just run unzip elasticsearch-1.1.0.zip -d ~/dev/elasticsearch)
If it's the tar, then tar -xvf elasticsearch-1.1.0.tar.gz (or if you don't want to cd into the directory, then just run tar -xvf elasticsearch-1.1.0.tar.gz -C ~/dev/elasticsearch)
Cleanup (if you want) by removing the downloaded file:
rm elasticsearch-1.1.0.*
Open your .bash_profile file for your bash profile settings:
vi ~/.bash_profile
In the file, export your environment variable(s)
export ES_HOME=~/dev/elasticsearch/elasticsearch-1.1.0
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
export PATH=$ES_HOME/bin:$JAVA_HOME/bin:$PATH
Close and re-open your Terminal OR
Run source ~/.bash_profile to update the environment variables
Run Elasticsearch:
elasticsearch
The more traditional way to run it is to do pretty much all of the above, but not add $ES_HOME/bin to the PATH. Then, just go to ES_PATH (cd $ES_PATH, then bin/elasticsearch) or run $ES_PATH/bin/elasticsearch.
Note: Do not setup your CLASSPATH without a very good reason. The scripts will do that for you.
You should try to using brew with last update:
brew update
And install Cask java:
brew cask install java
After that you can install elasticsearch:
brew install elasticsearch
And to have launched start elasticsearch now use:
brew services start elasticsearch
Or you can just run:
elasticsearch
To update ElasticSearch, just run brew upgrade elasticsearch
Update your java
brew update
brew cask install java
Install it with homebrew
brew install elasticsearch
install gpg &&
install java or jdk
1-Import the repository’s GPG key:
wget -qO - https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
2-this is code repository elasticserach in linux for download
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
3-link download elasticsearch
https://www.elastic.co/downloads/elasticsearch
if error
"Job for elasticsearch.service failed because a timeout was exceeded.
See "systemctl status elasticsearch.service" and "journalctl -xe" for details."
solution:
1-sudo journalctl -f
2-sudo systemctl enable elasticsearch.service
3-sudo systemctl start elasticsearch