Manager Interconnect error

Hi,

I install one openremote in a laptop with manager role and other one in a second laptop as gateway.
after that, I create new gateway agent in manager and copy clientid and client secret to interconnect form in gateway.
deployment : hostname=localhost, realm=master and save it.
But status is always CONNECTING.
Logs file give : Failed to retrieve OAuth access token for ‘wss://localhost/websocket/events?Realm=master’