(After upgrading to Openfire from 4.1. 6 to 4.8.1) While doing POST request to user service, getting connection refused error as below:

I suspect that this is caused by an incomplete installation/configuration of the plugin. Please verify if you followed this instruction:

Important Step: To enable the plugin make sure to set the system property adminConsole.access.allow-wildcards-in-excludes to true

Without the above step the REST API plugin always redirects to login. This was done in response to a security issue.