How To
ForgeRock Identity Platform
ForgeRock Identity Cloud

How do I run a Remote Connector Server (RCS) as a Service?

Last updated Apr 14, 2021

The purpose of this article is to provide instructions on running the RCS as a service, which allows you to stop and start the RCS using systemd if you are using a Linux® system.


The following instructions were tested on Ubuntu 20.04 LTS but they should work (with no/minimal changes) on any Linux distribution using systemd.

These instructions assume you have unpacked the RCS package into the /opt directory and left the unpacked directory name unchanged (openicf). If you have any variations to these path locations, you must update the service file accordingly when following the instructions in Step 2.

Configuring RCS as a service

  1. Create a service file (called rcs.service) in the /etc/systemd/system directory, for example:$ sudo vim /etc/systemd/system/rcs.service
  2. Add the following content to this file, update as needed and save: [Unit] SourcePath=/opt/openicf/bin Description=ForgeRock Remote Connector Server (systemd init) [Service] Type=simple Restart=always RestartSec=5sec IgnoreSIGPIPE=no KillMode=process Environment="OPENICF_OPTS=-Xmx1024m" ExecStart=/opt/openicf/bin/ /run [Install]
  3. Make the new service launch on startup by running the following command:$ sudo systemctl enable rcs.service
  4. Check the service is enabled:$ systemctl is-enabled rcs.serviceThis command simply returns enabled or disabled as appropriate.

Starting, stopping and restarting the RCS service

Once you have configured RCS as a service and checked it is enabled, you can use the following commands to start, stop and restart the RCS service:

  • Start:$ sudo systemctl start rcs.service
  • Stop:$ sudo systemctl stop rcs.service
  • Restart:$ sudo systemctl restart rcs.service

Checking the service status

You can check that the RCS service has started or stopped as expected using the following command:$ systemctl status rcs.service

This command will return the service state and the first few entries in the log file. For example, the status command’s output will look similar to the following, where systemd messages indicate that the init script has started and the RCS service is running:

● rcs.service - ForgeRock Remote Connector Server (systemd init)   Loaded: loaded (/opt/openicf/bin; enabled; vendor preset: enabled)    Active: active (running) since Mon 2021-03-08 12:45:16 GMT; 22s ago  Main PID: 3080 (java)     Tasks: 35 (limit: 4684)    CGroup: /system.slice/rcs.service            └─3080 java -Xmx512m -server -classpath /opt/openicf/lib/framework/*:/opt/openicf/lib/framework/ org.forgerock.openicf.framework.server.Main -run -properties /opt/openicf/conf/ Mar 08 12:45:29 forgerock-VirtualBox[3080]: Mar 08, 2021 12:45:29 pm INFO  o.f.o.f.c.ClientRemoteConnectorInfoManager: privateConnections size: 0; privateTCPConnections size 0. Mar 08 12:45:29 forgerock-VirtualBox[3080]: Mar 08, 2021 12:45:29 pm INFO  o.f.o.f.c.ClientRemoteConnectorInfoManager: Entering connection housekeeping... 0 active WebSocket(s), 2 available permits, 3 permitted permits Mar 08 12:45:29 forgerock-VirtualBox[3080]: Mar 08, 2021 12:45:29 pm INFO  o.f.o.f.c.ClientRemoteConnectorInfoManager: 0 active WebSocket(s), 2 remaining permits

See Also

How do I implement a Remote Connector Server (RCS) for Identity Cloud?

ForgeRock Identity Cloud Docs › Connect Identities

Copyright and TrademarksCopyright © 2021 ForgeRock, all rights reserved.