Custom authentication error if running 2 servers on the same computer.

i am getting this error: OperationResponse 230: ReturnCode: 32755 (Custom authentication service error: Error). Parameters: {}.

I'm running two servers on the same machine and it breaks custom authentication. If you run each server one at a time, everything works. If two servers are running, then it is impossible to connect to one. I don't get any errors in the logs.