I recently completed setting up EAM for a client that required us to deploy the application as a multi-user server on an Amazon Web Services virtual private server. The setup was a little tricky, so once I got it configured I thought I would share.
First off, when setting up Protege to run on the AWS server, just as in any other case, the appropriate firewall ports need to be opened. This is done on AWS not just on the machine, but additionally on the Amazon EC2 Console. In my case, I had to make sure that 1099 (for RMI registry) and 5200 (for RMI server) were opened.
Next, I was on a Windows machine, so I needed to install an application called wget for Windows, which can be found at http://gnuwin32.sourceforge.net/packages/wget.htm. Once this is installed, make sure to add the path of its bin directory to the Path variable. This command line application will be needed to determine the hostname of the virtual server.
The following changes need to be made to the run_protege_server.bat file running on the virtual server:
Add this line:
Code: Select all
for /f "delims=" %%a in ('wget -q -O - http://169.254.169.254/latest/meta-data/public-hostname') do set DERIVED_HOST=%%a
Code: Select all
set HOSTNAME=-Djava.rmi.server.hostname=%DERIVED_HOST%
Code: Select all
set "PORTOPTS=-Djava.net.preferIPv4Stack=true -Dprotege.rmi.server.port=5200 -Dprotege.rmi.registry.port=1099"
That is pretty much it. At this point, a client should be able to connect to the server by specifying the IP address as the Host Machine Name. If ports 5200 for rmi server and 1099 for rmi registry were used, there is no need to include the port. Otherwise, the rmi registry port needs to be specified.