0

I've seen people doing this but following their steps I'm not managing to get it working.

I made my gear WildFly Application Server 8.2.0.Final. Then I uploaded the jar and resources using WinSCP and run the jar via ssh. -> java -jar server.jar

Then, the output is the one that I was expecting: the ignited sparkjava server (yes, I'm using spark) on port 8081 and the Ip the one that is retrieved using "env | grep IP" command.

Then I try to get into my app via client: http://fooname.rhcloud.com:8081/home.html

And nothing happens. After some seconds, a timeout is displayed by the browser.

Any idea? I'm pretty sure I'm missing a "stupid" step but I haven't seen which one.

Thanks in advance

jevora
  • 469
  • 1
  • 5
  • 14

1 Answers1

0

You can only access these ports (80/443/8000/8443) externally on your OpenShift applications. If you want to run spark, I would suggest that you use a DIY gear, and then have it listen on port 8080 so that it will be externally accessible. You can view this section of the Developer Portal for more information about ports & routing: https://developers.openshift.com/en/managing-port-binding-routing.html

  • Perfect, it worked perfectly. However, I haven't managed to have it working with the start action. I've installed Java 8 as said here and included the preface in the start action: http://stackoverflow.com/questions/23894323/jdk-8-support-at-diy-cartridge-in-openshift But it still claims for the java version. However, I managed to have it working by starting the server on my own, connecting through ssh and doing the java -jar myself. Any suggestion @corey112358? – jevora Aug 11 '15 at 11:02
  • Make sure you include the full path to your java 8 installation in your start action_hook. –  Aug 11 '15 at 14:23