-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Named pipe stops working after a while the system is on #20
Comments
There may be something wrong with the omni-socat process. Create a debug log output mode to check the status. |
Please ps the socat process startup in WSL. $ ps axuw|grep socat
masahide 14784 0.0 0.0 6968 1788 ? Ss 13:43 0:00 socat UNIX-LISTEN:/home/masahide/.ssh/agent.sock,fork EXEC:/home/masahide/omni-socat/omni-socat.exe,nofork |
https://github.com/masahide/OmniSSHAgent/releases/tag/0.3.1 Added debug log output mode to omni-socat. In WSL console, do the following # kill socat prosess
killall socat
# remove old omni-socat.exe
rm ~/omni-socat/omni-socat.exe Rewrite ~/omni-socat/ubuntu-bash.setup.sh
to
Restart WSL console. # Try ssh-agent communication
ssh-add -l
# cat logfile
cat /mnt/c/User/<user_name>/omni-socat.log
2022/05/27 21:24:19 npipe2stdin.go:44: Started omni-socat
2022/05/27 21:24:19 npipe2stdin.go:51: Opened pipe:[\\.\pipe\openssh-ssh-agent]
2022/05/27 21:24:19 npipe2stdin.go:58: Disconnected. [<nil>] |
There isn't a specific time when this occurs
Yes, the error of the OP
This after updating to 0.3.1:
After update the result is:
|
It seems that /usr/bin/socat and $HOME/omni-socat/omni-socat.exe are not communicating. Check $SSH_AUTH_SOCK $ echo $SSH_AUTH_SOCK
/home/masahide/.ssh/agent.sock Check if omni-socat.exe is executable from WSL. $ ~/omni-socat/omni-socat.exe -h
Usage of omni-socat.exe:
-debug
Output debug log Manually start socat and check operation # Kill already activated socat
killall socat
# Start socat
socat UNIX-LISTEN:$HOME/.ssh/agent.sock,fork EXEC:"$HOME/omni-socat/omni-socat.exe -debug" Start another console to check. masahide@DESKTOP-BI62AKS:~$ ls -la $SSH_AUTH_SOCK
srwxr-xr-x 1 masahide masahide 0 May 28 16:16 /home/masahide/.ssh/agent.sock
masahide@DESKTOP-BI62AKS:~$ ssh-add -l |
First console:
Second console:
|
Perhaps you do not have execute permissions? Check the permissions on ~/omni-socat/omni-socat.exe > ls -la ~/omni-socat/omni-socat.exe
-rwxrwxrwx 1 masahide masahide 3675648 May 27 21:16 /home/masahide/omni-socat/omni-socat.exe* |
Let me try to chmod it |
I wonder why... It looks like the file is corrupt. $ curl https://github.com/masahide/OmniSSHAgent/releases/latest/download/omni-socat.zip -sLo omni-socat.zip
$ unzip omni-socat.zip
Archive: omni-socat.zip
inflating: omni-socat.exe
$ sha1sum omni-socat.exe
d34e4797eaa493b301356d361a8d5473913b41fb omni-socat.exe
$ ls -la omni-socat.exe
-rwxrwxrwx 1 masahide masahide 3675648 May 27 21:16 omni-socat.exe
$ ./omni-socat.exe -h
Usage of omni-socat.exe:
-debug
Output debug log
$ uname -a
Linux DESKTOP-BI62AKS 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
I don't know redownloading helped, I'll let you know in some days if I get the error again. |
It was working on Friday (May 27) but broke between then and today (May 31). I tried:
None of those worked Rebooted my laptop, and it's back to working again 🤷 |
Thank you for your report. |
@masahide got this again and nothing has been logged
|
Thank you very much. Do you get help by running |
Rebooted and works... next time! |
@masahide new case:
|
Thanks. It may be a problem with the combination of socat and WSL2. I'll look into it some more, but if there's nothing I can do about it. I think I can solve this problem by creating something like |
New issue today, but I don't know if it's related:
Log:
|
Useful detail (maybe): restarting 1password when this happens fixes the issue |
When 1password was restarted, did socat recover without KILL? |
Yes, I only restart 1Password. Other things and services are untouched |
It may be a glitch on 1password's part. Could you try
If you get a key list error with ssh-add.exe, it may be a bug on 1password's side. |
@masahide windows ssh-add never worked for me (in the PC I'm currrently using. On another PC works):
I'm not sure whether restarting 1Password fixes the original test (I will try that when I get it), but it fixes this one: #20 (comment) |
If |
I've debugged a bit and it seems Omni overwrites the pipe used by Microsoft OpenSSH:
I've checked in env variables and there was a manually added SSH_AUTH_SOCK variable that was causing this issue. I'll keep you updated if I have the previous issues |
Sorry, I'm sorry, I'm not sure if you are using Cygwin/MSYS2/Git for windows. |
No, I'm not using Cygwin and the others. I'm only using WSL2 and rarely Powershell |
I've been using this every day since I added my comments, and it's been stable ever since then. I guess something changed, but I don't know what. |
Thank you for the information. |
It seems that named pipe stops working after a while the system is on:
WSL:
However, Git bash works:
I've currently tested the named pipe mode and the 1password proxy mode and the two modes are affected.
Do you have any clue?
Thanks
The text was updated successfully, but these errors were encountered: