Glassfish - bin/asadmin create-network-listener is failing



我有一个非常奇怪的问题,似乎在互联网上的任何地方都不存在......我正在按照指南安装应用程序,我需要"为 AJP 连接创建新的 HTTP 侦听器"。我需要使用命令行而不是进入管理控制台,以便可以自动化...

这是我尝试运行的命令:

vagrant@ubuntu-1404:/home/glassfish$ sudo /home/glassfish/bin/asadmin create-network-listener –-address 127.0.0.1 --protocol http-listener-1 --listenerport 8009 --jkenabled true http-listener-ajp1

然后,它要求输入以下输入

Enter the value for the listenerport option> 8009
Enter the value for the protocol option>  http-listener-1

然后打印以下错误:

Command create-network-listener only accepts one operand
Usage: asadmin [asadmin-utility-options] create-network-listener
[--address <address>] --listenerport <listenerport>
[--threadpool <threadpool(default:http-thread-pool)>]
--protocol <protocol> [--transport <transport(default:tcp)>]
[--enabled[=<enabled(default:true)>]]
[--jkenabled[=<jkenabled(default:false)>]]
[--target <target(default:server)>] [-?|--help[=<help(default:false)>]]
name
Command create-network-listener failed.

所以我用以下命令(未指定任何选项)重试:

vagrant@ubuntu-1404:/home/glassfish$ sudo /home/glassfish/bin/asadmin create-network-listener http-listener-ajp1
Enter the value for the listenerport option> 8009
Enter the value for the protocol option>  http-listener-1

并得到此错误:

remote failure: The specified protocol  http-listener-1 is not yet configured
Command create-network-listener failed.

事实证明,我从指南中复制的文本有些混乱......破折号不是普通的破折号,它们是特殊字符"-"(看起来与终端中的正常减号相同!)并且它将选项解释为常规文本,因此看起来每个选项实际上都是一个运算符。

相关内容

最新更新