Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Calling plist_options is deprecated! Use service.require_root instead. #146

Open
dijonkitchen opened this issue Mar 6, 2023 · 19 comments
Assignees

Comments

@dijonkitchen
Copy link

Got this running a recent brew install:

Warning: Calling plist_options is deprecated! Use service.require_root instead.
Please report this issue to the elastic/tap tap (not Homebrew/brew or Homebrew/homebrew-core), or even better, submit a PR to fix it:
  /opt/homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb:68
@Sanchew
Copy link

Sanchew commented Jul 2, 2023

yes it look like annoying.
so i use @plist_manual = "elasticsearch" instead plist_options :manual => "elasticsearch" in /opt/homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb:68.
it working for me.
or

  service do
    run opt_bin/"elasticsearch"
    require_root false
    working_dir var
    log_path var/"elasticsearch.log"
    error_log_path var/"elasticsearch.log"
    environment_variables ES_JAVA_HOME: "/Library/Java/JavaVirtualMachines/jdk-11.0.11.jdk/Contents/Home"
  end

it works the same.

@basemkhirat
Copy link

yes it look like annoying. so i use @plist_manual = "elasticsearch" instead plist_options :manual => "elasticsearch" in /opt/homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb:68. it working for me. or

  service do
    run opt_bin/"elasticsearch"
    require_root false
    working_dir var
    log_path var/"elasticsearch.log"
    error_log_path var/"elasticsearch.log"
    environment_variables ES_JAVA_HOME: "/Library/Java/JavaVirtualMachines/jdk-11.0.11.jdk/Contents/Home"
  end

it works the same.

It works.

@ayusshsoarav
Copy link

yes it look like annoying. so i use @plist_manual = "elasticsearch" instead plist_options :manual => "elasticsearch" in /opt/homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb:68. it working for me. or

  service do
    run opt_bin/"elasticsearch"
    require_root false
    working_dir var
    log_path var/"elasticsearch.log"
    error_log_path var/"elasticsearch.log"
    environment_variables ES_JAVA_HOME: "/Library/Java/JavaVirtualMachines/jdk-11.0.11.jdk/Contents/Home"
  end

it works the same.

Thanks a lot @Sanchew !
I had to modify some values to make it work:

  service do
    run opt_bin/"elasticsearch"
    working_dir var
    log_path var/"log/elasticsearch.log"
    error_log_path var/"log/elasticsearch.log"
    environment_variables ES_JAVA_HOME: "/Library/Java/JavaVirtualMachines/jdk-11.0.17.jdk/Contents/Home"
  end

@dijonkitchen
Copy link
Author

I worked around this with Docker and using elasticsearch/opensearch running in a container which might be more deterministic and in tune with how Elasticsearch would rather be run. There's #144 to fix this, but it's been a while and not merged.

@iam-mhaseeb
Copy link

@plist_manual = "elasticsearch"

This works perfectly fine.

@alimurtaza026
Copy link

How to fix this useless issue?

@alimurtaza026
Copy link

@plist_manual = "elasticsearch"

This works perfectly fine.

Works great

@elmirill
Copy link

I'm also affected by this issue. I haven't updated elastic or modified it in any way. It's just started a few days ago for me when I realised that it's not running as a brew service anymore and the attempt to run it with 'brew services start elasticsearch-full' results in this issue.

@NinjutsuSunrise
Copy link

I'm also affected by this issue. I haven't updated elastic or modified it in any way. It's just started a few days ago for me when I realised that it's not running as a brew service anymore and the attempt to run it with 'brew services start elasticsearch-full' results in this issue.

@elmirill same issue here. Even once applying the patch above, still hitting a Java issue. Out of curiosity... had you upgraded to macOS Ventura recently? Did you end up resolving?

@elmirill
Copy link

@elmirill same issue here. Even once applying the patch above, still hitting a Java issue. Out of curiosity... had you upgraded to macOS Ventura recently? Did you end up resolving?

No, I haven't upgraded to Ventura recently, but I've just installed Sonoma (spoilers: with no avail).
I'm still running elastic in a separate terminal window for now.

@alimurtaza026
Copy link

alimurtaza026 commented Oct 11, 2023 via email

@jainilpatel98
Copy link

I had to manually edit the file on my machine at /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb because they are not changing it. Then it downloaded nicely.

@plist_manual = "elasticsearch" instead of the line plist_options :manual => "elasticsearch"

@MiArlene
Copy link

O,this is useful for me to solve this question, just modify the @plist_manual = "elasticsearch" instead of the line plist_options :manual => "elasticsearch" in the file elasticsearch-full.rb

@opvexe
Copy link

opvexe commented Nov 24, 2023

I had to manually edit the file on my machine at /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb because they are not changing it. Then it downloaded nicely.

@plist_manual = "elasticsearch" instead of the line plist_options :manual => "elasticsearch"

thank you ! it's can work.

@hammadadev
Copy link

For apple silicon(m1, m2), go to opt/homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb, and do the changing as mentioned above, and it will work.

@josephecombs
Copy link

For apple silicon(m1, m2), go to opt/homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb, and do the changing as mentioned above, and it will work.

Working for me as of 12/4/23.

@jaj232
Copy link

jaj232 commented Dec 6, 2023

I replaced plist_options :manual => "elasticsearch" with this @plist_manual = "elasticsearch", but am still getting the same error when I run brew install elastic/tap/kibana-full. Any ideas why?

@timching
Copy link

Sharing my workaround here for Apple M1 machine, based on some research

It does not help me when changing @plist_manual = "elasticsearch" instead plist_options :manual => "elasticsearch" in /opt/homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb:68.
it throws another error that says undefined method 'plist_startup' which may be because I used an updated brew version I guess

Here are the steps that I make things work

  1. follow Switch to modern service definition for elasticsearch-full #144 (comment) to switch the branch for homebrew-tap (loading the patch-1 plist instead of using plist_manual)
  2. follow the installation here https://gist.github.com/todgru/0ba097d63318313f12a52594217f8e2b
  3. update ES_JAVA_HOME in the homebrew.mxcl.elasticsearch-full.plist by getting the path using echo $(/usr/libexec/java_home) (the version could be different, it's 19 in above gist, but I'm using 21 atm)
  4. stop & restart elasticsearch-full using brew

@dskecse
Copy link

dskecse commented Jan 29, 2024

Now that it's obvious this project has been abandoned and due to this message from its maintainer, I'd like to suggest anyone interested in using the fixed and updated version of ElasticSearch 7.17.14 (as opposed to 7.17.4 from this tap) to check out my Homebrew tap. The elasticsearch-full@7.17 formula there is mostly a copy of the elasticsearch-full formula from this repo except for the fixes and the version update. To install:

brew tap dskecse/tap
brew install elasticsearch-full@7.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests