【问题标题】:asadmin create-domain fails: all ports are in useasadmin create-domain 失败:所有端口都在使用中
【发布时间】:2013-09-26 10:30:00
【问题描述】:

我正在尝试使用 asadmin 工具创建一个新域,但每次报告所有端口都在使用中时都会失败。操作系统是 Fedora 19。可能是什么问题?

$ ./bin/asadmin create-domain testdomain
Enter admin user name [Enter to accept default "admin" / no password]> 
Default port 4848 for Admin is in use. Using 52447
Default port 8080 for HTTP Instance is in use. Using 33934
Default port 7676 for JMS is in use. Using 33967
Default port 3700 for IIOP is in use. Using 34733
Default port 8181 for HTTP_SSL is in use. Using 52020
Default port 3820 for IIOP_SSL is in use. Using 46636
Default port 3920 for IIOP_MUTUALAUTH is in use. Using 39574
Default port 8686 for JMX_ADMIN is in use. Using 51770
Default port 6666 for OSGI_SHELL is in use. Using 41403
Default port 9009 for JAVA_DEBUGGER is in use. Using 60521
Port 52,447 is in use
CLI130 Could not create domain, testdomain
Command create-domain failed.

【问题讨论】:

  • @PawelVeselov 是的,你是对的。将他的答案标记为正确答案。太糟糕了,赏金无法重新分配。

标签: glassfish glassfish-3 fedora asadmin


【解决方案1】:

我遇到了同样的问题,最后发现我的主机名没有在 /etc/hosts 文件中配置。 asadmin 给出的错误在某种程度上具有误导性。 :-(

您可以通过以下方式检查您的主机名是否正确配置:

ping `hostname`

如果您收到“ping:未知主机”错误,您必须修复您的主机名。

以 root 身份登录并使用以下命令修复您的主机名:

hostname "<YOUR_HOSTNAME>"

并使其永久化

echo "<YOUR_HOSTNAME>" > /etc/hostname

您还必须检查您的 /etc/hosts 文件是否包含如下行:

127.0.0.1        <YOUR_HOSTNAME>

执行此操作后,您应该不会在使用 ping 时收到未知主机错误。

我从this问题的回复中得到了解决方案的想法。

【讨论】:

  • 这是正确的解决方案!有同样的问题。在 127.0.0.1 下添加了一个新主机名,它最初只定义了“localhost”。然后问题解决了!
【解决方案2】:

我也吃过一次。重新启动整个服务器后,可以再次设置端口。 我不知道是哪个,但我很确定某些服务正在阻止它,或者 glassfish 进程卡住了。

【讨论】:

  • 我不知道刚刚发生了什么。但是重新启动整个服务器确实有效。谢谢!
【解决方案3】:

当您创建一个新域时,您可以指定 portbase 参数。这样可以避免端口冲突。

$ ./bin/asadmin create-domain --portbase 10000 testDomain
Enter admin user name [Enter to accept default "admin" / no password]>
Using port 10048 for Admin.
Using port 10080 for HTTP Instance.
Using port 10076 for JMS.
Using port 10037 for IIOP.
Using port 10081 for HTTP_SSL.
Using port 10038 for IIOP_SSL.
Using port 10039 for IIOP_MUTUALAUTH.
Using port 10086 for JMX_ADMIN.
Using port 10066 for OSGI_SHELL.
Using port 10009 for JAVA_DEBUGGER.
[..]
Domain testDomain created.
Domain testDomain admin port is 10048.
Domain testDomain allows admin login as user "admin" with no password.
Command create-domain executed successfully.

见:http://docs.oracle.com/cd/E26576_01/doc.312/e24938/create-domain.htm

【讨论】:

    【解决方案4】:

    你可以跑

    netstat -anp | grep 52
    netstat -anp | grep 447 
    

    Fedora Project

    【讨论】:

    • 没有监听这些端口。
    猜你喜欢
    • 1970-01-01
    • 2013-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-07
    • 2020-10-06
    • 2017-01-11
    • 1970-01-01
    相关资源
    最近更新 更多