sct-snapshot-rest-api icon indicating copy to clipboard operation
sct-snapshot-rest-api copied to clipboard

Bitnami on Azure

Open johnmeredith opened this issue 6 years ago • 5 comments

Getting errors via Azure when trying to run:

bitnami@snoflakey:~/sct-snapshot-rest-api$ node app.js
Master cluster setting up 1 workers...
fs.js:101
      throw err;  // Forgot a callback but don't know where? Use NODE_DEBUG=fs
      ^

Error: EACCES: permission denied, open '/var/sct-snapshot-rest-api.pid'
    at Error (native)
bitnami@snoflakey:~/sct-snapshot-rest-api$ fs.js:101
      throw err;  // Forgot a callback but don't know where? Use NODE_DEBUG=fs
      ^

Error: EACCES: permission denied, open '/var/sct-snapshot-rest-api.pid'
    at Error (native)

johnmeredith avatar Nov 27 '17 16:11 johnmeredith

We've not tried to run it on Azure, but have it running on standard ubuntu builds with node.js versions v4.4.2 and above. Never seen this error before. How have you configured it to run?

rorydavidson avatar Nov 27 '17 16:11 rorydavidson

Literally just installed it as per the instructions. I have had issues with Azure in terms of load balancers before but not sure what is going on here. John

From: Rory Davidson [mailto:[email protected]] Sent: 27 November 2017 16:52 To: IHTSDO/sct-snapshot-rest-api [email protected] Cc: John Meredith (NWIS - Applications Design) [email protected]; Author [email protected] Subject: Re: [IHTSDO/sct-snapshot-rest-api] Bitnami on Azure (#27)

We've not tried to run it on Azure, but have it running on standard ubuntu builds with node.js versions v4.4.2 and above. Never seen this error before. How have you configured it to run?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/IHTSDO/sct-snapshot-rest-api/issues/27#issuecomment-347245312, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQ9XG92CsH0SAPGkI4O3OMfqIaPMjS1Mks5s6uiSgaJpZM4Qr8Rr.

johnmeredith avatar Nov 27 '17 16:11 johnmeredith

Shooting in the dark here... does the user you are running it under have permissions to read /var ? That seems to be the reason for the exception.

rorydavidson avatar Nov 27 '17 16:11 rorydavidson

There’s only one user setup that I am assuming is admin…? Maybe you are right.

From: Rory Davidson [mailto:[email protected]] Sent: 27 November 2017 16:59 To: IHTSDO/sct-snapshot-rest-api [email protected] Cc: John Meredith (NWIS - Applications Design) [email protected]; Author [email protected] Subject: Re: [IHTSDO/sct-snapshot-rest-api] Bitnami on Azure (#27)

Shooting in the dark here... does the user you are running it under have permissions to read /var ? That seems to be the reason for the exception.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/IHTSDO/sct-snapshot-rest-api/issues/27#issuecomment-347248278, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQ9XG8aw2Q_GKj5VwmeUjBA6D0019Nclks5s6upxgaJpZM4Qr8Rr.

johnmeredith avatar Nov 27 '17 17:11 johnmeredith

I had the same /var privledges issue. The app started with a sudo node app.js though.

Master cluster setting up 4 workers...
(node:54026) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
fs.js:113
      throw err;  // Forgot a callback but don't know where? Use NODE_DEBUG=fs
      ^

Error: EACCES: permission denied, open '/var/sct-snapshot-rest-api.pid'
Shanes-MacBook-Pro-6:sct-snapshot-rest-api mm_shane$ (node:54029) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:54028) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
fs.js:113
      throw err;  // Forgot a callback but don't know where? Use NODE_DEBUG=fs
      ^

Error: EACCES: permission denied, open '/var/sct-snapshot-rest-api.pid'
fs.js:113
      throw err;  // Forgot a callback but don't know where? Use NODE_DEBUG=fs
      ^

Error: EACCES: permission denied, open '/var/sct-snapshot-rest-api.pid'
(node:54027) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
fs.js:113
      throw err;  // Forgot a callback but don't know where? Use NODE_DEBUG=fs
      ^

Error: EACCES: permission denied, open '/var/sct-snapshot-rest-api.pid'
(node:54030) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
fs.js:113
      throw err;  // Forgot a callback but don't know where? Use NODE_DEBUG=fs
      ^

Error: EACCES: permission denied, open '/var/sct-snapshot-rest-api.pid'

Shanes-MacBook-Pro-6:sct-snapshot-rest-api mm_shane$ sudo node app.js 
Password:
Master cluster setting up 4 workers...
(node:54041) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
Connected to server/resources db.
Worker 54042 is online
Worker 54043 is online
Worker 54045 is online
Worker 54044 is online
(node:54044) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
Process 54044 is listening in port 3000 to all incoming requests
(node:54042) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
Connected to server/resources db.
(node:54045) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
Process 54042 is listening in port 3000 to all incoming requests
Connected to server/resources db.
Process 54045 is listening in port 3000 to all incoming requests
(node:54043) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
Connected to server/resources db.
Process 54043 is listening in port 3000 to all incoming requests
Connected to server/resources db.
express deprecated res.send(status, body): Use res.status(status).send(body) instead app.js:87:13
express deprecated res.send(status, body): Use res.status(status).send(body) instead app.js:87:13
express deprecated res.send(status, body): Use res.status(status).send(body) instead app.js:99:9
express deprecated res.send(status, body): Use res.status(status).send(body) instead app.js:99:9
GET /socket.io/?EIO=3&transport=polling&t=M6qR2dk 500 5.738 ms - 1119
GET /socket.io/?EIO=3&transport=polling&t=M6qR2dj 500 5.859 ms - 1119
RangeError: Invalid status code: error
    at ServerResponse.writeHead (_http_server.js:190:11)
    at ServerResponse.writeHead (/Users/mm_shane/sct-snapshot-rest-api/node_modules/on-headers/index.js:55:19)
    at ServerResponse._implicitHeader (_http_server.js:181:8)
    at write_ (_http_outgoing.js:635:9)
    at ServerResponse.end (_http_outgoing.js:754:5)
    at ServerResponse.send (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/response.js:211:10)
    at ServerResponse.json (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/response.js:256:15)
    at ServerResponse.send (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/response.js:158:21)
    at /Users/mm_shane/sct-snapshot-rest-api/app.js:99:9
    at Layer.handle_error (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/router/layer.js:71:5)
RangeError: Invalid status code: error
    at ServerResponse.writeHead (_http_server.js:190:11)
    at ServerResponse.writeHead (/Users/mm_shane/sct-snapshot-rest-api/node_modules/on-headers/index.js:55:19)
    at ServerResponse._implicitHeader (_http_server.js:181:8)
    at write_ (_http_outgoing.js:635:9)
    at ServerResponse.end (_http_outgoing.js:754:5)
    at ServerResponse.send (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/response.js:211:10)
    at ServerResponse.json (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/response.js:256:15)
    at ServerResponse.send (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/response.js:158:21)
    at /Users/mm_shane/sct-snapshot-rest-api/app.js:99:9
    at Layer.handle_error (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/router/layer.js:71:5)
express deprecated res.send(status, body): Use res.status(status).send(body) instead app.js:87:13
express deprecated res.send(status, body): Use res.status(status).send(body) instead app.js:87:13
express deprecated res.send(status, body): Use res.status(status).send(body) instead app.js:99:9
express deprecated res.send(status, body): Use res.status(status).send(body) instead app.js:99:9
GET /socket.io/?EIO=3&transport=polling&t=M6qR5Zz 500 5.774 ms - 1119
RangeError: Invalid status code: error
    at ServerResponse.writeHead (_http_server.js:190:11)
    at ServerResponse.writeHead (/Users/mm_shane/sct-snapshot-rest-api/node_modules/on-headers/index.js:55:19)
    at ServerResponse._implicitHeader (_http_server.js:181:8)
    at write_ (_http_outgoing.js:635:9)
    at ServerResponse.end (_http_outgoing.js:754:5)
    at ServerResponse.send (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/response.js:211:10)
    at ServerResponse.json (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/response.js:256:15)
    at ServerResponse.send (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/response.js:158:21)
    at /Users/mm_shane/sct-snapshot-rest-api/app.js:99:9
    at Layer.handle_error (/Users/mm_shane/sct-snapshot-rest-api/node_modules/express/lib/router/layer.js:71:5)

Shane-Neeley avatar Feb 20 '18 18:02 Shane-Neeley