Closed liuchong closed 1 year ago
I can confirm that I also encounter this issue.
Reproduction
$ cargo new --bin foo
then edit the Cargo.toml
and main.rs
(the latter of which is the example from https://github.com/mitsuhiko/systemfd/blob/692f6fddd54d1bae2beb4b3bc25755e4dc93971c/README.md):
$ cd foo
$ export RUST_BACKTRACE=1 && systemfd --no-pid -s http::3000 -- cargo watch -x "run"
Output
System information
Other information
I get pretty much the same output when I use the example from https://github.com/actix/actix-website/blob/a52fa2fd2a892776d7c1e08360e032b7fc3f6fa6/content/docs/autoreload.md:
On the other hand, successful compilation occurs when systemfd
is not used (this is also true with the example from https://github.com/mitsuhiko/systemfd/blob/692f6fddd54d1bae2beb4b3bc25755e4dc93971c/README.md):
Got same error here, using macOS.
And I finally fixed this by add the sudo
:
sudo systemfd --no-pid -s 'http::3000' -- cargo watch -x run
Hope that helps.
PS: Does this has to be runned with the root permission?
I want to say I've also been experiencing this issue. I'm on Ubuntu 18.04. In fact, I've been using this for my dev setup for months and it was working great.
Recently I set up my vscode debugger and now this error has been happening.
What's even more odd... it only happens in the VSCode integrated terminal. If I use my normal terminal, everything works fine. And it started out of the blue... rendering my integrated terminal useless now.
I see this issue when I try to use two sockets. Using a single socket works fine.
I don't see anywhere in systemfd where it would actually arrange the socket fds to start from SD_LISTEN_FDS_START=3. On some runs, it gets
socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 3
and works, on some runs it gets
socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 6
and then fd 3 is whatever random junk it is.
when I run a command with my very simple tool cargo-x "cargo x reload", which reload was set to
I found an error
I've made a test, create a shell script systemfd.sh with commands and chmod +x
then run command
after this, run two command
the first command run successfully, while the second one failed with the same error message I've found in the beginning.
Above is what I've found, could you please help me to check if something wrong I made? Thanks a lot!