# Port conflict when running several nodes on a Slurm cluster

**URL:** <https://discourse.julialang.org/t/port-conflict-when-running-several-nodes-on-a-slurm-cluster/85024>\
**Category:** Performance\
**Tags:** question\
**Created:** [July 30, 2022, 9:49am UTC](https://discourse.julialang.org/t/port-conflict-when-running-several-nodes-on-a-slurm-cluster/85024 "2022-07-30T09:49:05Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![matthiasbe](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@matthiasbe](https://discourse.julialang.org/u/matthiasbe)\
**Post date:** [July 31, 2022, 6:20pm UTC](https://discourse.julialang.org/t/port-conflict-when-running-several-nodes-on-a-slurm-cluster/85024/3 "2022-07-31T18:20:10Z")

</div>

Thank you for your suggestion.

Deducting from your comment I realized I had the wrong conclusion. In my case the ports are all different on a given IP (node). They only overlap across nodes, but as you pointed out this actually should not be a problem. Practice supported this idea, I had several runs with overlapping ports across nodes without the “connection refused” error.

Then I don’t know where the `connection refused` error come from. Most probably some nodes can not connect together over a given port. I should be related to the cluster configuration, and administrators could not give me answers yet.

I could not implement the suggestion in the link you provided, because the perl workaround also generates unwanted quotes (maybe it’s new in recent version ?). Actually after reading about the `Cmd` Object, it seems that it is the expected behavior. Indeed it prevents code injection from Julia on the cluster [1].  
Then I don’t know how to control the port range parameters when using `ClusterManager.jl`. It could solve my problem if this problem is related to ports.

Still investigating about this. If anyone has pointers to port configuration in julia `Distributed` and `ClusterManager.jl`, and TCP socket error `connection refused` cause, any reference is helpful.

[1] See this [thread](https://discourse.julialang.org/t/better-support-for-running-external-commands/44933)

> [@Better support for running external commands](https://discourse.julialang.org/t/better-support-for-running-external-commands/44933/2):
>
> This is actually a feature, because it protects you from command injection

[Other reference very much related](https://discourse.julialang.org/t/addprocs-crashes-with-connection-refused-econnrefused/66099)

---

_[View the full topic](https://discourse.julialang.org/t/port-conflict-when-running-several-nodes-on-a-slurm-cluster/85024)._
