It seems like infamous Sonar MIDI related bugs for me.
"Connecting..." means that Sonar does not receive handshake reply from X-Touch (which it turn can be that X-Touch does not receive the request).
I hope you do not have ANY MIDI devices which are not at the same state when you start Sonar. I mean if you use some device in Sonar, it should be ALWAYS on when you start it. If you do not use some device and prefer it is off, it should be ALWAYS off when you start Sonar. Otherwise Sonar becomes crazy and mix devices, especially in Control Surfaces IN/OUT ports (without showing they are mixed). There is no known workaround for that.
General "repair" sequence which from what I know has never failed so far:
1) in the Windows Device manager, check the option to show hidden (disconnected) devices. Delete all not existing MIDI devices if they appear. Check for names like "... - 2"/"... - 3" and similar. It is better to uninstall them and install again, as "the first". In doubt, remove all MIDI devices and install them again.
Note: any MIDI device influence how Sonar works with other
2) in %APPDATA%/Cakewalk/<your Sonar version>/ remove TTSSEQ.INI
3) start Sonar and configure MIDI and surfaces.