Questions tagged [node.js]

Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications. NOTE: Please read the Tag-Wiki before asking questions.

413 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
2k views

nginx sticky sessions / ip_hash with Socket.io

I am to be load balancing two node.js/Socket.io instances on different boxes with nginx running a simple notifications service with a retroactive event for new clients. I don't think there will be ...
bdls's user avatar
  • 181
5 votes
0 answers
2k views

Streaming proxied responses with gzip on nginx

I have an nginx reverse proxy in front of a node.js backend server. In my node app, I am able to stream responses as they become ready, so that the client can start downloading resources referenced in ...
Dominic P's user avatar
  • 497
5 votes
0 answers
1k views

Node.js Server with PM2 Crashing with error ENOMEM - but no memory leak

I have an EC2 instance running a node.js server (Express based). After deploying in a new environment, my service had started crashing almost instantly with spawn ENOMEM Errors like this one: ...
Selfish's user avatar
  • 151
4 votes
0 answers
3k views

Nginx, PM2, Node - No 'Access-Control-Allow- Origin' header

I have developed NodeJS server ran with express. I use PM2 to manage the application and then nginx to proxy requests to the application. My Express application has CORS, CSP etc set up. But, the ...
BugHunterUK's user avatar
4 votes
1 answer
4k views

Azure App Service on Linux or Windows

I want to run a Node.js API on an Azure App Service. I have the options of Azure App Service on Linux or Windows. What are the arguments for choosing one over the other?
lox's user avatar
  • 167
4 votes
1 answer
687 views

Debugging Node.js disk I/O and CPU spikes

I'm running a Node/Meteor/Mongo app on Ubuntu (on a Digital Ocean 1GB droplet), and I've been seeing some weird disk I/O spikes, which are then followed by CPU spikes: I was wondering: If that ...
Sacha's user avatar
  • 141
4 votes
0 answers
272 views

What does Process/CPU metric in atop really mean?

I've been using the excellent atop for reviewing load test impact in detail, and the distinction between the SystemLevel/CPU metric in the top (system-wide) section and the ProcessLevel/CPU metric in ...
Dave Gregory's user avatar
4 votes
1 answer
3k views

SSL - Apache and Node.js on the same Amazon EC2 instance

I hosted my website on an EC2 instance, using Apache. SSL was also set up properly, running on HTTPS, port 443. Currently, I just added a chat application to the website using Node.js + socket.io. ...
Danh Nguyen's user avatar
4 votes
0 answers
9k views

Nginx websocket 502 bad gateway

I'm trying to use nginx as proxy for websocket nodejs server, but I'm always getting 502 bad gateway. my domain config: upstream server { server 127.0.0.1:8090; } server { listen 8085; ...
zajca's user avatar
  • 203
4 votes
0 answers
285 views

Monit will not start my node js app

I have a problem with Monit that I use for monitoring of my Node.js app. I just moved from a single core machine to a multi core one. On both of them I run Ubuntu 11.10. On the old one this was ...
Buzz's user avatar
  • 41
4 votes
1 answer
1k views

How to deploy Node.js in cloud for high availability using multi-core, reverse-proxy, and SSL

I have posted this to ServerFault, but the Node.js community seems tiny there, so I'm hoping this bring more exposure. I have a Node.js (0.4.9) application and am researching how to best deploy and ...
Chris F's user avatar
  • 141
3 votes
0 answers
4k views

Nginx proxy_pass "Cannot GET", while desired domain displays normally

Here's my issue: I'm trying to do a proxy_pass at "/" (located at test.co) to a separate domain - webflow.test.co - while all other requests "/(.+)" go to my nodejs server. Unfortunately, with my ...
Ryan Spicer's user avatar
3 votes
2 answers
2k views

nginx as proxy for WebSocket: inspect and block certain requests

I ran NodeJS as a kind of Webapplication Server serving an AngularJS frontend. They communicate solely over WebSockets, using the SailsJS implementation of Socket.IO. Between frontend (client) and the ...
cis's user avatar
  • 247
3 votes
0 answers
172 views

Should I move Node.js to a separate server, or host it together with LNMP?

I wanted to add some features to my site which would require using Node.js over websockets. So my options are: Install Node on a separate VPS; Install Node on the same server where my websites are. ...
ᴍᴇʜᴏᴠ's user avatar
3 votes
0 answers
2k views

Setting up a reverse proxy from Apache to Node.js

I am attempting to setup a reverse proxy from Apache to a Node.js/Express.js app listening on port 8000. This server has cpanel installed but I have ssh access and pretty much ignore cpanel. I added ...
Ava's user avatar
  • 131
3 votes
0 answers
2k views

Nginx Reverse Proxy File Upload Failure

I am running Nginx v1.8.0 to serve all my static files and node.js to do the dynamic stuff. One of the things Nginx needs to do is proxy files over to node.js which stores the file. node.js seems to ...
Nicholas J Ingrassellino's user avatar
3 votes
0 answers
808 views

Openshift not installing node modules

I have a production pipeline of local code pushed via git to Wercker (a continuous delivery platform) and then is forwarded to openshift for production. Both steps, the local build and the deployment ...
motleydev's user avatar
  • 253
3 votes
2 answers
15k views

Node.js websocket "Error: listen EADDRNOTAVAIL"

Application work fine on localhost .but when its connect to server it getting error. I connect server through port 22 But my app connecting server port 80. This is the error Error: listen ...
hash's user avatar
  • 131
3 votes
0 answers
3k views

nginx / node.js dropped connections under high load

Ubuntu 11.04, node.js 0.6.16, nginx 1.0.8 I started debugging the following error that we were logging from the front end quite frequently while under heavy load (~ 3500 users actively long polling / ...
Hersheezy's user avatar
  • 356
2 votes
1 answer
4k views

How to serve 2 react apps on nginx with same ip and port

I have two applications one is public and another one is admin, I want to serve these two apps on same port but it is not working, below is my configuration file: build folder for both apps is saved ...
Satish Lamak's user avatar
2 votes
0 answers
7k views

Apache reverse proxy to Node - Connection refused: AH00957

I am trying to get a brand new cloud based server working with a default version of 20.04 server ubuntu working with apache and node. The node server appears to be running without issues reporting ...
Jamie Hutber's user avatar
2 votes
1 answer
15k views

how to fix the npm install fails with 'An unknown git error occurred' in one folder but works in a another folder

My Server runs on Centos 8 and I installed nodejs latest (v14.17.5) and NPM (v7.21.0), both dont have a .git folder in there. I have a very very strange issue, If I goto folder example1.com, and run ...
mahen3d's user avatar
  • 4,422
2 votes
1 answer
7k views

How to fix ws and socket.io memory leak?

I have read that there is a memory leak occurring in both node.js websocket modules ws and socket.io. It has existed for years and am wondering how to fix it. It is mentioned in the following, to name ...
Normajean's user avatar
  • 131
2 votes
0 answers
285 views

Facilitating arbitrary code execution on AWS Lambda

I am developing a SaaS where a user will be able to upload a custom JavaScript function that runs when an event happens. In order to preserve the integrity of the system, I am using AWS Lambda to run ...
Nexuist's user avatar
  • 121
2 votes
0 answers
671 views

What is the recommended way to deploy a node app on FreeBSD in 2021?

Basically I want to deploy a node application on FreeBSD 12. Ideally I'd prefer to build it on one system, and install it in production separately, so as to install as few development tools on the ...
pnadeau's user avatar
  • 143
2 votes
0 answers
225 views

How to reverse proxy a Nodejs instance on a directory of an AWS lightsail website

I have a website and Nodejs application hosted on the same AWS lightsail instance such that I want the website to connect to use the data hosted by the Nodejs application. The API is hosted on port ...
Philip09's user avatar
2 votes
0 answers
6k views

Dockerfile 'COPY' command not copying files

I am running into a frustrating problem when trying to create and run a new docker container. When I upload my code to a Github repository and then use Docker Hub to build it, the build completes ...
xthursdayx's user avatar
2 votes
1 answer
4k views

This site can’t provide a secure connection when deploying node app on aws ec2

i have simple nodejs app running on ec2 instance, when tried to access the app from browser using "ec2-18-223-0-201.us-east-2.compute.amazonaws.com:4545 refused to connect." it give me This site can’...
M1M6's user avatar
  • 121
2 votes
0 answers
1k views

Error 200 during WebSocket handshake: Aws load balancer + ec2 websocket

I'm using load balancer in front of an aws ec2 instance(I will have more in future). In this ec2, I have a website being served by nginx on port 80, a nodejs app listening on 8080 and the websocket on ...
Sandro Benevides's user avatar
2 votes
0 answers
165 views

Failed to renew SSL certificates using Certbot's "dry-run" command

I was using apache for my website and created the SSL for Apache. Then for some reason, I have to change my server from Apache to Node.js. To do that I just copied the SSL certificates path from ...
Amarjit Singh's user avatar
2 votes
0 answers
120 views

Use Nginx to forward nodejs responses via http2

I have a nodejs server which works fine and I am totally happy with. It is just my personal portfolio, so my main priority is to keep it simple. Sadly support for http2 is pretty bad on nodejs, ...
Lukas Oppermann's user avatar
2 votes
0 answers
317 views

nginx hosting Angular and NodeJs projects under one domain

So I have: Angular (front-end, port: 4200) NodeJS (API, port: 3000) I need to host them under one domain (example.com). Should I use different nginx locations for this? For example: location / { ...
Wolfdog's user avatar
  • 123
2 votes
1 answer
224 views

Parse-server/Heroku email account verification not working

I am trying to implement the email verification system on Parse-Server (/Heroku), when a user account is created; so that the user can confirm his/her account creation. Things are working well for ...
user3863666's user avatar
2 votes
0 answers
578 views

PM2 running but socket.io stops responding at times

I am using a hostgator vps with apache, for backend, I am using node.js and socket.io, it works fine but at times it just stops working. Pm2 is showing it online but it just stops responding. Can ...
DragoSupremo's user avatar
2 votes
1 answer
848 views

Allowing node.js applications to run libpcap without sudo ("Symlink" issue )

I want to use the following command to allow usage of the libpcap package without to sudo (on a debian system): sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/nodejs I'm getting this error:...
Bastl's user avatar
  • 121
2 votes
1 answer
4k views

Nginx: connect() to xxx.xxx.xxx.184:3000 failed (22: Invalid argument) while connecting to upstream,

This is my first time asking question on serverfault. If I miss something, please do let me know! I have been trying to solve this problem for two days now. Still can't find a solution. Here's my ...
sammkj's user avatar
  • 29
2 votes
0 answers
8k views

400 Bad Request while creating websocket between client and nodejs with Nginx as reverse proxy

I am trying to create a websocket using Nginx as a reverse proxy and nodejs at the back. I'm using ws library in nodejs. When I test it using wscat tool everything works fine but as I make request ...
Satys's user avatar
  • 193
2 votes
0 answers
1k views

nodejs app with apache2 server always shows 503

I have an apache2 server which runs all my php web application and I am trying to run a nodejs application. I have enabled proxy and proxy_http but it always shows 503 service unavailable page <...
Asif Alamgir's user avatar
2 votes
0 answers
782 views

From Http to Https NodeJS Websockets on Apache Server

Here is my problem. I have a virtual machine, on windows, the Apache server (2.4) is installed on it. The vm is on the network, so that other people can reach it directly on http://192.168.100.22 (...
Julo0sS's user avatar
  • 163
2 votes
0 answers
2k views

Sticky sessions with Apache load balancer for Socket.io 1.0

I've been messing around with Apache as a load balancer for my Socket.io server. I went through the following topic and now everything seems to be fine. Configuring Apache 2.4 mod_proxy_wstunnel for ...
Peyman's user avatar
  • 21
2 votes
0 answers
898 views

Using Docker and Vagrant with Node and Express

So before I start, I'm new to this and since I learn best when I give myself a project I wanted to user Vagrant and Docker to make a simple Node and Express server with a shared folder outside of the ...
RidableCthulu's user avatar
2 votes
0 answers
1k views

Can't go to route using nginx and Express.JS

So I have express.js set up behind nginx and when I go to website.com/users, I get a 404. But when I go to website.com, the page loads fine. This appears to be all other routes too, I can't get to ...
John's user avatar
  • 29
2 votes
0 answers
267 views

nginx with php and two node.js routes

I have two routes i want to pass two node processes(websocket route, angular app), while a 3rd route needs to pass to a php application that acts as a rest api to the angular app. i'm not terribly ...
r3wt's user avatar
  • 202
2 votes
0 answers
445 views

Postfix mailbox_command + netcat + nodejs

I use Node.js script to process incoming emails and pipe them from Postfix via netcat in mailbox_command (namely: nc 127.0.0.1 3002). Node is listening on port 3002 and calls socket.destroy() once ...
Eugene Kostrikov's user avatar
2 votes
1 answer
2k views

high traffic websocket/haproxy tuning

i have a pubsub application (mostly chat but some other goodies being pub-ed and sub-ed too) running on node & socket.io. i'm load testing this app by spinning up some other, real large, boxes ...
hackerhasid's user avatar
2 votes
0 answers
1k views

node.js server not running

I am trying to learn node.js, but I'm having trouble getting the simple server to run on localhost:8888. Here is the code for server.js: var http = require("http"); http.createServer(function(...
CMDadabo's user avatar
2 votes
1 answer
3k views

Node.js with SSL/TLS protocol v1.2

I would like to use TLS 1.2 on my node.js server. I'm currently using openssl 1.0.0e. If I upgrade to openssl 1.0.1, do I need to rebuild node.js to upgrade to TLS 1.2? Are there configuration or ...
user avatar
2 votes
1 answer
187 views

Why is stylesheet ignored if I call the "remote-page"?

I'm playing around with node.js, right now. I like it a lot. I have a weird error. If I start the test server with node app.js and navigate to http://localhost:3000, everything is fine. The ...
user avatar
2 votes
1 answer
2k views

Local web application as a captive portal with out authentication?

We are in the final stages of developing an in-browser mobile app which will run in a non Internet-connected environment (on a submarine). We are running a server inside the submarine (Windows 8 ...
Xazzo's user avatar
  • 21
1 vote
0 answers
570 views

AWS CloudFront 404 error on web root only - node.js with express and pug

The Setup I have a web site built on node.js, express.js, and pug.js running on an AMI Linux instance in AWS. I've given the instance an Elastic IP and if I browse directly to the generated DNS record ...
Todd Wilcox's user avatar
  • 2,871

1
2 3 4 5
9