【问题标题】:Raspbian / Mercure - bind: permission deniedRaspbian / Mercure - 绑定:权限被拒绝
【发布时间】:2021-12-27 17:07:58
【问题描述】:

我正在尝试在我的 Raspbian 上运行 Mercure。

第一: 我尝试使用 mercure-legacy_0.13.0_Linux_armv6.tar.gz 使用以下命令运行mercure

JWT_KEY='example'; ADDR='localhost:3000'; DEMO='1'; ALLOW_ANO NYMOUS='1'; CORS_ALLOWED_ORIGINS='*'; PUBLISH_ALLOWED_ORIGINS='*'; PUBLISHER_JWT_KEY='example' ./mercure run

它返回:

"msg":"Unexpected error","error":"listen tcp :80: bind: permission denied"

第二:我尝试使用 mercure_0.13.0_Linux_armv6.tar.gz 使用以下命令运行 Mercure

MERCURE_PUBLISHER_JWT_KEY='!ChangeMe!' MERCURE_SUBSCRIBER_JWT _KEY='!ChangeMe!' ./mercure run

球童档案:

 {
    {$GLOBAL_OPTIONS}
}

{
    auto_https off
}

{$SERVER_NAME:localhost}

log

route {
    encode zstd gzip

    mercure {
        # Transport to use (default to Bolt)
        transport_url {$MERCURE_TRANSPORT_URL:bolt://mercure.db}
        # Publisher JWT key
        publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG}
        # Subscriber JWT key
        subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG}
        # Extra directives
        {$MERCURE_EXTRA_DIRECTIVES}
    }

    respond /healthz 200

    respond "Not Found" 404
}

它返回:

run: loading initial config: loading new config: http app module: start: tcp: listening on :443: listen tcp :443: bind: permission denied


谁能提供解决方案:我打算在同一个 Raspberrry 上使用 apache2 将我的 symfony 项目托管在 Web 服务器上

【问题讨论】:

    标签: symfony raspbian mercure


    【解决方案1】:

    我不知道这个特定的应用程序,但你的错误信息:

    listen tcp :80: bind: permission denied
    

    可能与端口 80 和 443 的限制有关(第二条消息) - 非 root 用户不能在标准 Linux 配置上使用低于 1024 的端口。尝试使用不同的端口或(如果您不关心安全性 - 即本地爱好项目)以 root 身份运行应用程序。

    请记住,您可以将 Nginx 作为反向代理运行,因此您可以在标准用户的任何高端口(如 3000)上运行您的应用程序。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-23
      • 2014-07-22
      • 1970-01-01
      • 1970-01-01
      • 2019-07-08
      • 2015-08-30
      相关资源
      最近更新 更多