代码之家  ›  专栏  ›  技术社区  ›  Kimi

asadmin创建域失败:所有端口都在使用中

  •  7
  • Kimi  · 技术社区  · 11 年前

    我正试图用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.
    
    4 回复  |  直到 11 年前
        1
  •  9
  •   Community CDub    7 年前

    我遇到了同样的问题,最终发现我的主机名没有在/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 问题

        2
  •  2
  •   Nico Müller    11 年前

    我也有过一次。在重新启动整个服务器之后,可以再次设置端口。 我不知道是哪一个,但我很确定是有服务挡住了它,还是玻璃鱼的流程被卡住了。

        3
  •  2
  •   Marco Montel    10 年前

    创建新域时,可以指定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
  •  -1
  •   Bruno Novais    11 年前

    你可以跑步

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

    Fedora Project