# Julia vscode with remote-ssh ENAMETOOLONG

**URL:** <https://discourse.julialang.org/t/julia-vscode-with-remote-ssh-enametoolong/115937>\
**Category:** VS Code\
**Tags:** vscode\
**Created:** [June 20, 2024, 3:56pm UTC](https://discourse.julialang.org/t/julia-vscode-with-remote-ssh-enametoolong/115937 "2024-06-20T15:56:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![grunst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/grunst/32/9271_2.png) [@grunst](https://discourse.julialang.org/u/grunst)\
**Post date:** [June 20, 2024, 3:56pm UTC](https://discourse.julialang.org/t/julia-vscode-with-remote-ssh-enametoolong/115937/1 "2024-06-20T15:56:05Z")

</div>

Trying to use julia vscode extension with remote-ssh I get

```julia
ERROR: LoadError: IOError: connect: name too long (ENAMETOOLONG)
Stacktrace:
 [1] wait_connected(x::Base.PipeEndpoint)
   @ Sockets /usr/local/apps/julia/1.10.0/share/julia/stdlib/v1.10/Sockets/src/Sockets.jl:528
 [2] connect
   @ /usr/local/apps/julia/1.10.0/share/julia/stdlib/v1.10/Sockets/src/Sockets.jl:563 [inlined]
 [3] connect
   @ /usr/local/apps/julia/1.10.0/share/julia/stdlib/v1.10/Sockets/src/PipeServer.jl:103 [inlined]
 [4] serve(args::String; is_dev::Bool, crashreporting_pipename::String)
   @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/packages/VSCodeServer/src/VSCodeServer.jl:113
 [5] top-level scope
   @ ~/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/terminalserver/terminalserver.jl:47
in expression starting at /home/fars/.vscode-server/extensions/julialang.language-julia-1.79.2/scripts/terminalserver/terminalserver.jl:20

ERROR: LoadError: IOError: connect: name too long (ENAMETOOLONG)

```

Adding a `println.(args)` on line 22 of `terminalserver.jl` gives

```julia
/etc/ecmwf/ssd/ssd1/tmpdirs/user.3371913.20240620_152946.442/vsc-jl-repl-a7fed03e-0383-4fb5-b056-9c5c339082d7
/etc/ecmwf/ssd/ssd1/tmpdirs/user.3371913.20240620_152946.442/vsc-jl-cr-5424b91d-00cd-4175-937b-87c0ac093867
USE_REVISE=true
USE_PLOTPANE=true
USE_PROGRESS=true
ENABLE_SHELL_INTEGRATION=true
DEBUG_MODE=false

```

The first one is used as the socket and is 110 characters which is indeed too long (e.g. remark in `PipeServer.jl`)

> <https://github.com/JuliaLang/julia/blob/0a491e00a1f38b814ca173bd7d9bffeadde65738/stdlib/Sockets/src/PipeServer.jl#L74>

Is there any workaround or way to control the name that the vscode extensions uses for these socket?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [June 24, 2024, 10:04am UTC](https://discourse.julialang.org/t/julia-vscode-with-remote-ssh-enametoolong/115937/2 "2024-06-24T10:04:21Z")

</div>

There is not. I don’t think there’s any real making the name user-controllable – there are only two constraints for it after all: being valid (i.e. short enough) and being unique.

> <https://github.com/julia-vscode/julia-vscode/issues/3622>
>
> https://discourse.julialang.org/t/julia-vscode-with-remote-ssh-enametoolong/1159…37
> 
> Should limit the named pipe's path length to 92 or so chars.

---

<div class="post-metadata">

**Author:** ![grunst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/grunst/32/9271_2.png) [@grunst](https://discourse.julialang.org/u/grunst)\
**Post date:** [June 24, 2024, 1:10pm UTC](https://discourse.julialang.org/t/julia-vscode-with-remote-ssh-enametoolong/115937/3 "2024-06-24T13:10:43Z")

</div>

Thanks for creating the issue!  
If others run into this. If the path is just a few characters to long you can

```julia
cd ~/.vscode-server/extensions/julialang.language-julia-1.79.2/dist
sed -i 's/vsc-jl-repl/v/g' extension.js
sed -i 's/vsc-jl-repl/v/g' extension.js.map

```

---

<div class="post-metadata">

**Author:** ![bmwilly](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bmwilly/32/213977_2.png) [@bmwilly](https://discourse.julialang.org/u/bmwilly)\
**Post date:** [December 20, 2024, 11:47am UTC](https://discourse.julialang.org/t/julia-vscode-with-remote-ssh-enametoolong/115937/4 "2024-12-20T11:47:17Z")

</div>

@grunst thanks, this hack finally allowed me to open a Julia REPL 🙃

FWIW, I had the same issue and used the same hack with the client-side extension in `~/.vscode/`.

---

<div class="post-metadata">

**Author:** ![stefaniecg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefaniecg/32/204815_2.png) [@stefaniecg](https://discourse.julialang.org/u/stefaniecg)\
**Post date:** [November 13, 2025, 10:16am UTC](https://discourse.julialang.org/t/julia-vscode-with-remote-ssh-enametoolong/115937/5 "2025-11-13T10:16:03Z")

</div>

Hi, i’m stuck for Julia REPL does work properly in VCS, it gives me this error, and then it does not run my script.

I tried the work around proposed by @grunst, but for some reason it is not working.

Any ideas what might be new in the latest release?

```julia-auto
ERROR: LoadError: IOError: connect: name too long (ENAMETOOLONG)
Stacktrace:
 [1] wait_connected(x::Base.PipeEndpoint)
   @ Sockets ~/.julia/juliaup/julia-1.12.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.12/Sockets/src/Sockets.jl:544

```
