# Plugin script doesn't works fine(es 0.90.2)

**URL:** <https://discuss.elastic.co/t/plugin-script-doesnt-works-fine-es-0-90-2/12592>\
**Category:** Elasticsearch\
**Created:** [July 1, 2013, 2:36am UTC](https://discuss.elastic.co/t/plugin-script-doesnt-works-fine-es-0-90-2/12592 "2013-07-01T02:36:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zerocoolys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zerocoolys/32/44918_2.png) [@zerocoolys](https://discuss.elastic.co/u/zerocoolys)\
**Post date:** [July 1, 2013, 2:36am UTC](https://discuss.elastic.co/t/plugin-script-doesnt-works-fine-es-0-90-2/12592/1 "2013-07-01T02:36:11Z")

</div>

Hi all, I met a issue when using plugin script( for elasticsearch 0.90.2)

shell command:  
_./bin/plugin --url  
 [https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.2.zip](https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.2.zip)  
\*  
\*  
\*  
the output is:  
Usage:  
-u, --url [plugin location] : Set exact URL to download the  
plugin from  
-i, --install [plugin name] : Downloads and installs listed  
plugins [_]  
-r, --remove [plugin name] : Removes listed plugins  
-l, --list : List installed plugins  
-v, --verbose : Prints verbose messages  
-h, --help : Prints this help message

[\*] Plugin name could be:  
elasticsearch/plugin/version for official elasticsearch plugins  
(download from [download.elasticsearch.org](http://download.elasticsearch.org))  
groupId/artifactId/version for community plugins (download from  
maven central or oss sonatype)  
username/repository for site plugins (download from github  
master)

Message:  
Command [--url] unknown.

and I tested the "-u" parameter , the output is same.

I checked the code of _org.elasticsearch.plugins.PluginManager_  
\*  
\*  
the _main_ method contains 2 loops , the first one handle the "-u" ,"--url"  
and "-v",  
the second loop handle all the other commands except the "-u", the last  
if-else statements wll be ran when "-u" or "-url" is met.

if (command.equals("-i") || command.equals("--install")  
......  
} else if (command.equals("-r") || command.equals("--remove")  
......  
} else if (command.equals("-l") || command.equals("--list")) {  
......  
} else if (command.equals("-h") || command.equals("--help")) {  
} else {  
displayHelp("Command [" + args[c] + "] unknown.");  
// Unknown command. We break...  
System.exit(1);  
}

I compared the code from 0.90.1 to 0.90.2 , this code introduced only for  
0.90.2.

Please check if it is a code error or what I was doing wrong.

Many thanks,

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [July 1, 2013, 3:42am UTC](https://discuss.elastic.co/t/plugin-script-doesnt-works-fine-es-0-90-2/12592/2 "2013-07-01T03:42:54Z")

</div>

There was a commit regarding the plugin manager for 0.90.3, so I am  
assuming it is your issue:

> <https://github.com/elastic/elasticsearch/issues/3245>
>
> To reproduce try:
> 
> \> bin/plugin -v
> 
> \[...\]
> 
> Message:
> Command \[-v\] unknown.
> 
> Th…e problem is that in the main function the commands are cycled twice; the first time to check for url and verbose, the second time to check for the others. If the second time a command that is not install, remove, list or help is found, the application exits (but url and verbose were never filtered out from the list of commands).

You can always compile a local version of the PluginManager using the  
elasticsearch jar and running it with the class file first in your  
classpath.

--  
Ivan

On Sun, Jun 30, 2013 at 7:36 PM, zerocool [vbzerocool@gmail.com](mailto:vbzerocool@gmail.com) wrote:

> Hi all, I met a issue when using plugin script( for elasticsearch 0.90.2)
> 
> shell command:  
> _./bin/plugin --url  
> [https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.2.zip](https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.2.zip)  
> \*  
> \*  
> \*  
> the output is:  
> Usage:  
> -u, --url [plugin location] : Set exact URL to download the  
> plugin from  
> -i, --install [plugin name] : Downloads and installs listed  
> plugins [_]  
> -r, --remove [plugin name] : Removes listed plugins  
> -l, --list : List installed plugins  
> -v, --verbose : Prints verbose messages  
> -h, --help : Prints this help message
> 
> [\*] Plugin name could be:  
> elasticsearch/plugin/version for official elasticsearch plugins  
> (download from [download.elasticsearch.org](http://download.elasticsearch.org))  
> groupId/artifactId/version for community plugins (download from  
> maven central or oss sonatype)  
> username/repository for site plugins (download from github  
> master)
> 
> Message:  
> Command [--url] unknown.
> 
> and I tested the "-u" parameter , the output is same.
> 
> I checked the code of _org.elasticsearch.plugins.PluginManager_  
> \*  
> \*  
> the _main_ method contains 2 loops , the first one handle the "-u"  
> ,"--url" and "-v",  
> the second loop handle all the other commands except the "-u", the last  
> if-else statements wll be ran when "-u" or "-url" is met.
> 
> if (command.equals("-i") || command.equals("--install")  
> ......  
> } else if (command.equals("-r") || command.equals("--remove")  
> ......  
> } else if (command.equals("-l") || command.equals("--list")) {  
> ......  
> } else if (command.equals("-h") || command.equals("--help")) {  
> } else {  
> displayHelp("Command [" + args[c] + "] unknown.");  
> // Unknown command. We break...  
> System.exit(1);  
> }
> 
> I compared the code from 0.90.1 to 0.90.2 , this code introduced only for  
> 0.90.2.
> 
> Please check if it is a code error or what I was doing wrong.
> 
> Many thanks,
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 1, 2013, 5:14am UTC](https://discuss.elastic.co/t/plugin-script-doesnt-works-fine-es-0-90-2/12592/3 "2013-07-01T05:14:25Z")

</div>

Yeah. Ivan is right. This is the issue.

You can download the zip file and unzip it under plugins/jetty dir.

It will be loaded by elasticsearch when restarting.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 1 juil. 2013 à 05:42, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) a écrit :

> There was a commit regarding the plugin manager for 0.90.3, so I am assuming it is your issue: [PluginManager fails with unknown command when passing url or verbose parameters · Issue #3245 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/3245)
> 
> You can always compile a local version of the PluginManager using the elasticsearch jar and running it with the class file first in your classpath.
> 
> --  
> Ivan
> 
> On Sun, Jun 30, 2013 at 7:36 PM, zerocool [vbzerocool@gmail.com](mailto:vbzerocool@gmail.com) wrote:  
> Hi all, I met a issue when using plugin script( for elasticsearch 0.90.2)
> 
> shell command:  
> ./bin/plugin --url [https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.2.zip](https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.2.zip)
> 
> the output is:  
> Usage:  
> -u, --url [plugin location] : Set exact URL to download the plugin from  
> -i, --install [plugin name] : Downloads and installs listed plugins [\*]  
> -r, --remove [plugin name] : Removes listed plugins  
> -l, --list : List installed plugins  
> -v, --verbose : Prints verbose messages  
> -h, --help : Prints this help message
> 
> [\*] Plugin name could be:  
> elasticsearch/plugin/version for official elasticsearch plugins (download from [download.elasticsearch.org](http://download.elasticsearch.org))  
> groupId/artifactId/version for community plugins (download from maven central or oss sonatype)  
> username/repository for site plugins (download from github master)
> 
> Message:  
> Command [--url] unknown.
> 
> and I tested the "-u" parameter , the output is same.
> 
> I checked the code of org.elasticsearch.plugins.PluginManager
> 
> the main method contains 2 loops , the first one handle the "-u" ,"--url" and "-v",  
> the second loop handle all the other commands except the "-u", the last if-else statements wll be ran when "-u" or "-url" is met.
> 
> if (command.equals("-i") || command.equals("--install")  
> ......  
> } else if (command.equals("-r") || command.equals("--remove")  
> ......  
> } else if (command.equals("-l") || command.equals("--list")) {  
> ......  
> } else if (command.equals("-h") || command.equals("--help")) {  
> } else {  
> displayHelp("Command [" + args[c] + "] unknown.");  
> // Unknown command. We break...  
> System.exit(1);  
> }
> 
> I compared the code from 0.90.1 to 0.90.2 , this code introduced only for 0.90.2.
> 
> Please check if it is a code error or what I was doing wrong.
> 
> Many thanks,
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![zerocoolys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zerocoolys/32/44918_2.png) [@zerocoolys](https://discuss.elastic.co/u/zerocoolys)\
**Post date:** [July 1, 2013, 5:25am UTC](https://discuss.elastic.co/t/plugin-script-doesnt-works-fine-es-0-90-2/12592/4 "2013-07-01T05:25:59Z")

</div>

Thanks for you reply.

2013/7/1 Ivan Brusic [via Elasticsearch Users] \<  
[ml-node+s115913n4037291h92@n3.nabble.com](mailto:ml-node+s115913n4037291h92@n3.nabble.com)\>

> There was a commit regarding the plugin manager for 0.90.3, so I am  
> assuming it is your issue:  
> [PluginManager fails with unknown command when passing url or verbose parameters · Issue #3245 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/3245)
> 
> You can always compile a local version of the PluginManager using the  
> elasticsearch jar and running it with the class file first in your  
> classpath.
> 
> --  
> Ivan
> 
> On Sun, Jun 30, 2013 at 7:36 PM, zerocool \<[hidden email][http://user/SendEmail.jtp?type=node&node=4037291&i=0](http://user/SendEmail.jtp?type=node&node=4037291&i=0)
> 
> > wrote:
> 
> > Hi all, I met a issue when using plugin script( for elasticsearch 0.90.2)
> > 
> > shell command:  
> > _./bin/plugin --url  
> > [https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.2.zip](https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.2.zip)  
> > \*  
> > \*  
> > \*  
> > the output is:  
> > Usage:  
> > -u, --url [plugin location] : Set exact URL to download the  
> > plugin from  
> > -i, --install [plugin name] : Downloads and installs listed  
> > plugins [_]  
> > -r, --remove [plugin name] : Removes listed plugins  
> > -l, --list : List installed plugins  
> > -v, --verbose : Prints verbose messages  
> > -h, --help : Prints this help message
> > 
> > [\*] Plugin name could be:  
> > elasticsearch/plugin/version for official elasticsearch plugins  
> > (download from [download.elasticsearch.org](http://download.elasticsearch.org))  
> > groupId/artifactId/version for community plugins (download from  
> > maven central or oss sonatype)  
> > username/repository for site plugins (download from github  
> > master)
> > 
> > Message:  
> > Command [--url] unknown.
> > 
> > and I tested the "-u" parameter , the output is same.
> > 
> > I checked the code of _org.elasticsearch.plugins.PluginManager_  
> > \*  
> > \*  
> > the _main_ method contains 2 loops , the first one handle the "-u"  
> > ,"--url" and "-v",  
> > the second loop handle all the other commands except the "-u", the last  
> > if-else statements wll be ran when "-u" or "-url" is met.
> > 
> > if (command.equals("-i") || command.equals("--install")  
> > ......  
> > } else if (command.equals("-r") || command.equals("--remove")  
> > ......  
> > } else if (command.equals("-l") || command.equals("--list")) {  
> > ......  
> > } else if (command.equals("-h") || command.equals("--help")) {  
> > } else {  
> > displayHelp("Command [" + args[c] + "] unknown.");  
> > // Unknown command. We break...  
> > System.exit(1);  
> > }
> > 
> > I compared the code from 0.90.1 to 0.90.2 , this code introduced only for  
> > 0.90.2.
> > 
> > Please check if it is a code error or what I was doing wrong.
> > 
> > Many thanks,
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [hidden email][http://user/SendEmail.jtp?type=node&node=4037291&i=1](http://user/SendEmail.jtp?type=node&node=4037291&i=1)  
> > .
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [hidden email][http://user/SendEmail.jtp?type=node&node=4037291&i=2](http://user/SendEmail.jtp?type=node&node=4037291&i=2)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> * * *
> 
> If you reply to this email, your message will be added to the discussion  
> below:
> 
> [http://elasticsearch-users.115913.n3.nabble.com/plugin-script-doesn-t-works-fine-es-0-90-2-tp4037289p4037291.html](http://elasticsearch-users.115913.n3.nabble.com/plugin-script-doesn-t-works-fine-es-0-90-2-tp4037289p4037291.html)  
> To start a new topic under Elasticsearch Users, email  
> [ml-node+s115913n115913h74@n3.nabble.com](mailto:ml-node+s115913n115913h74@n3.nabble.com)  
> To unsubscribe from Elasticsearch Users, click here[http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe\_by\_code&node=115913&code=dmJ6ZXJvY29vbEBnbWFpbC5jb218MTE1OTEzfDk1NDU4NzMxMA==](http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=115913&code=dmJ6ZXJvY29vbEBnbWFpbC5jb218MTE1OTEzfDk1NDU4NzMxMA==)  
> .  
> NAML[http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro\_viewer&id=instant\_html!nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify\_subscribers!nabble%3Aemail.naml-instant\_emails!nabble%3Aemail.naml-send\_instant\_email!nabble%3Aemail.naml](http://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml)

--  
Jason You @Chengdu China

---

<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:** [July 6, 2017, 2:28am UTC](https://discuss.elastic.co/t/plugin-script-doesnt-works-fine-es-0-90-2/12592/5 "2017-07-06T02:28:51Z")

</div>

Closed on July 6, 2017, 2:28am UTC


