# Payara, the Unknown protocol: RFB and the Solution

Macs are using port 5900 for screen sharing, often also used 
by video conferencing software like Skype or Microsoft Teams.

Payara uses the same port 5900 for the hazelcast grid as starting port.
At collision, payara won't start and complain with:


[#|...|WARNING|Payara 5.201|com.hazelcast.nio.tcp.TcpIpConnection|_ThreadID=108;_ThreadName=hz._hzInstance_1_development.IO.thread-in-1;_TimeMillis=1600401135525;_LevelValue=900;|
[...]:4900 [development] [3.12.6] Connection[id=5, /...:63015->/...:5900, qualifier=null, endpoint=[...]:5900, alive=false, type=NONE] closed. 
Reason: Exception in Connection[id=5, /...:63015->/...:5900, qualifier=null, endpoint=[...]:5900, alive=true, type=NONE], thread=hz._hzInstance_1_development.IO.thread-in-1
java.lang.IllegalStateException: Unknown protocol: RFB
    at com.hazelcast.nio.tcp.UnifiedProtocolDecoder.onRead(UnifiedProtocolDecoder.java:107)
    at com.hazelcast.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:135)
    at com.hazelcast.internal.networking.nio.NioThread.processSelectionKey(NioThread.java:369)
    at com.hazelcast.internal.networking.nio.NioThread.processSelectionKeys(NioThread.java:354)
    at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:280)
    at com.hazelcast.internal.networking.nio.NioThread.run(NioThread.java:235)
|#]
    The DAS was stopped    


Solution    


    Disable screen sharing in "System Preferences->Sharing->Screen Sharing" or:
    Change Payara's port by replacing in $PAYARA_HOME/glassfish/domains/domain1/domain.xml the line <hazelcast-runtime-configuration></hazelcast-runtime-configuration> with <hazelcast-runtime-configuration start-port="59000"></hazelcast-runtime-configuration>. Now Payara will use the port 59000 instead of 5900
