Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js PostgreSQL用户没有密码的环回数据源的JSON模式是什么?_Node.js_Angular_Postgresql_Loopback - Fatal编程技术网

Node.js PostgreSQL用户没有密码的环回数据源的JSON模式是什么?

Node.js PostgreSQL用户没有密码的环回数据源的JSON模式是什么?,node.js,angular,postgresql,loopback,Node.js,Angular,Postgresql,Loopback,环回:我正在尝试使用以下数据源通过CentOS中的数据源文件连接到DB to API: { "db": { "name": "db", "connector": "memory" }, "apidb": { "host": "localhost", "port": 5432, "url": "postgres://postgres@localhost/apidb", "database": "apidb", "password

环回:我正在尝试使用以下数据源通过CentOS中的数据源文件连接到DB to API:

{
  "db": {
    "name": "db",
    "connector": "memory"
  },
  "apidb": {
    "host": "localhost",
    "port": 5432,
    "url": "postgres://postgres@localhost/apidb",
    "database": "apidb",
     "password": "",
    "name": "apidb",
    "user": "postgres",
    "connector": "postgresql"
  }
}
我尝试了多次连接,但出现了一个错误:

Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer
Connection fails: error: Ident authentication failed for user "postgres"
It will be retried for the next request.
events.js:183
      throw er; // Unhandled 'error' event
      ^

error: Ident authentication failed for user "postgres"
当我输入
su-postgres
时,我可以毫无问题地进入bash。我有一个db名称
apidb
,我想连接到它。到目前为止,我试过:

  • 删除密码密钥
  • 将url固定在不同的结构中(例如:postgres://postgres:@本地主机:5432/apidb
  • 结果。正在更新pg安装的位置
  • 下面是“DB在列出时的外观:

     apidb| postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres   
           +
                 |          |          |             |             | postgres=CTc/po
    stgres +
    
    我不再确定错误来自何处。帮助!

    要求您的操作系统用户名与您希望连接的PostgreSQL用户名匹配。如果不是这样,您需要选择其他身份验证方法,或者提供一个pg_ident.conf,将操作系统用户映射到允许的PostgreSQL用户。如果您打算如果使用ident,则它不适用于您,请查看PostgreSQL server日志文件,查看它提供的有关故障的信息