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

Error: Failed connecting to the YubiKey [0.4.1/Arch Linux] #19

Closed
subsetpark opened this issue Aug 15, 2017 · 10 comments
Closed

Error: Failed connecting to the YubiKey [0.4.1/Arch Linux] #19

subsetpark opened this issue Aug 15, 2017 · 10 comments

Comments

@subsetpark
Copy link

subsetpark commented Aug 15, 2017

Seems related to #13, but neither reinserting nor rebooting resolve the issue.

 ; ykman --version
YubiKey Manager (ykman) version: 0.4.1
Libraries:
    libykpers 1.18.0
    libu2f-host 1.1.3
    libusb 1.0.21

 ; ykman info
Device name: YubiKey 4
Serial number: XX21078
Firmware version: 4.3.3
Enabled connection(s): OTP+U2F+CCID

Device capabilities:
    OTP:	Enabled
    U2F:	Enabled
    CCID:	Enabled
    OPGP:	Enabled
    PIV:	Enabled
    OATH:	Enabled

 ; ykman oath
Usage: ykman [OPTIONS] COMMAND [ARGS]...

Error: Failed connecting to the YubiKey.

gpg-agent is enabled, but stopping the systemd service doesn't resolve the issue either.

@dagheyman
Copy link
Contributor

It looks similar to this issue Yubico/yubioath-flutter#172. Could you try the solution proposed in the last post?

@subsetpark
Copy link
Author

@dagheyman For better or worse, that does not seem to be the case here:

  1. pcscd was installed but not running.
  2. I enabled/started pcscd -> ykman oath still doesn't work.
  3. I reinserted -> same error.
  4. I rebooted (confirmed pcscd is running) and reinserted -> same error.

@dagheyman
Copy link
Contributor

Interesting. I'm guessing the other CCID commands doesn't work neither?
Like $ ykman piv info or $ ykman openpgp info?

Does killing scdamoen make any difference? (re-insert device after)
$ killall -9 scdaemon

@subsetpark
Copy link
Author

Correct on all accounts. scdaemon isn't running, so killall doesn't apply.

@subsetpark
Copy link
Author

Ok, this is very interesting. I installed the yubico-yubioath-desktop package, with the following dependencies:

AUR Packages  (1)�� yubico-yubioath-desktop-git-latest  
Repo Packages (3)�� ccid-1.4.27-2  python-pyotherside-1.5.0-3  qt5-svg-5.9.1-2  

That works - running yubioath-desktop brings up the OATH list.

But what's really interesting is, with those packages installed, ykman oath list now works as well!

For posterity, here's the whole install log:

::�� Checking yubico-yubioath-desktop-git�� integrity...
==> Making package: yubico-yubioath-desktop-git 690-1 (Thu Aug 17 18:13:19 EDT 2017)
==> Retrieving sources...
  -> Cloning yubioath-desktop git repo...
Cloning into bare repository '/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/yubioath-desktop'...
remote: Counting objects: 3661, done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 3661 (delta 28), reused 38 (delta 15), pack-reused 3605
Receiving objects: 100% (3661/3661), 1.68 MiB | 3.58 MiB/s, done.
Resolving deltas: 100% (2427/2427), done.
  -> Cloning pyotherside git repo...
Cloning into bare repository '/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/pyotherside'...
remote: Counting objects: 1174, done.
remote: Total 1174 (delta 0), reused 0 (delta 0), pack-reused 1174
Receiving objects: 100% (1174/1174), 481.79 KiB | 2.59 MiB/s, done.
Resolving deltas: 100% (725/725), done.
  -> Cloning yubikey-manager git repo...
Cloning into bare repository '/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/yubikey-manager'...
remote: Counting objects: 3176, done.
remote: Compressing objects: 100% (94/94), done.
remote: Total 3176 (delta 107), reused 101 (delta 59), pack-reused 3022
Receiving objects: 100% (3176/3176), 886.24 KiB | 2.58 MiB/s, done.
Resolving deltas: 100% (2308/2308), done.
  -> Cloning qt-solutions git repo...
Cloning into bare repository '/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/qt-solutions'...
remote: Counting objects: 2104, done.
remote: Total 2104 (delta 0), reused 0 (delta 0), pack-reused 2104
Receiving objects: 100% (2104/2104), 1.61 MiB | 2.92 MiB/s, done.
Resolving deltas: 100% (1409/1409), done.
==> Validating source files with sha256sums...
    yubioath-desktop ... Skipped
    pyotherside ... Skipped
    yubikey-manager ... Skipped
    qt-solutions ... Skipped
::�� Building yubico-yubioath-desktop-git�� package(s)...
==> Making package: yubico-yubioath-desktop-git 722-1 (Thu Aug 17 18:13:25 EDT 2017)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (3) qt5-svg-5.9.1-2  ccid-1.4.27-2  python-pyotherside-1.5.0-3

Total Download Size:   0.07 MiB
Total Installed Size:  0.96 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 ccid-1.4.27-2-x86_64                  67.1 KiB   722K/s 00:00 [##################################] 100%
(3/3) checking keys in keyring                                 [##################################] 100%
(3/3) checking package integrity                               [##################################] 100%
(3/3) loading package files                                    [##################################] 100%
(3/3) checking for file conflicts                              [##################################] 100%
(3/3) checking available disk space                            [##################################] 100%
:: Processing package changes...
(1/3) installing ccid                                          [##################################] 100%
(2/3) installing qt5-svg                                       [##################################] 100%
(3/3) installing python-pyotherside                            [##################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Starting build()...
Info: creating stash file /home/zax/.cache/pacaur/yubico-yubioath-desktop-git/src/yubioath-desktop/.qmake.stash
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ivendor/qt-solutions/qtsingleapplication/src -isystem /usr/include/qt -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -o main.o main.cpp
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ivendor/qt-solutions/qtsingleapplication/src -isystem /usr/include/qt -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -o systemtray.o systemtray.cpp
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ivendor/qt-solutions/qtsingleapplication/src -isystem /usr/include/qt -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -o qtsingleapplication.o vendor/qt-solutions/qtsingleapplication/src/qtsingleapplication.cpp
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ivendor/qt-solutions/qtsingleapplication/src -isystem /usr/include/qt -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -o qtlocalpeer.o vendor/qt-solutions/qtsingleapplication/src/qtlocalpeer.cpp
/usr/bin/rcc -name resources resources.qrc -o qrc_resources.cpp
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ivendor/qt-solutions/qtsingleapplication/src -isystem /usr/include/qt -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -o qrc_resources.o qrc_resources.cpp
g++ -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -dM -E -o moc_predefs.h /usr/lib/qt/mkspecs/features/data/dummy.cpp
/usr/bin/moc -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/src/yubioath-desktop -I/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/src/yubioath-desktop/vendor/qt-solutions/qtsingleapplication/src -I/usr/include/qt -I/usr/include/qt/QtQuick -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtQml -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -I/usr/include/c++/7.1.1 -I/usr/include/c++/7.1.1/x86_64-pc-linux-gnu -I/usr/include/c++/7.1.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include-fixed -I/usr/include vendor/qt-solutions/qtsingleapplication/src/qtsingleapplication.h -o moc_qtsingleapplication.cpp
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ivendor/qt-solutions/qtsingleapplication/src -isystem /usr/include/qt -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -o moc_qtsingleapplication.o moc_qtsingleapplication.cpp
/usr/bin/moc -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/src/yubioath-desktop -I/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/src/yubioath-desktop/vendor/qt-solutions/qtsingleapplication/src -I/usr/include/qt -I/usr/include/qt/QtQuick -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtQml -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -I/usr/include/c++/7.1.1 -I/usr/include/c++/7.1.1/x86_64-pc-linux-gnu -I/usr/include/c++/7.1.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include-fixed -I/usr/include vendor/qt-solutions/qtsingleapplication/src/qtlocalpeer.h -o moc_qtlocalpeer.cpp
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ivendor/qt-solutions/qtsingleapplication/src -isystem /usr/include/qt -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -o moc_qtlocalpeer.o moc_qtlocalpeer.cpp
/usr/bin/moc -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/src/yubioath-desktop -I/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/src/yubioath-desktop/vendor/qt-solutions/qtsingleapplication/src -I/usr/include/qt -I/usr/include/qt/QtQuick -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtQml -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -I/usr/include/c++/7.1.1 -I/usr/include/c++/7.1.1/x86_64-pc-linux-gnu -I/usr/include/c++/7.1.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include-fixed -I/usr/include screenshot.h -o moc_screenshot.cpp
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ivendor/qt-solutions/qtsingleapplication/src -isystem /usr/include/qt -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -o moc_screenshot.o moc_screenshot.cpp
/usr/bin/moc -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB --include ./moc_predefs.h -I/usr/lib/qt/mkspecs/linux-g++ -I/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/src/yubioath-desktop -I/home/zax/.cache/pacaur/yubico-yubioath-desktop-git/src/yubioath-desktop/vendor/qt-solutions/qtsingleapplication/src -I/usr/include/qt -I/usr/include/qt/QtQuick -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtQml -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtCore -I/usr/include/c++/7.1.1 -I/usr/include/c++/7.1.1/x86_64-pc-linux-gnu -I/usr/include/c++/7.1.1/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include -I/usr/local/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include-fixed -I/usr/include systemtray.h -o moc_systemtray.cpp
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DAPP_VERSION=\"4.1.4\" -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ivendor/qt-solutions/qtsingleapplication/src -isystem /usr/include/qt -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt/mkspecs/linux-g++ -o moc_systemtray.o moc_systemtray.cpp
g++ -Wl,-O1 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o yubioath-desktop main.o systemtray.o qtsingleapplication.o qtlocalpeer.o qrc_resources.o moc_qtsingleapplication.o moc_qtlocalpeer.o moc_screenshot.o moc_systemtray.o   -lQt5Quick -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL -lpthread 
==> Entering fakeroot environment...
==> Starting package()...
/usr/bin/qmake-qt5 -install qinstall -exe yubioath-desktop /home/zax/.cache/pacaur/yubico-yubioath-desktop-git/pkg/yubico-yubioath-desktop-git//usr/bin/yubioath-desktop
strip /home/zax/.cache/pacaur/yubico-yubioath-desktop-git/pkg/yubico-yubioath-desktop-git//usr/bin/yubioath-desktop
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issue...
==> Creating package "yubico-yubioath-desktop-git"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: yubico-yubioath-desktop-git 722-1 (Thu Aug 17 18:13:37 EDT 2017)
==> Cleaning up...
::�� Installing yubico-yubioath-desktop-git�� package(s)...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) yubico-yubioath-desktop-git-722-1

Total Installed Size:  0.15 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                 [##################################] 100%
(1/1) checking package integrity                               [##################################] 100%
(1/1) loading package files                                    [##################################] 100%
(1/1) checking for file conflicts                              [##################################] 100%
(1/1) checking available disk space                            [##################################] 100%
:: Processing package changes...
(1/1) installing yubico-yubioath-desktop-git                   [##################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating the desktop file MIME type cache...

@dagheyman
Copy link
Contributor

dagheyman commented Aug 18, 2017

Great that it works now. My guess is that it was the installation of the ccid package that resolved the issue, so that might need to be added as a dependency to yubikey-manager. I'll try to reach out to the maintainers of the package.

Edit: I filed a bug for the Arch package https://bugs.archlinux.org/task/55191

@subsetpark
Copy link
Author

Thanks @dagheyman - but after a little bisection, it actually looks like python-pyotherside - not ccid.

@dagheyman
Copy link
Contributor

Closing this since it relates to the (unofficial) packaging on Arch in some way (my guess is either a missing dependency or a service that need to be started).

@tchebb
Copy link

tchebb commented Oct 15, 2017

For future reference, the two needed packages on Arch for CCID communication are ccid and pcsclite. pcscd.socket also has to be running (started or enabled using systemctl, typically). python-pyotherside definitely isn't related.

@szebenyib
Copy link

Yes! The above were needed, now yubikey manager sees the device

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

No branches or pull requests

4 participants