elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
14.2k stars 3.5k forks source link

Can not remove my installed plugin #10781

Closed al-ah closed 3 years ago

al-ah commented 5 years ago

hi i installed my plugin . but when i want to remove my plugin or any other plugins , logstash said :

#my commands : /usr/share/logstash/bin/logstash-plugin remove logstash-filter-myplugin
#another command: /usr/share/logstash/bin/logstash-plugin remove logstash-filter-kv

ERROR: Operation aborted, cannot remove plugin, message: The path `/root/logstash-core` does not exist.

after i copy /usr/share/logstash/logstash-core to /root/logstash-core , error changed to :

ERROR: Operation aborted, cannot remove plugin, message: The path `/root/logstash-core-plugin-api` does not exist.

i think logstash dont know where is installed .

al-ah commented 5 years ago

Ok , i solve it by cd /usr/share/logstash/ command before execute remove command.

remd commented 5 years ago

I'm not sure why this issue was closed considering that users should not have to workaround this with their own manual cd. Can this issue please be reopened? @alah64

rkhapre commented 5 years ago

Yes, i am also facing this issue.

jeffrey-e commented 4 years ago

Facing the same issue here

JazyK commented 4 years ago

Issue does not only impact 7.x, it shows up when moving from 6.6.2 -> 6.7.0/6.8.x

bangejsans commented 4 years ago

The workaround alah64 mentioned works, but still impacts 7.6.

faf-xff commented 4 years ago

Facing the same issue here。

LuckyWindsck commented 4 years ago

Facing the same issue here

logstash --version
logstash 7.6.2

I tried to modify the code to print the backtrace of the exception, and I found that this line.

gem "logstash-core", :path => "./logstash-core"

# In line /usr/local/Cellar/logstash/7.6.2/libexec/Gemfile:5
# I installed logstash by homebrew.

It seems like that "./logstash-core" is the reason of the bug. I am not familiar with the source code, but I guess that Gemfile.template is the file responsible for it.

nicholas-cross-fujitsu commented 3 years ago

We have this in 7.10

farrp commented 3 years ago

We are having the same issue in 7.11.2. I see this has been opened almost a year without being assigned to anyone. It seems that @LuckyWindsck has supplied a pointer to the solution. When will this be fixed?

rquinnlv commented 3 years ago

Just ran into this issue as well, please reopen and fix

kaisecheng commented 3 years ago

Hi @rquinnlv the fix will deliver in v7.12.1 next week

VexVexVex commented 3 years ago

Hi, v7.12.1 actually introduced this error into our build process when it hadn't been present previously. Specifically when removing the lumberjack plugin to replace with a custom one.

kaisecheng commented 3 years ago

@VexVexVex Could you create an issue in Logstash with the version and the steps to reproduce the issue? Please tag me there and I will do a follow-up.

VexVexVex commented 3 years ago

@kaisecheng Sorry for the noise, after posting I figured out it was a false alarm on my part. Looks like y'all set the Gemfile to be 644 root and we were doing our plugin mods as logstash user. I fixed that and our process works fine now.