Atlassian Companion gives error if opened more than once on Citrix Host
Asked by Stephan Maass:

Application info --\>

Companion App Version: 1.2.2

Infrastruktur: Citrix VDA Multi User Server Farm

Citrix Version: Citrix 7.15 LTSR CU3

OS: Windows Server 2016 Version 1607

Error sample --\>

This happens if nobody has the application open on the host:

info: adc:browser 2020-09-14T08:32:39.685Z direct websocket launched successfully on port: 31459

This happens if someone else already has the application open on the host:

error: adc:browser 2020-09-14T08:31:46.789Z Error: listen EADDRINUSE: address already in use 127.0.0.1:31459  
at Server.setupListenHandle \[as _listen2\] (net.js:1300:14)  
at listenInCluster (net.js:1348:12)  
at doListen (net.js:1487:7)  
at processTicksAndRejections (internal/process/task_queues.js:81:21)


Answers:
author: Alex K
body: Hi [@Stephan Maass](/t5/user/viewprofilepage/user-id/3832450) ,

Which version of Confluence are you using?

This error is to be expected, Companion runs a local websocket server which is used in Confluence Server 6.11 - 7.2 (and Confluence Cloud). This method of connecting is incompatible with Citrix virtual desktop environments. Since Confluence 7.3, Confluence connects to Companion in a completely different way (using a custom URI handler) which is compatible with Citrix virtual environments. If you are using Confluence 7.3+ then the Companion error can be safely ignored. Companion 1.2.2 is backwards compatible which is why we still attempt to run that local server.

Regards,  
Alex (Developer at Atlassian)

comments: author: Stephan Maass
body: Hi Alex. Thanks so much. I already thought could be something in this direction. We run the newest version of Confluence, so it works.

Do you have a way to suppress this message or a version of the companion app without the backwards compatibility?

Regards, Timo


author: Alex K
body: Hi [@Stephan Maass](/t5/user/viewprofilepage/user-id/3832450) ,

At this stage we do not ship a separate Companion version without backwards compatibility. We do not have a configuration option to disable the local websocket server, it is a great idea so I have created a suggestion [here.](https://jira.atlassian.com/browse/CONFSERVER-60273)

Please vote on the linked Jira ticket to raise it to team's attention.

Also just noting that although the error message is annoying, it does not have any negative consequences if you are not using older versions of Confluence.

Thanks!


author: Alex K
body: In Companion 1.3.0, you can now disable the launching of the local websocket server by modifying the companionConfig.json file in the install directory and setting

```
"websocketsEnabled":"false"`
```

The location of this config file is:  

For the .exe:

```
C:\Users\username\AppData\Local\atlassian-desktop-companion/app-version/resources/companionConfig.json
```

For the .msi:

```
C:\Program Files (x86)\Atlassian Companion/resources/companionConfig.json
```

For the .dmg:

```
/Applications/Atlassian Companion.app/Contents/Resources/companionConfig.json???
```

<br />

<br />

*** ** * ** ***

When the versions of Confluence supporting websockets reach End of Life, then we will disable the websocket server by default and eventually remove it entirely.


Tags: atlassian-companion

confluence-server

server