All Questions
676
questions
54
votes
2
answers
18k
views
What does "#!/bin/env" mean (at the top of a node.js script)?
I found serval node.js projects that have this at top of their app.js (as in this openshift program):
#!/bin/env node
What does this mean? How does this work? Where is it useful?
54
votes
1
answer
75k
views
HTTPS request in NodeJS
I am trying to write a NodeJS app which will talk to the OpenShift REST API using the request method in the https package. Here is the code:
var https = require('https');
var options = {
host: '...
25
votes
2
answers
55k
views
Vite: Could not resolve entry module (index.html)
I am new to Openshift 3.11 deployment, I created a Multistage Dockerfile for a React application, the build want correctly on my local machine, but when I run on the openshift cluster I get the error ...
19
votes
9
answers
13k
views
Application 'appname' failed to start (port 8080 not available) on open shift node app
I have written a node restify server in coffee and I can't seem to get it running.
While deploying I get the following error:
Waiting for application port (8080) become available ...
after which ...
19
votes
5
answers
39k
views
permission denied, mkdir in container on openshift
I have a container with nodejs and pm2 as start command and on OpenShift i get this error on startup:
Error: EACCES: permission denied, mkdir '/.pm2'
I tried same image on a Marathon hoster and it ...
13
votes
2
answers
211
views
What is resetting the PATH variable at the last second during an OpenShift v2 push hook?
TL;DR: Working app, cloned it, clone doesn't start correctly from push hook (but works fine manually if I ssh in.) PATH has correct Node version added to it, but somewhere right in the last step, the ...
12
votes
1
answer
11k
views
OpenShift node.js Error: listen EACCES
I have been using OpenShift with node.js and socket.io. My code is:
server.listen(process.end.OPENSHIFT_NODEJS_PORT || 3000);
My code says that it returns port 8080.
However, I get this error:
...
12
votes
5
answers
31k
views
ETIMEDOUT connect error using nodemailer in Nodejs Openshift application
I'm facing some problems using the nodemailer module in my node.js single gear non-scalable application in Openshift. As the documentation suggested, I initialized the transporter object and used the ...
10
votes
2
answers
8k
views
OpenShift: "Failed to execute control start" on node application
I realize in advance this is kind of a vague question, but I'm stumped as to what else I can try here...
I've been going through other SO questions and following their recommendations but so far ...
10
votes
4
answers
5k
views
Run npm install --production on OpenShift
When I push my code to OpenShift, it looks like it's installing my devDependencies which takes forever. I would really love to set it up so it will only install the dependencies (by running with the --...
10
votes
2
answers
10k
views
WebSocket connection to OpenShift app failed
I created an app with NodeJS and I'm using ws module. If I test the app in localhost it works and there isn't any problem to connect websockets. Now I've upload the app to Openshift and when I try to ...
10
votes
2
answers
4k
views
Openshift haproxy error with 'express' has no server available
I created a basic Nodejs app from Openshift and randomly, the service terminate itself few times in few days. No error message from my Nodejs module but only in haproxy that automatically installed ...
9
votes
4
answers
11k
views
Openshift CORS ERROR 'Access-Control-Allow-Origin' header contains multiple values
There are duplicate questions related to CORS. But none of the solutions worked for me.I am running my application on Openshift Cloud.I have installed cors npm package as middleware. This is the error....
9
votes
6
answers
10k
views
Application failed to start (port 8080) not available
I am trying to deploy my node.js application (with express and mongoose) to openshift and I am not able to do so. The application works perfectly on my local environment.
my entry point is the file /...
9
votes
0
answers
3k
views
Openshift 3 - Build stuck in pending state
I have been using Openshift 3 seamlessly to build and deploy a Node.js application for several months.
Since yesterday, new builds of the same app systematically fail because they are stuck forever ...
8
votes
1
answer
8k
views
Error: listen EACCES on Openshift app
I have the following code
var express = require('express')
, app = express()
, server = require('http').createServer(app)
, io = require('socket.io').listen(server)
, connect =...
8
votes
2
answers
2k
views
Is it necessary to use Forever.js on OpenShift?
I've deployed my first Node.js app on OpenShift's free tier, and it works great.
Will OpenShift automatically restart my Node app when it crashes, or do I have to set up Forever.js? I tried setting ...
8
votes
1
answer
25k
views
publicRuntimeConfig in next.config.js is always undefined in prod/staging
I am deploying a node project that uses next.js to openshift where I set the environment variable MY_ENV. I have added the publicRuntimeConfig configuration to next.config.js to access it client side. ...
8
votes
1
answer
3k
views
What is MongoDB size limit on Openshift?
I am developing an application using nodejs and mongodb. I came across Openshift for hosting, they provides 3 free gears each with 512 ram and 1 GB disk space.
MongoDB is in the form of cartridge for ...
8
votes
1
answer
409
views
Node.js on Openshift gives error 400 but works properly on local machine
My Node + MongoDB based REST API works fine on local Node server and returns the correct output. But Express(probably!) returns error 400 Bad Request when deployed on Openshift.
Any idea how I might ...
8
votes
1
answer
2k
views
Deploy Sails.js on Openshift ... app restarting over and over [duplicate]
I want to deploy sails.js (version 0.9.7) app to Openshift but after git push I get this log:
debug: Lowering sails...
DEBUG: Starting child process with 'node app.js'
.
.
.
info: Server lifted in `/...
8
votes
0
answers
662
views
nodejs memory leak : process usage increase more than heap
I got some memory leak issue on my nodejs app executed by openshift docker soulution.
when I try to monitor memory usage using process rss, I found process memory increased over time.
I'm trying to ...
7
votes
3
answers
3k
views
Unable to install bower on Openshift
I am unable to install bower on Openshift. I keep on getting errors like
remote: npm ERR! Error: ENOENT, lstat '/var/lib/openshift/537xxxxcd/app-root/runtime/repo/node_modules/bower/node_modules/mout/...
7
votes
3
answers
9k
views
Receiving "SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: sslv3 alert handshake failure" with openshift nodejs app
I have a nodejs app on openshift, and we use the rhc port-forward command to connect to our database when we develop locally.
We have implemented passport to authenticate users through google and ...
7
votes
1
answer
3k
views
Cannot find module '../build/Debug/iconv.node' on OpenShift
I'm trying to deploy a Node.js Wiki called Jingo on OpenShift:
Error: Cannot find module '../build/Debug/iconv.node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module....
6
votes
2
answers
5k
views
I want to connect openshift mongodb database from my local client tools
I have my premium openshift account
I have all types of access in openshift
I have ssh key & user's credentials
I have MongoVUE & Robomongo & others client tools to open mongodb database.
...
6
votes
2
answers
6k
views
Node.js Deployment in openshift
I was trying to deploy a Node.js application to the openshift as in this link here
I understand this code
var http = require('http');
var server = http.createServer(function(req, res) {
res....
6
votes
1
answer
2k
views
Mongoose OpenShift Connection
I'm building an application on openShift using nodejs and mongodb. I'm also using mongoose and try to connect with this code
var url = process.env.OPENSHIFT_MONGODB_DB_URL;
var db = mongoose....
6
votes
3
answers
1k
views
Creating an Express JS 4.0 application with https on Openshift, including http redirection
Following another SO question, the latest I have been trying is (see ligatures.net):
self.ipaddress = process.env.OPENSHIFT_NODEJS_IP;
self.port = process.env.OPENSHIFT_NODEJS_PORT || 443;
if (...
6
votes
1
answer
4k
views
Red Hat OpenShift: cannot build/deploy node app because "Output image could not be resolved"
I have linked my GitHub repo to an OpenShift app, added the main property and start script to the package.json, but under Builds, it says "Status: Output image could not be resolved. Started: not ...
6
votes
1
answer
2k
views
Openshift: how to hide server js file in a node.js app?
The server-side javascript of my app is in a file called "server.js". If anyone runs [app-name].rhcloud.com/server.js in the browser, he will be able to read all the information inside the file. So, ...
5
votes
2
answers
6k
views
Openshift port for node.js
I have a server that won't start correctly on openshift. This is my code:
var connect = require("connect");
var port = process.env.OPENSHIFT_NODEJS_PORT || 8080;
var httpServer = connect....
5
votes
2
answers
3k
views
How to access the OpenShift wildcard SSL certificate and private key
On the OpenShift website here: https://help.openshift.com/hc/en-us/articles/202535440-How-do-I-get-SSL-for-my-domains-, it states
You can always take advantage of our *.rhcloud.com wildcard ...
5
votes
2
answers
4k
views
Openshift Layer4 connection, App Won't Start
I recently pushed a set of node.js changes to an app on Openshift. The app runs fine on my local machine and is pretty close to the vanilla example deployed by Openshift. The Openshift haproxy log has ...
5
votes
1
answer
8k
views
Deploying nodejs app with Open Shift PaaS
I'm starting with Open Shift PaaS and I picked a node.js app as my first try.
So far I'm getting a 503 when I try to access my app site.
I've tried:
Set my github repo,
set the ssh key at github ...
5
votes
1
answer
455
views
Save documents from OpenShift Mongodb
I have a scalable app in OpenShift with MongoDb2.2 ad NodeJs0.10,
Since i can't use Cartridge rockmongo-1.1 because it cannot be embedded in scalable app,
How can i get my db'documents and do a ...
5
votes
3
answers
23k
views
GET Ajax returns html code in response instead of json object
I have an ajax get request as below. I am making a GET request to server.js in openshift using nodejs express. However, i get html contents in the response method instead of json object. Both the ...
5
votes
1
answer
5k
views
How to enable CORS in Sails.js on OpenShift
I'm trying to enable CORS in SailsJS v0.9.15...
It doesn't help if i set "allRoutes: true" in cors.js, i'm still getting CORS related errors. Why is this not working? According to this, it should be ...
5
votes
1
answer
1k
views
How to upgrade NodeJS for my existing application on openshift?
I have an application running on OpenShift using NodeJS 0.10 but now I want to upgrade it to latest 0.12. I added to package.json:
"engines": {
"node": ">= 0.12.0",
"npm": ">= 1.0.0"
...
5
votes
0
answers
1k
views
GLIBC library version missmatch error while starting nodejs application on Openshift
I am newbie to MEAN stack and Linux hence please forgive me if my question is too obvious and stupid.
I have hosted a Nodejs application on Openshift. While trying to start the application I am ...
5
votes
0
answers
990
views
Openshift - some requests fail (proxy error)
I'm using openshift to deploy some little applications I built. Everything is ok, but SOMETIMES, don't ask me why, when I try to log-in (post request), I get this error (after waiting 5 minutes more ...
5
votes
1
answer
836
views
Openshift (node.js) fails to install jsdom
Been using Openshift / Node.Js for a while now, mostly problem free. Usually I install (via npm) modules to my local (windows) machine, develop, than git-deploy to Openshift and all goes well.
I ...
5
votes
1
answer
3k
views
unexpected end of multipart data
I have a .net core 2.0 API service that gets two files (XML and word) and transfers them to a node js server that saves them to a MongoDB.
when I'm hosting the net core service on my localhost ...
4
votes
3
answers
3k
views
Externalize configuration node js
I am gonna deploy a node js service in openshift and there are few properties such as database configs and app properties which I need to externalize.
I have java applications running as part of ...
4
votes
1
answer
1k
views
Scaling MongoDB on OpenShift vs using MongoLab [closed]
Coming from a "traditional" development background, I cringe whenever I see PaaS NoSQL offerings. The idea of hosting your data far from your application simply does not feel right. But PaaS providers ...
4
votes
2
answers
3k
views
Unable to deploy Node app to Openshift
I'm trying to deploy a simple ExpressJS app I have to Openshift using the command line tools. I've provided a debug trace below:
>npm info ok
Preparing build for deployment
Deployment id is ...
4
votes
1
answer
3k
views
Cannot read property 'ObjectID' of undefined
I am forking / try to understand mongodb-rest project. When I am running only the rest.js script I get this error:
TypeError: Cannot read property 'ObjectID' of undefined
at app.post.connection....
4
votes
1
answer
9k
views
Deploying Create React App on OpenShift: EACCES: permission denied, open '/home/node/app/.eslintcache'
I'm trying to deploy a Create React App webapp on OpenShift using a Dockerfile. The OpenShift build completes successfully and when I visit the route I'm able to see the application running for 1 ...
4
votes
1
answer
862
views
npm install exited with status 232
i am getting following error while runing the dockerfile on openshift.everything is working fine locally and dockerfile also build fine with podman locally
errorlog
STEP 1/13: FROM default-route-...
4
votes
1
answer
3k
views
NodeJS app on OpenShift: /lib64/libz.so.1: version `ZLIB_1.2.9' not found
I'm new to Stackoverflow, so "hi" to everyone!
I'm also new to deployment on OpenShift Online (free starter account). I run into the following error when deploying a personal NodeJS app requiring NPM-...