I've just installed the same to Centos 7 and the very same behaviour. Please, could anybody from the dev team kindly check this issue?
In a nutshell: TomCat starts sooner than Oracle-xe service ready and ORDS returns 404 - not found instead of retrying to connect. After TomCat is restarted (this time is oracle up and running), ORDS connects as expected.
I ran into the same issue (running XE11g, CentOS 6.8, APEX 5.1, ORDS 22.214.171.1248.07.16, TomCat 8.0.41).
The cause turned out to be the run level order of the tomcat and oracle-xe services.
You can check those using (as root) ls /etc/rc*
The oracle-xe service should always start before tomcat. In my case it did for some run levels, but not for others.
To make sure it always does start first, I set the start run level for tomcat to 85 (oracle-xe had a maximum of 80, so 85 worked for me. Check to see if 85 is OK for you using the ls /etc/rc* above).
- Steps (all as root):
- Change the chkconfig line to:
# chkconfig: 2345 85 80
- Use the new configuration
chkconfig --level 2345 tomcat reset
- Check the new status
- Reboot the server
This solved it for me.
Note that I did numerous similar installations before, without ever seeing this behavior. Always with slightly different versions of OS, apex, ords, tomcat, etc. however, so some new version of one of the packages might be the cause...
thanks for your response but you just repeated what I wrote in my previous posts and also your post could be considered as a bit confusing.
Please, for your own sake, read something about Linux runlevels https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-boot-init-shutdown-s… (you'll hardly find there runlevels 85 and 90...) and also note that there is a completely different mechanism in all the mainstream Linux distributions including RHEL 7 + its derivatives (systemd instead of SysV init scripts).
The thing here is not how to workaround this behaviour and starting Oracle before TomCat, the point is that these processes should be completely independent. It's not right to change the boot order and introduce some other dependencies into the boot process just because of one application deployed to TomCat.
In fact there can be (and will be) deployment scenarios where TC and Oracle run on completely different machines and in such cases you have very limited options how to influence the boot order. Also there can be other apps deployed to TC that are completely Oracle independent, so I just want to start my TC no matter if Oracle DB is available or not and once it is up, ORDS should start returning expected results (which is not obviously happening).
If this is the expected behaviour, it should be at least mentioned in the documentation that Oracle DB must be up and running before the TC server starts (maybe it is mentioned somewhere and I just did not see it).
Please, Kris Rice-Oracle, Gordon Smith-Oracle, could you confirm that this is a new ORDS feature (because I've never experienced such behaviour in earlier versions) and from now on ORDS requires Oracle DB up and running when TC (and probably also other supported application servers) start?