Open mwunderlich opened 1 year ago
Same here, couldn't start elasticsearch from the notebook itself.
But, running sudo chown -R daemon:daemon elasticsearch-8.9.0
from the terminal, entering my password, and then executing
es_server = Popen(['elasticsearch-8.9.0/bin/elasticsearch'],
stdout=PIPE, stderr=STDOUT) # NOTE: without preexec_fn
worked for me.
(Environment: M1 Max Ventura 13.4.1, Python 3.9.6)
You will need to enter a password. Here is what worked for me. Though, I cant execute the haystack cells because the library has been updated since the ch 7 v2 notebook.
import os import subprocess import getpass
password = getpass.getpass(prompt='Enter password:')
command = f'echo {password} | sudo -S chown -R daemon:daemon elasticsearch-7.9.2'
subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
es_server = subprocess.Popen( args=['elasticsearch-7.9.2/bin/elasticsearch'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
subprocess.run(['sleep', '30'])
Information
The problem arises in chapter:
Describe the bug
Environment:
ES downloaded like this in cell 28:
When executing cell 29 to launch ES from Python, I get the following error:
chown: elasticsearch-8.9.0/config/jvm.options.d: Permission denied
(recursively, for all directories)Trying to launch directly from terminal doesn't work either, even after doing a
sudo chown
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
ES should start up.