Assuming that JOSM is running without problems as a ‘standalone’, did you set the preferences inside JOSM to accept remote control?