Skip to content
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

Failed to connect to the YubiKey #98

Open
emtunc opened this issue Aug 12, 2021 · 2 comments
Open

Failed to connect to the YubiKey #98

emtunc opened this issue Aug 12, 2021 · 2 comments

Comments

@emtunc
Copy link

emtunc commented Aug 12, 2021

Successfully installed via brew. Services start successfully.

Tried re-plugging the Yubikey and restarting the machine.

Big Sur - 11.5.1

Failed to connect to the YubiKey: connecting to smart card: the smart card cannot be accessed because of other connections outstanding

Is there anything I can try to help troubleshoot?

@adamwolf
Copy link

I seem to be having this same issue on 10.14.6, and I've used yubikey-agent on this machine for a while.

@tv42
Copy link

tv42 commented Sep 30, 2021

I see the same thing on Linux after a suspend+resume.

Sep 30 17:46:53 gear yubikey-agent[1582313]: 2021/09/30 17:46:53 Reconnecting to the YubiKey...
Sep 30 17:46:53 gear yubikey-agent[1582313]: 2021/09/30 17:46:53 agent 11: could not reach YubiKey: selecting piv applet: command failed: transmitting request: an attempt was made to end a non-existent transaction
Sep 30 17:46:59 gear yubikey-agent[1582313]: 2021/09/30 17:46:59 Reconnecting to the YubiKey...
Sep 30 17:46:59 gear yubikey-agent[1582313]: 2021/09/30 17:46:59 agent 11: could not reach YubiKey: connecting to smart card: the smart card cannot be accessed because of other connections outstanding

lsof says that it's yubikey-agent itself that's interfering with it, as it's the only process with a connection to pcscd:

# lsof +E /run/pcscd/pcscd.comm
COMMAND       PID USER   FD   TYPE             DEVICE SIZE/OFF    NODE NAME
systemd         1 root  407u  unix 0xffff92d818ad1400      0t0   15896 /run/pcscd/pcscd.comm type=STREAM (LISTEN)
pcscd     1051350 root    3u  unix 0xffff92d818ad1400      0t0   15896 /run/pcscd/pcscd.comm type=STREAM (LISTEN)
pcscd     1051350 root   12u  unix 0xffff92e0878e5800      0t0 2722266 /run/pcscd/pcscd.comm type=STREAM ->INO=2719629 1582313,yubikey-a,8u (CONNECTED)
yubikey-a 1582313   tv    8u  unix 0xffff92e0878e1400      0t0 2719629 type=STREAM ->INO=2722266 1051350,pcscd,12u (CONNECTED)

For me, systemctl --user restart yubikey-agent gets it functioning immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants