【问题标题】:rogue postgres process running after boot引导后运行的流氓 postgres 进程
【发布时间】:2014-07-14 23:21:55
【问题描述】:

在将原来的 postgres 安装替换为 homebrew 安装后,我遇到了 postgres 问题。

启动后,如果我发出 psql 命令,我会得到:

psql: 无法连接到服务器: 没有这样的文件或目录是 服务器在本地运行并接受 Unix 域上的连接 套接字“/tmp/.s.PGSQL.5432”?

如果我跑:

ps auxwww | grep postgres

我得到了这个奇怪的输出:

paulcowan 2829 0.0 0.0 2432784 540 s000 R+ 9:17am 0:00.00 grep postgres

如果我跑步:

ps -ef | grep postgres

我明白了:

501 2842 1040 0 9:19am ttys000 0:00.00 grep postgres

如果我然后运行:

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

一切都开始了。

我试图让 postgres 在登录时启动,然后输入以下命令:

 ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents

接下来是:

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

我收到此错误:

launchctl: 不能 stat("/Users/paulcowan/Library/LaunchAgents/homebrew.mxcl.postgresql.plist"): 没有找到可以加载的文件或目录

【问题讨论】:

  • 您使用的是哪个操作系统?
  • @a_horse_with_no_name Mac OS X - 只有 launchd 的东西

标签: macos postgresql


【解决方案1】:

您正在通过 grep 管道输出 ps,而 grep 正在寻找自己,因为 grep 的可见命令行包含正在搜索的字符串。一点都不奇怪。

没有恶意 PostgreSQL 进程。

【讨论】:

  • +1,这也是我所说的。
【解决方案2】:

这不是 postgresql 问题的接缝。它与 linux 相关,特别是与您的平台相关。

不过,请看一下默认的 postgresql 安装。根据 linux 风格,/etc/init.d/lib/systemd 中有不同的启动脚本

【讨论】:

    猜你喜欢
    • 2016-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-12
    • 1970-01-01
    • 2012-06-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多