Currently having some Linux machines on which DeployR Enterprise 8.0.5 must be deployed, I faced a nice bug in the DeployR configuration utility.
First, I started to deploy a “Microsoft R Server on Linux??? from the Azure marketplace. The setup is rather simple, and quite fast, and the original setup would be fine if you want to use the default ports for DeployR and RServ.
For the little story, the default ports have changed between the version 8.0.0 and the version 8.0.5. Indeed, whereas in the version 8.0.0 the default ports were 8000, 8001 and 8004 for DeployR, DeployR with SSL and RServ respectively, Microsoft adapted the default port numbers to the new version number. Thus, the new default ports are 8050, 8051 and 8054 for the same services. Basically, they used the first 3 digits for the version.
But, if you want to change these ports, you can do it by running the utility /opt/deployr/8.0.5/deployr/tools/adminUtilities.sh .
Selecting the menu “6. Change DeployR Ports???, the utility offers the following options :
1 DeployR Port Option (Sub-Menu) 2 ================================= 3 A. Change Tomcat Connect Port (Currently: 8050) 4 B. Change Tomcat SSL Port (Currently: 8051) 5 C. Change Tomcat Shutdown Port (Currently: 8052) 6 D. Change DeployR Rserve Connect Port (Currently: 8054) 7 E. Change DeployR Event Port (Currently: 8056) 8 9 M Back to Main Menu 10 Q Quit 11 12 Enter an option: 13
All the options work, EXCEPT the option “D???. If you try to configure the option “D???, it will completely overwrite the tomcat configuration file (located in /opt/deployr/8.0.5/tomcat/tomcat7/conf/server.xml .
What it does is that it replaces the original content by what should be the new configuration of the RServ service (below, I wanted to change the port number to 8004). In other words, the content of the server.xml file would be :
1 interactive off 2 source /opt/deployr/8.0.5/rserve/RScripts/source.R 3 encoding utf8 4 remote disable 5 port 8004 6 workdir /opt/deployr/8.0.5/rserve/workdir/Rserv8.0.5
So, before doing any mistake, make a copy of the tomcat configuration file, and, if you change the port number of RServ, restore the configuration file from the copy after the change in the utility. And also, make the change manually in the /opt/deployr/8.0.5/rserve/Rserv.conf