In the previous post I discussed accessing the DBaaS Monitor application, in this post I’ll show how to access the Glassfish Admin application.
On the home page for your DBaaS Instance, you’ll see a link for ‘Glassfish Administration’
However if you click on that link you’ll probably find the browser just hangs and nothing happens. It took me a while to notice but unlike the DBaaS monitor which is accessed via HTTP/HTTPs, the Glassfish Administration is done via port 4848 (you’ll notice 4848 in the URL once your browser times out).
The issue here is that by default port 4848 isn’t open in your network rules for your DBaaS instance, so the browser cannot connect to it.
So you have a couple of options –
- Open up port 4848 to the world (or to just specific IP addresses)
- Use an SSH Tunnel
I tend to go with option 2, since I’ve found occasionally while travelling and staying in a hotel if you go with option #1 you might be accessing from an IP address that isn’t in your whitelist.
As I blogged previously, we can setup an SSH tunnel to port 4848 pretty easily from the terminal, with a command similar to:
ssh -L 4848:localhost:4848 -i oracle_cloud_rsa opc@<my.remote.ip.here>
So now we should be able to access Glassfish using the URL http://localhost:4848
Why localhost? Remember when you setup an SSH tunnel you connect to your own local machine which then tunnels the traffic to the remote host via SSH over the ports you specify.
Once we’ve done that you should be able to access the Glassfish Administation homepage.
You should be able to login using the username ‘admin‘ and the same password you specified when you created your DBaaS instance.
The first thing I noticed was that this is a pretty old version of Glassfish which is installed by default (version 184.108.40.206 in my case), when Glassfish 4 was already out. So you may wish to check if you’re missing any patches or need some Glassfish 4 features.
This is definitely one downside to going with the pre-bundled installation, you will (by definition) get an image which was created some time ago, so you need to check if there are any patches etc that have been released since the image was created.
I’m not going to go into detail on Glassfish itself, since it’s pretty much a standard (3.1) Glassfish and there are lots of blog posts and documents around that go into more detail. However if you go into the application section you’ll see that it comes pre-bundled with the APEX Listener / ORDS and also DBaaS Monitor which is how you can access them via the Glassfish server.