Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pm2 error #5680

Open
darkii321 opened this issue Mar 16, 2021 · 1 comment
Open

Pm2 error #5680

darkii321 opened this issue Mar 16, 2021 · 1 comment
Labels

Comments

@darkii321
Copy link

0|server | at Function.Module._load (internal/modules/cjs/loader.js:498:3)
0|server | at Object. (/usr/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js:28:21)
0|server | at Module._compile (internal/modules/cjs/loader.js:654:30)
0|server | at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
0|server | at Module.load (internal/modules/cjs/loader.js:566:32)
0|server | at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
0|server | at Function.Module._load (internal/modules/cjs/loader.js:498:3)
0|server | at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
0|server | at startup (internal/bootstrap/node.js:201:19)
0|server | at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
0|server | errno: 'EADDRINUSE',
0|server | code: 'EADDRINUSE',
0|server | syscall: 'listen',
0|server | address: '::',
0|server | port: 8080 }


Filesystem Size Used Avail Use% Mounted on
/dev/ploop58759p1 20G 2.2G 17G 12% /
none 512M 0 512M 0% /sys/fs/cgroup
none 512M 0 512M 0% /dev
tmpfs 512M 0 512M 0% /dev/shm
tmpfs 512M 1.1M 511M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
none 512M 0 512M 0% /run/shm


node -v
v9.11.2

pm2 -v
4.5.5


server.js

/** @namespace socket.decoded_token /
const cors = require('cors')();
const express = require('express');
const app = express();
app.enable('trust proxy');
require('dotenv').config();
const bluebird = require('bluebird');
global.fs = bluebird.promisifyAll(require("fs"));
const bodyParser = require('body-parser');
global.riderPrefix = "rider";
global.driverPrefix = "driver";
global.publicDir = __dirname + "/public/";
global.mysql = require('./models/mysql');
global.baseData = [];
global.serviceTree = [];
global.drivers = {};
global.riders = {};
app.use(cors);
app.options('
', cors);
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
app.use('/img', express.static(__dirname + "/public/img"));
app.use(require("./libs/express-router"));
let server = require('http').createServer(app);
const io = require("socket.io").listen(server);
global.operatorsNamespace = require("./libs/operator")(io);
require("./libs/client")(io);
require('./libs/update-handler').init();
process.on('unhandledRejection', r => console.log(r));
server.listen(process.env.MAIN_PORT, function () {
console.log("Listening on " + process.env.MAIN_PORT);
});

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant