我有一个很奇怪的问题似乎在网上任何地方都不存在.我遵循一个安装应用程序的指南,我需要“为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.发布于 2017-04-13 20:06:17
原来我从指南上抄来的课文有点乱七八糟。破折号不是普通的破折号,它们是特殊字符‘-’(它看起来与终端中的正常减号相同!)它将选项解释为常规文本,因此看起来每个选项实际上都是一个操作符。
https://stackoverflow.com/questions/43387431
复制相似问题