openshift

Empty request body with POST using CORS with a node app on OpenShift

爱⌒轻易说出口 提交于 2019-12-11 09:28:10
问题 I'm creating a simple Node app on OpenShift, using express (I'm just modifying the default example Node app of OpenShift). I want to have CORS support with it: var cors = require('cors'); ... /** * Initialize the server (express) and create the routes and register * the handlers. */ self.initializeServer = function() { self.createRoutes(); self.app = express(); self.app.use(cors()); self.app.use(express.json()); // Add handlers for the app (from the routes). for (var r in self.routes) { self

OKD 3.11 Installation failed “Control plane pods didn't come up” “network plugin is not ready: cni config uninitialized”

拟墨画扇 提交于 2019-12-11 09:02:42
问题 OKD 3.11 Installation failed "Control plane pods didn't come up" Environment CentOS Linux release 7.6.1810 (Core) ansible 2.6.16 OKD 3.11 Docker version 1.13.1, build b2f74b2/1.13.1 Ansible inventory file ##Open shift master nodes # Create an OSEv3 group that contains the masters, nodes, and etcd groups [OSEv3:children] masters nodes etcd # host group for masters [masters] SBSTJVMLX605 openshift_ip=192.168.62.95 # host group for etcd [etcd] SBSTJVMLX605 openshift_ip=192.168.62.95 # host group

How can i store image in my project hosted in openshift?

戏子无情 提交于 2019-12-11 08:56:45
问题 i am trying to create chart and save chart in image folder. it works fine locally but when i hosted it in openshift online it doesn't work. String root = getServletContext().getRealPath("/"); File savedFile = new File(root+"\\images\\piechart.jpg"); ChartUtilities.saveChartAsJPEG(savedFile, piechart, 700, 400); root gives null so saving is not working ... please help to store image. 回答1: Instead of saving the chart as an image in a local folder, you can use one of the variations of

How to debug Django exceptions in OpenShift applications

独自空忆成欢 提交于 2019-12-11 08:54:41
问题 Background: I am deploying a django application with Python 2.7.5 && Django 1.6. Currently I am able to render all pages, but one. The only error I am able to see when tailing the logs is: "GET /test/ HTTP/1.1" 500 2011 "http://myPrivateApp.rhcloud.com/myPrivatePage/" Obviously this log message doesn't tell me much other than it failed and I cannot find any django related logs within the repos. After playing around with the other pages, I highly suspect the issue is related to an exception

OpenShift Access Mongodb Pod from another Pod

早过忘川 提交于 2019-12-11 07:43:34
问题 I'm currentrly trying to deploy a mongodb pod on OpenShift and accessing this pod from another node.js application via mongoose. Now at first everything seems fine. I have created a route to the mongodb and when i open it in my browser I get It looks like you are trying to access MongoDB over HTTP on the native driver port. So far so good. But when I try opening a connection to the database from another pod it refuses the connection. I'm using the username and password provided by OpenShift

Openshift public url app (migration)

风流意气都作罢 提交于 2019-12-11 07:06:40
问题 Would be possible, when migrating from Openshift 2 to 3, to keep the xxx.rhcloud.com url? Anybody knows if Red Hat is providing some solution? O maybe some kind of redirection would work? Thanks in advance. 回答1: Confirmed by Openshift Support: "Unfortunately, we are unable to provide the same URLs that you have used previously. You would have to recompile your applications with new URLs following a migration." 来源: https://stackoverflow.com/questions/45923453/openshift-public-url-app-migration

mysql on openshift: Failed to execute: 'control restart'

允我心安 提交于 2019-12-11 06:38:45
问题 I can't restart my application. Getting message: Unable to complete the requested operation. could not open session Failed to execute: 'control restart' for /var/lib/openshift/53fa3c33e0b8cdaa4c000b36/mysql What can be done in such a case? 来源: https://stackoverflow.com/questions/25504229/mysql-on-openshift-failed-to-execute-control-restart

OpenShift .htaccess RewriteRule doesn't work

好久不见. 提交于 2019-12-11 06:29:41
问题 I have a multiuser wordpress install which is currently using subdomains. I'd like to migrate it to use subfolder multiuser. I've set up subfolder multi-user and it actually works. Now, I'd like to redirect from the old address to the new address. For instance: peter.example.com -> example.com/peter Both domains above are properly added as aliases in OpenShift. To cause the redirect, I created a rewrite rule in the .htaccess file. It looks like this: RewriteCond %{HTTP_HOST} ^((?!www)[^.]+)\

Making openshift origin docker containers persistent after reboot

穿精又带淫゛_ 提交于 2019-12-11 06:28:37
问题 I am new to openshift and need to know if it is possible to make all containers in openshift origin persistent after restarting the oc cluster or rebooting the server. The tutorial i followed requires one do the following in order to create a cluster oc cluster up The problem i am running into now is that login into my openshift application after, doing an oc cluster down && oc cluser up doesn't show any of my running containers. I tried restarting all of them by doing a docker start $(docker

Openshift NodeJS + MongoDB application suddenly stops

无人久伴 提交于 2019-12-11 06:26:07
问题 I recently started using OpenShift as a scalable platform for a NodeJS + MongoDB application. I got it all working, except that after some time (mostly within a few hours or days) my application suddenly gets inaccesible. I think there are 2 causes for my app to stop. One cause is that the MongoDB connection times out, which is probably an easy fixable error by checking whether the database is still connected before using the database. However the other cause is that NodeJS suddenly stops