[ARQ-1881] Fix starting/stopping of remote karaf container

cherry-pick from master (26eb8c4185dad4fa19d338817bd74299bdbd04a7)