我有一个非常奇怪的问题,似乎在互联网上的任何地方都不存在...我正在按照指南安装应用程序,我需要“为 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.
最佳答案
原来我从指南中复制的文本有些困惑。破折号不是普通的破折号,它们是特殊字符“–”(看起来与终端中的正常减号相同!) 并将选项解释为常规文本,因此看起来每个选项实际上都是一个运算符。
关于linux - Glassfish - bin/asadmin create-network-listener 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43387431/