【问题标题】:Vapor Connection refused (errno 61)蒸汽连接被拒绝 (errno 61)
【发布时间】:2019-08-07 20:52:48
【问题描述】:

我在尝试运行我的 Vapor 3 应用程序时看到以下错误:

线程 1:致命错误:在顶层引发错误:NIO.ChannelError.connectFailed(NIO.NIOConnectionError(host: "127.0.0.1", port: 3306, dnsAError: nil, dnsAAAAError: nil, connectionErrors: [NIO. SingleConnectionFailure(target: [IPv4]127.0.0.1/127.0.0.1:3306, error: connection reset (error set): Connection refused (errno: 61))]))

它曾经工作得很好。
我能做什么?

【问题讨论】:

  • 我在尝试连接主机名时遇到这种错误,但应该使用套接字文件 - 有一个 init 需要 unixDomainSocketPath

标签: swift vapor


【解决方案1】:

可能是数据库服务器尚未运行。

对于 MySQL,打开终端并运行命令:

$ mysql.server start

对于 Postgres,请执行以下操作:

$ brew services start postgres

然后,再次尝试运行该项目。它现在应该又可以工作了:)


取自here

【讨论】:

    猜你喜欢
    • 2011-08-02
    • 2014-09-28
    • 1970-01-01
    • 2017-04-10
    • 2013-02-24
    • 1970-01-01
    • 2017-12-15
    • 2014-03-01
    • 2012-09-24
    相关资源
    最近更新 更多