openshift

“oc new-app” does not expose port altough the input image does

与世无争的帅哥 提交于 2019-12-10 19:16:15
问题 I'm exploring OpenShift 3.9 and have managed to get a first container built and running with oc new-app and the Docker build strategy. My Dockerfile includes the command EXPOSE 5432 . After the rollout oc describe istag/my_app:latest | grep ^Exposes reports Exposes Ports: 5432/tcp , so that looks good: the image exposes port 5432. But oc describe po/my_app-1-some_id | grep "^\s*Port" reports Port: <none> , so overall it seems as if the port is exposed at the level of Docker, but not yet the

Scalatra app on Openshift - setting Jetty IP

允我心安 提交于 2019-12-10 18:35:42
问题 I'm trying to deploy a minimal Scalatra application on Openshift with DIY cartridge. I've managed to get SBT working, but when it comes to container:start , I get the error: FAILED SelectChannelConnector@0.0.0.0:8080: java.net.SocketException: Permission denied Apparently, embedded Jetty tries to open socket at 0.0.0.0, which is prohibited by Openshift (you can only open ports at $OPENSHIFT_INTERNAL_IP). How can I tell Jetty exactly which IP I need it to listen? 回答1: Yes you are right about

.htaccess seemingly ignored on OpenShift

家住魔仙堡 提交于 2019-12-10 18:09:00
问题 I'm working on a site on OpenShift (Django, Python 2.7, Apache), and I'd like it to always be served over HTTPS. I figured this would be a simple task using .htaccess , and OpenShift's knowledge base seems to show that it should be. However, I've been agonizing over this for days, and I can't figure out how to make it work. Basically, I can't get my .htaccess files to operate on anything but static files. I simply can't get requests for non-static resources to redirect to anything . Here's my

GET Ajax returns html code in response instead of json object

主宰稳场 提交于 2019-12-10 16:20:22
问题 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 requests are for the same domain.The node modules that I am using are moongojs,mongodb and bson. $.ajax({ type: "GET", url: "http://abc-favspot.rhcloud.com", contentType: "application/json", data: JSON.stringify(currLocation), dataType: "text", success: function(response){ callback(response); },

rhc setup returns “warning: constant ::TimeoutError is deprecated”

烂漫一生 提交于 2019-12-10 16:16:32
问题 Environment Ubuntu 16.04 xenial Linux Kernel: 4.4.0-22-generic ruby --version ruby 2.3.0p0 (2015-12-25) [x86_64-linux-gnu] Steps to replicate sudo apt-get install ruby-full rhc setup returns: /var/lib/gems/2.3.0/gems/commander-4.2.1/lib/commander/user_interaction.rb:328: warning: constant ::TimeoutError is deprecated After uploading default public key, it shows: Checking for git ... found git version 2.7.4 Checking common problems ./var/lib/gems/2.3.0/gems/net-ssh-2.9.2/lib/net/ssh/transport

PHP on OpenShift: How to enable errors and warnings?

夙愿已清 提交于 2019-12-10 15:39:28
问题 I have moved my app to OpenShift and now, for convenience of getting it actually work, I'd like to enable in-page errors and warnings. Currently, I see a blank page. How can I enable errors? In PHP, it's in php.ini error_reporting = E_ALL display_errors = 1 回答1: On the IRC channel #openshift, I was told that this is not currently not configurable (05:06:58 PM) pmorie: ozizka-ntb: it looks like it's provided by the cart - i don't believe you can substitute your own and I need to use both error

API error (500): manifest unknown: manifest unknown

有些话、适合烂在心里 提交于 2019-12-10 15:00:02
问题 it failes to pull the image with SHA256 digest identifier 回答1: Unfortunately this is a side-effect of DockerHub removing backwards compatibility for Docker 1.9 daemons. When images are pushed using Docker 1.10, pull-by-id will fail for older daemons (which includes OpenShift masters importing metadata from the Hub). You can work around this by pulling the centos image and pushing it to the internal registry. At the current time, using Docker 1.9 on your hosts will avoid this issue. 回答2: You

Kubernetes - Readiness Probe execution after container started

不羁岁月 提交于 2019-12-10 13:43:51
问题 Is there a way to prevent readiness probe from execution once container has successfully started? I suppose that liveness probe should be enough to monitor container health. 回答1: The readiness and liveness probes serve slightly different purposes. The readiness probe controls whether the pod IP is included in the list of endpoints for a service, and so also whether a target for a route when it is exposed via an external URL. The liveness probe determines whether a pod is still running

Openshift java.net.SocketException: Permission denied

冷暖自知 提交于 2019-12-10 12:45:34
问题 I am using Java8 and have a Chat Server that works perfectly on my localhost , but when I deploy it to an OpenShift server, I get the following error: java.net.SocketException: Permission denied 2016-09-05 10:36:11,300 INFO [stdout] (Thread-125) Starting Chat server on localhost:8000 ... 2016-09-05 10:36:13,194 ERROR [stderr] (Thread-125) Exception in thread "Thread-125" java.net.SocketException: Permission denied 2016-09-05 10:36:13,194 ERROR [stderr] (Thread-125) at sun.nio.ch.Net.bind0

Importing Docker Images Images From The Public Registry Into OpenShift

落花浮王杯 提交于 2019-12-10 12:06:29
问题 I am trying to deploy an Ubuntu Image from the here on OpenShift Online (Next Generation). These are the steps I followed in doing so $ oc new-project test $ oc new-app jedisct1/phusion-baseimage-latest I then deployed from the WebConsole However I get a failed deploy and an error status of "image pulled back off" on the pod page. Any particular thing that I may be doing wrong? Below are the logs of the entire proccess. root@home:~# oc new-project test Now using project "test" on server