You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行jboss-cli.sh连接失败:localhost:9990控制器不可用求助

解决JBoss CLI连接localhost:9990超时问题

错误信息

Failed to connect to the controller: The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0023: Could not connect to remote+http://localhost:9990. The connection timed out: WFLYPRT0023: Could not connect to remote+http://localhost:9990. The connection timed out

排查与解决步骤

  • 检查JBoss服务状态
    执行系统命令确认JBoss进程是否运行:

    ps aux | grep jboss
    # 或使用systemd管理的服务
    systemctl status jboss
    

    若服务未启动,先启动对应模式的JBoss:

    # 独立模式
    ./standalone.sh
    # 域模式
    ./domain.sh
    
  • 验证9990端口监听状态
    检查端口是否被JBoss进程占用监听:

    netstat -tulpn | grep 9990
    # 或使用ss命令
    ss -tulpn | grep 9990
    

    若端口未监听,打开standalone.xml或domain.xml,检查<management-interfaces>下的http-interface配置,确保端口为9990且绑定地址为0.0.0.0或localhost。

  • 排查防火墙/安全组拦截
    临时关闭本地防火墙测试:

    # CentOS/RHEL
    systemctl stop firewalld
    # Ubuntu
    ufw disable
    

    测试通过后,添加永久端口允许规则:

    firewall-cmd --add-port=9990/tcp --permanent && firewall-cmd --reload
    
  • 显式指定连接参数
    若默认配置异常,显式指定地址、端口及认证信息(若开启):

    # 基础指定地址端口
    ./jboss-cli.sh --connect controller=localhost:9990
    # 带认证的连接
    ./jboss-cli.sh --connect controller=localhost:9990 --user=admin --password=your_password
    
  • 检查本地网络解析
    确认localhost解析正常,或直接用127.0.0.1替代localhost尝试:

    ping localhost
    # 用127.0.0.1连接
    ./jboss-cli.sh --connect controller=127.0.0.1:9990
    

    同时检查是否存在代理环境变量干扰,临时取消后测试:

    unset http_proxy https_proxy
    

内容的提问来源于stack exchange,提问作者Sahil Dutta

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 00:59:53