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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
5k views

502 Bad Gateway nginx/1.10.3 error with NodeJS (Debian 9)

For a few days I have a server where I run successfully a few Web applications developed in NodeJS. Everything worked fine until suddenly the browser started to show the error 502 Bad Gateway nginx/1....
0 votes
0 answers
8 views

I am running nodejs App in my main domain in the plesk does any one know how to allow the subdomain to host the nodejs app as well?

does any one know how to allow the subdomain to host the nodejs app as well ? currently I have main domain that is hosting nodejs application on the plesk , but I want to create subdomain under that ...
1 vote
1 answer
24 views

Is there a tool like ClamAV to scan PHP and JS files?

We're offering a shared web hosting service, where many websites live on the same server. Since a lot of people don't update their stuff, they get pirated all the time. Now, the websites are ...
0 votes
0 answers
31 views

Is it possible to disallow external IPs from accessing a page of a React site?

I'm currently learning React to host a personal website (on an Ubuntu server) and am port forwarding it to allow access from the internet. However, for security reasons, I'd like one or more pages to ...
user avatar
8 votes
2 answers
20k views

Nodejs Nginx error: (13: Permission denied) while connecting to upstream

I'm trying to run multiple Nodejs applications on Nginx server running on CentOS 7. I noticed that when I run a Nodejs app on some ports I get an 502 Bad Gateway error in the browser so I checked the ...
0 votes
1 answer
62 views

pm2 process kill the server by running pm2 update multiple times

We stumbled upon a very strange problem while running any pm2 command. While running pm2 list we got this result inside console [PM2] Spawning PM2 daemon with pm2_home=/root/.pm2 [PM2] PM2 ...
0 votes
1 answer
133 views

PHP openssl encryption aes-256-cbc and decryption using NODEJS

I have a PHP script used to encrypt data with openssl_encrypt() and the aes-256-cbc algo. Encryption/Decryption works well using PHP, it's an old script. I've been trying to decrypt the datas using ...
-1 votes
0 answers
24 views

Apache Error with authorisation?

Afternoon all I am using apache to host a node.js application. It suddenly stopped working. I am using a virtual host for the port. I have been debugging through errors but now I have this error ...
3 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 ...
0 votes
1 answer
55 views

PM2 + apache2 Optimization

I am running a Node.js application with PM2 as a reverse proxy through Apache on my Centos 7 server. The website experiences very slow loading times, and its performance is quite poor. Can anyone ...
3 votes
2 answers
15k views

Node.js websocket error “Error: listen EADDRNOTAVAIL 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 ...
10 votes
3 answers
12k views

/var/lib/nginx/client_body/0000000011 failed (13: Permission denied) with node.js

I'm using node.js with Nginx as web server running on Slackware 14.1. I created a page that uploads a file. In my development machine (Debian like) it works fine, but in production (Slackware ...
5 votes
5 answers
4k views

How can I get node18 on amazonlinux2?

I'm currently trying to install node18 on a amazoncorretto:11 base image. I'm getting the error #6 11.04 Error: Package: 2:nodejs-18.16.0-1nodesource.x86_64 (nodesource) #6 11.04 Requires: ...
0 votes
1 answer
500 views

my nginx server was working perfectly fine and now shows a 502 error

I'm deploying my project, I had no problem until i decided to buy a domain for my digital ocean droplet i added the records from my namecheap domain to my droplet i was working on it then suddenly ...
0 votes
2 answers
357 views

Google Cloud Platform authentication - unable to list projects or set project

I had previously authenticated with Google Cloud Platform and everything was working correctly, however all of a sudden, today I started receiving errors mentioning google-gax in a Node app: 2023-09-...
1 vote
3 answers
3k views

How to remove the trailing slashes from a URL with nginx

I'm trying to remove trailing slashes from urls. I searched a lot and tried some solutions but they didn't work form me. I tried this one rewrite ^/(.*)/$ /$1 permanent; but it leaves one slash ...
0 votes
1 answer
287 views

Is it possible to use HTTP/3 with NGINX-Node.js combination already?

NGINX supports HTTP/3 since 1.25.0. Node.js currently does not support HTTP/3 or QUIC out-of-the-box but it seems there are some C++ addons implementations, like FAILS'. HTTP/3 (more specifically, ...
1 vote
1 answer
1k views

Install nodejs 20 on Debian Bullseye in Docker

I have Debian in a Docker container, and was installing NodeJS like this: RUN curl -sL https://deb.nodesource.com/setup_18.x | bash ;\ apt-get update; \ apt-get install -y nodejs It worked ...
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 ...
0 votes
0 answers
130 views

pm2 in systemd not actually starting processes

I'm having an issue where I'm running pm2 as pm2-root under systemd (this is on Amazon Linux2023). The daemon runs fine, and if a process dies, it restarts it fine. However, if the server reboots, pm2-...
1 vote
1 answer
8k views

Using ProxyHTMLURLMap to redirect css and js requests

I already have apache 2.4.19 installed on my Ubuntu 16.04 working with Tomcat. I'm trying to add a node app and redirect all requests for /node to http://localhost:3000 with ProxyPass. My node app is ...
0 votes
1 answer
135 views

Apache Cannot See PM2 Node Process

I have Apache running on Ubuntu 20 and I keep getting this error in /var/logs/apache2/error.log: [proxy:error] [pid 7064] (111)Connection refused: AH00957: http: attempt to connect to 127.0.0.1:4000 (...
0 votes
0 answers
56 views

migrate pm2 services to new server

In order to support the most recent versions of NodeJS, we need to migrate our web servers from Amazon Linux 2 to Amazon Linux 2023. Making this move precludes us from doing the usual spin-up/down ...
0 votes
0 answers
44 views

Can't run a blockchain application based on Node.js and Hyperledger Fabric 2.1

What I want to do (the short part of the post) I want run a project below successfuly The problem I installed a blockchain project from GitHub,which is built with Node.js and HyperlederFabric V2.1....
0 votes
1 answer
4k views

Express.js fails to serve all static files on heroku

there, I have a little problem with node.js and express on heroku. I have a node.js server that loads up my index.html page and other resources: process.env.PWD = process.cwd(); var express = require(...
0 votes
1 answer
4k views

Configure nginx to serve query string parameter

We have one NextJs site, with next export we get one out folder which we want to serve from Nginx. In out/login there is one '[[...parameter]].html'. When we deploy site using pm2 it is working if we ...
0 votes
0 answers
87 views

Exposing ports on VPS

I'm running some services inside Docker and been having some issues with it: I have a NodeJS app (TLS stream communication) running on a custom port (let's say 2321). I exposed the port from my ...
2 votes
1 answer
14k 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 ...
0 votes
1 answer
238 views

How to setup Nginx and Varnish reverse proxy for Node.js?

My website on the Astro framework (Node.js SSR adapter) is deployed on 1 shared-cpu-1x@256MB fly.io instance in the Amsterdam region, which automatically handling gzip, TSL termination. Initial setup ...
0 votes
2 answers
11k views

PM2 - Process or Namespace not found when deploying with GitLab CI

When deploying from CI, as the user who started PM2, pm2 restart appname always results in [PM2][ERROR] Process or Namespace appname not found whoami/who on deployment shows the correct user. Tried ...
3 votes
2 answers
9k views

HAProxy max session limit

I have an Amazon OpsWorks stack running HAProxy (balance = source) and several node.js instances running socket.io. It seems HAProxy determines the max session limit for a given instance based on the ...
1 vote
1 answer
4k views

Nginx - Even after adding the directive 'access control allow origin' the request logs error

I am trying to run nginx infront of my nodejs application (I am using windows machine) My NodeJS Application is running in 3000 port I have started the Nginx at 8070 port When i try to hit http://...
0 votes
0 answers
302 views

Intermittent errors fetching from raw.githubusercontent.com using mingw curl and nodejs on Windows, but not in PowerShell or Linux VM

This started happening a month or two ago. I have a node script which fetches from: https://raw.githubusercontent.com/glowbuzzer/gbr/master/package.json This has started failing about one in three ...
1 vote
0 answers
337 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 ...
0 votes
0 answers
32 views

Where do I store web server login credentials?

I am building a web server that will accept requests from mobile devices and route to 2 different SQL Server instances. For extra security, I want the mobile devices to have to log in twice - log in ...
0 votes
0 answers
197 views

NodeJS https server returns http 0 and SSL error:14094412 ERR_SSL_SSLV3_ALERT_BAD_CERTIFICATE

I have a nodejs https server running on my Raspberry Pi. It responses to ajax requests. When open the webpage with a desktop/laptop or an iPhone (Safari), the ajax call returns the proper result with ...
0 votes
1 answer
857 views

IIS URL rewrite troubleshooting

I'm using IIS to reverse proxy HTTP requests to a nodejs app running in the same machine. URL rewrite and ARR modules are installed and the proxy setting checked. The URL matching seems good: if I ...
0 votes
0 answers
178 views

Error: Request aborted - can't send 20MB .mp3 files using Node.js + Express?

I'm making a game using a Node.js + Express app on Heroku. When the page loads, the soundtrack (music) is fetched in 5 20MB .mp3 files. But sometimes, the request hangs and then throws error 'Request ...
0 votes
1 answer
228 views

Lost Local Connection to MySQL DB that resides in AWS RDS

The MySQL DB residing in AWS RDS was made to connect with resources in the same VPC. I always had to make it publicly accessible in order to connect to it through MySQL Workbench 8.0 CE in Windows 11. ...
0 votes
0 answers
122 views

access.log of Nginx filling up space (Ubuntu 22 Server)

Recently I have deployed my website using node.js server and using Nginx as reverse proxy, also nginx handles SSL, and forwards the HTTPS to HTTP server of node.js running at specific port. I am using ...
-1 votes
1 answer
957 views

Nginx yielding 499 status due to upstream connection reset

Have read other posts; they do not yield much light. Situation: Kubernetes cluster with ingress points to Several nginx containers that proxy-pass to a Node application on a specific URI via location ...
0 votes
0 answers
73 views

Seemly NodeJS restart | Docker vs PM2 vs Both?

I have a NodeJS application that wraps a large obfuscated JavaScript file and utilizes it to run computations. The issue is the JavaScript file has a memory leak, and required fairly frequent restart ...
0 votes
0 answers
237 views

Apache Proxypass with SSL extremely slow

We have a server with the spec 8 vCore and 16GB RAM. At its peak, the server uses only 15 to 25% CPU and around 40% of RAM. The issue that we face is once the number of users start increasing, the ...
0 votes
0 answers
1k views

Nginx + django +nodejs : Uncaught SyntaxError: Unexpected token '<'

This is first time using nginx and nodejs. I have two apps one is built using django and other is built using nodejs (expressjs +openvidu). I am trying to configure nginx, django app works fine, I am ...
0 votes
1 answer
538 views

How to configure Apache to handle two reverse proxies one one domain/server name?

I've got a node-react app on port 3000, and a node/express API running on port 3001 (localhost:3001/api). I need a reverse proxy setup in Apache that will put the React app on https://example.domain....
0 votes
0 answers
177 views

CosmosDB with private endpoint causes 'request originated from VNET through service endpoint' error?

I have a Node Js app which interacts with CosmosDB and which is deployed to a private AKS cluster. I was able to connect to Cosmos DB through a service endpoint in the Cluster VNET/subnet for Cosmos ...
0 votes
0 answers
62 views

Node.js: Bad gateway on HTTPS server (unable to get the server's files?)

So, I have a Node.js server on render.com. It has only 2 files (server.js and index.html). But, when I load myservername.onrender.com/index.html, the request for file index.html fails and throws 502 ...
0 votes
0 answers
102 views

Mixed content error nginx+docker container

I have an EC2 with Nginx setup & there are a few containers running inside. There's a Node JS gateway which is serving some of the requests in a webpage hosting in this Nginx server. Nginx is not ...
1 vote
3 answers
1k views

NGINX frontend HTTPS server rejects requests to local backend http express server

I have an application that's split into two servers: one is a React application running on port 8080 and the other is an Express server running on 3001. The machine running this application has to run ...
0 votes
0 answers
234 views

Docker container can't find express even though it is installed and the Dockerfile compiles fine

When I try to run a docker container from an image I just built using "docker run" Node.js can't find express even though it is installed and the Dockerfile compiles fine. Here is the output ...

1
2 3 4 5
21