# Filter Plugin - "Tried to load a plugin's code, but failed."

**URL:** <https://discuss.elastic.co/t/filter-plugin-tried-to-load-a-plugins-code-but-failed/259216>\
**Category:** Logstash\
**Created:** [December 21, 2020, 6:07am UTC](https://discuss.elastic.co/t/filter-plugin-tried-to-load-a-plugins-code-but-failed/259216 "2020-12-21T06:07:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)\
**Post date:** [December 21, 2020, 6:07am UTC](https://discuss.elastic.co/t/filter-plugin-tried-to-load-a-plugins-code-but-failed/259216/1 "2020-12-21T06:07:00Z")

</div>

Hi there,  
there is a logstash filter plugin called elapsed.

> **[Elapsed filter plugin | Logstash Reference \[7.8\] | Elastic](https://www.elastic.co/guide/en/logstash/7.8/plugins-filters-elapsed.html)**

  
I put (also) this into a config:  
elapsed {  
unique\_id\_field =\> "reqid"  
start\_tag =\> "TranBegin"  
end\_tag =\> "TranEnd"  
new\_event\_on\_match =\> false  
}  
and made just for a test:
## bin/logstash -f /home/m0001637/test/logstash-7.8.1/config/logstash2.conf --config.test\_and\_exit

The result was:  
[2020-12-21T06:55:20,407][ERROR][logstash.plugins.registry] Tried to load a plugin's code, but failed. {:exception=\>#\<LoadError: no such file to load -- logstash/filters/elapsed\>, :path=\>"logstash/filters/elapsed", :type=\>"filter", :name=\>"elapsed"}  
[2020-12-21T06:55:20,415][FATAL][logstash.runner] The given configuration is invalid. Reason: Unable to configure plugins: (PluginLoadingError) **Couldn't find any filter plugin named 'elapsed'**. Are you sure this is correct? Trying to load the elapsed filter plugin resulted in this error: no such file to load -- logstash/filters/elapsed  
[2020-12-21T06:55:20,419][ERROR][org.logstash.Logstash] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

Why so? Logst. could not find that filter, but such filter does exist if you see the documentation. I am running 7.8.1.

Any help is appraciated.  
Thanks.

---

<div class="post-metadata">

**Author:** ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)\
**Post date:** [December 21, 2020, 6:34am UTC](https://discuss.elastic.co/t/filter-plugin-tried-to-load-a-plugins-code-but-failed/259216/2 "2020-12-21T06:34:57Z")

</div>

Found the reason: it is not a deafult plugin.  
`bin/logstash-plugin install logstash-filter-elapsed`  
cheers

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 18, 2021, 6:34am UTC](https://discuss.elastic.co/t/filter-plugin-tried-to-load-a-plugins-code-but-failed/259216/3 "2021-01-18T06:34:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
