dmolina / DaemonMode.jl

Client-Daemon workflow to run faster scripts in Julia
MIT License
275 stars 16 forks source link

ERROR: LoadError: IOError: could not spawn setenv(...) operation not supported on socket (ENOTSUP) #56

Open mhechthz opened 1 year ago

mhechthz commented 1 year ago

While DaemonModes works at home on my provate computer, i get on my work computer in the office:

ERROR: LoadError: IOError: could not spawn setenv(... julia ... -Cnative ... -g1 -O0 --output-ji  ...) operation not supported on socket (ENOTSUP)
Stacktrace:
 [1] _spawn_primitive at .\process.jl:128
 [2] #725 at .\process.jl:139
 [3] setup_stdios at .\process.jl:223
 [4] _spawn at .\process.jl:138
 [5] _spawn at .\process.jl:166
 [6] #open#734 at .\process.jl:397
 [7] open at .\process.jl:366

Might this be related to anti virus software? I read something about this in web.

Connection to the DeamonMode server from client seems to be established.

EDIT: With Julia 1.9 alpha the error vanishes.

pdetrempe commented 10 months ago

Hi there! Any idea what was causing this issue for you? I'm having a the same error message on a new computer.

Thanks!

dmolina commented 10 months ago

Could you give a little more information? In which Operative System, and which version of Julia? I need that to be able to replicate it and fix it. Thank you in advance!

pdetrempe commented 10 months ago

Yup! I'm seeing this on Windows 10 with Julia 1.9.2.

rgelleschus commented 7 months ago

I seem to have the same or a similar problem on Windows 10 with Julia 1.10.1. I get simple examples (e.g. jlcall('x -> x^2',{2.1})) to run perfectly fine. But when I try to run functions from my own project, it fails with that cryptic setenv([...]): operation not supported on socket (ENOTSUP) error.

I tried both the syntax jlcall(function_name,{inputs},'project','path/to/project','modules',{'project'}) as well as jlcall(function_name,{inputs},'setup','path/to/setup_code.jl'), where I put

using Pkg
Pkg.develop(path = "path/to/project")
import project

In the first instance, my error looked similar to what mhechthz showed. In the second instance, the stacktrace shows that the error occurs in the line with Pkg.develop().

dmolina commented 7 months ago

Thank you for your interest. I think the problem is the develop() because it create a new project and change the activated work dir. DaemonMode is going to use the activated project in the Daemon process, so I think it is better to do that in the server, not in the client (or the activate, It is not good to run develop() several times).

I personally usually I run the Daemon process setting previously JULIA_PROJECT, and the run the client, that does not Pkg activate (or develop). If you activate with the same project than the Daemon, it is working, but develop() is not right in my opinion, I never use develop inside a program, only activate.