Closed nazisangg closed 6 years ago
Why don't you try to build your image starting from the official image instead? The base image is openjdk:8u151-jre-alpine
which is based on Alpine Linux and Openjdk. We haven't tested with Centos based images.
However, I made a quick test with image mimacom/centos7-java:openjdk-8
and RESTHeart works just fine.
Hi @nazisangg ,
from the restheart log I see that it is starting and connecting to mongodb. I also see that the http interface is bound to port 8080 and https to 4443.
The screenshot of the HAL browser shows a response body with html, also the response header does not contain X-powered-by: restheart.org
: it must be some other process responding.
Indeed it should be the case. You should see that in my case the Properties object showed by the HAL Browser contains the "restheart_version": "3.5.0-SNAPSHOT"
while in @nazisangg case is empty.
Thanks guys. I recently solved the problem. It is ok to use centos in that case. It should be a openshift issue. A possible solution cloud be:
It works for me... Although I have no idea why it works....
Hi, I was trying to deploy restHeart to openshift. To adopt our openshift environment, I changed the entry point of configuration(only mongo url and http port) from "get from yaml" to "get from system environment".
**httpPort = Integer.parseInt(System.getenv().getOrDefault(HTTP_PORT_KEY,"8080")); //httpPort = getAsIntegerOrDefault(conf, HTTP_PORT_KEY, DEFAULT_HTTP_PORT);
mongoUri = new MongoClientURI(System.getenv().getOrDefault( MONGO_URI_KEY, DEFAULT_MONGO_URI));**
It works fine from my local. However I got some issue on openshift. The Hal browser will return a 503 Service Unavailable exception.
I tested the mongodb pod on openshift. It should be working properly. The init of application is shown below:
Expected Behavior
Since the auth and connection is passed. 200 ok should be printed
Current Behavior
Context
New to Restheart, need it to be running on openshift.
Environment
The image is running with centos 7, mongodb is on version 3.2. The version of restheart is the latest one from github.
Steps to Reproduce
Possible Implementation