Jenkins in docker swarm - strangeness

Issue type  -   question
OS Version/build - centos 7
App version - jenkins 2.46.3
Steps to reproduce - setup jenkins in docker swarm as a service.  

try to execute a build on this jenkins from another jenkins using the
Parameterized Remote Trigger Plugin. this works fine to another jenkins server that is in aws. but it just fails to connect to the jenkins service and this is the error:
Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
13:04:27 ERROR: Build step failed with exception
13:04:27 java.lang.NullPointerException
13:04:27 at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.isRemoteJobParameterized(
13:04:27 at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.perform(
13:04:27 at hudson.tasks.BuildStepMonitor$1.perform(
13:04:27 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(
13:04:27 at hudson.model.Build$
13:04:27 at hudson.model.Build$BuildExecution.doRun(
13:04:27 at hudson.model.AbstractBuild$
13:04:27 at hudson.model.Run.execute(
13:04:27 at
13:04:27 at hudson.model.ResourceController.execute(
13:04:27 at
13:04:27 Build step ‘Trigger a remote parameterized job’ marked build as failure
13:04:28 Finished: FAILURE