PM2 EPERM,呼叫initgroups上不允许操作

时间:2018-01-23 14:49:26

标签: node.js linux ubuntu-16.04 pm2

我在全球范围内安装了pm2 sudo pm2 install -g pm2 start server.js

pm2 status(给出此输出) ┌──────────┬────┬──────┬───────┬────────┬───────── ┬────────┬─────┬───────────┬─────────┬──────────┐ │应用程序名称│id│模式│pid│状态│重启│正常运行时间│cpu│mem│用户│观看│ ├──────────┼────┼──────┼───────┼────────┼───────── ┼────────┼─────┼───────────┼─────────┼──────────┤ │服务器│0│前叉│10094│在线│0│85s│0%│44.7MB│ubuntu│残疾人│ └──────────┴────┴──────┴───────┴────────┴───────── ┴────────┴─────┴───────────┴─────────┴──────────┘< / p>

当pm2 log 0时 我们得到以下错误

1 |服务器| 2018-01-23 14:35 + 00:00:2018年1月23日星期二14:35:03 GMT zap2it:服务器服务器现在在localhost上运行:4040

1 |服务器| 2018-01-23 14:35 + 00:00:2018年1月23日星期二14:35:03 GMT zap2it:服务器产卵工人#53

1 |服务器| 2018-01-23 14:35 +00:00:EPERM,呼叫initgroups上不允许操作

1 |服务器| 2018-01-23 14:35 +00:00:无法访问ubuntu

我需要什么权限才能运行pm2或在哪里可以查找错误? 我可以使用root安装和运行pm2吗?

2 个答案:

答案 0 :(得分:1)

可以在#!/usr/bin/python from google.cloud import bigquery import pprint import argparse import sys from apiclient.discovery import build def export_data_to_gcs(dataset_id, table_id, destination): bigquery_client = bigquery.Client(project='XXXXXXXX-web-data') dataset_ref = bigquery_client.dataset(dataset_id) table_ref = dataset_ref.table(table_id) job = bigquery_client.extract_table(table_ref, destination) job.result() # Waits for job to complete print('Exported {}:{} to {}'.format( dataset_id, table_id, destination)) export_data_to_gcs('2XXXX842', 'ga_sessions_201XXXXX', 'gs://analytics-to- deci/file-name.json') 找到PM2日志,您应该可以使用root安装和运行它,但不建议这样做(如http://jasonagents.blogspot.com.br/2015/09/exemplo-de-integracao-com-interface.html的评论中所述)。

我刚刚遇到了与你前面相同的问题和错误消息 - 尽管没有运行带有<HOME>/.pm2/logs/的PM2 - 并且通过更新PM2版本(从2.9.2到2.9.3)解决了这个问题,由savior123

评论

答案 1 :(得分:0)

你必须执行pm2更新,如:
sudo npm install -g pm2
pm2更新
pm2 start server.js