To add to the information already mentioned.......
>>Normally, when we see the 'RPC server is unavailable' message occur, related to Integration Manager, it is due to stranded Dynamics.exe sessions open.
Please try the following:
1. Close all running instances of Microsoft Dynamics GP and Integration Manager.
2. In Windows Task Manager, under the 'Processes' tab, verify that you don't see any instances of Dynamics.exe process running, on any machines.
3. Right-click on the Dynamics.exe file and choose 'Run As Administrator' when re-launching Dynamics GP 2016 R2.
4. Right-click on Integration Manager and also use 'Run As Administrator' to re-launch Integration Manager.
5. Try running the integration again to verify whether you get the same error, different error, or the integration now works correctly.
>>We've also seen this error caused by Integration Manager not being able to read a registry key for Microsoft Dynamics GP, so restarting Dynamics GP and Integration Manager or rebooting the entire server usually resolves the issue, when re-launching Dynamics GP first and then Integration Manager.
If not doing so, you can also re-launch these applications by right-clicking on them and using the 'Run As Administrator' option, even if you're logged onto the machine as a administrator account.
>>If you're on a terminal server and/or Citrix environment, make sure you don't have more than one active session at a time. If you do, decide which unwanted sessions to close down.
Also, if running Integration Manager as a published application, you will receive RPC errors if attempt to integrate a document to Dynamics GP when both Dynamics GP and Integration Manager are ran as published applications.
>>If none of the above resolve the RPC error when attempting the custom integration, then we'd want to verify if all other integrations work fine, including sample integrations, or if all integrations fail with the same error, or only if it is this custom integration.
--If it is all integrations, then we may need to run a Repair and/or Reinstall of Integration Manager.
--If it is just this one custom integration, then you may need to look at it further, especially if it has never worked correctly.
The above information is mentioned in KB 943948 as well as the following blog: dynamicsgpblogster.blogspot.com/.../im-troubleshooting-rpc-errors-when.html
Thanks