Menu

#404 java.lang.RuntimeException: Unable to configure SunPKCS11 provider Initialization failed slotListIndex is 0 but token only has 0 slots

v6.0.1
open
None
5
2022-10-01
2022-08-11
No

Hi. I had DavMail 6.0.1 running fine on CentOS 7.x. My sys admins recently upgraded my Linux box at work to RHEL 8.6 (actually Oracle Linux 8.6 but it's basically identical to RHEL), and now DavMail isn't working. The log shows this:

WARN [ImapConnection-60182] davmail - DavMail configuration exception:
Connect exception: java.lang.RuntimeException Unable to configure SunPKCS11 provider Initialization failed slotListIndex is 0 but token only has 0 slots

I'm using O365Manual mode where you copy a URL and paste it in your web browser in order to authenticate with a card reader. But I can't seem to get that far where it will let me do that anymore.

Is there any fix or workaround?

I created an issue on GitHub about this last week. Sorry, I keep forgetting DavMail development isn't done on GitHub. :-)

https://github.com/mguessan/davmail/issues/226

Thanks,
Ed

Discussion

  • Edward J. Sabol

    Edward J. Sabol - 2022-08-18

    Please help!

     
  • Edward J. Sabol

    Edward J. Sabol - 2022-09-29

    Any ideas?

     
  • Edward J. Sabol

    Edward J. Sabol - 2022-10-01

    After almost 2 months of banging my head on this and not seeing emails sent to me in a timely fashion, I finally found a solution (or a workaround)!

    All it required was changing

    davmail.ssl.pkcs11Library=/usr/lib64/pkcs11/opensc-pkcs11.so

    to

    davmail.ssl.pkcs11Library=/usr/lib64/pkcs11/gnome-keyring-pkcs11.so

    in my ~/.davmail.properties file.

    I came across a completely-unrelated-to-DavMail posting somewhere which recommended switching from opensc-pkcs11.so to gnome-keyring-pkcs11.so for something else, so I thought I'd give it a try. I'm so very happy to discover that it worked for DavMail!

    I suspect DavMail could catch and ignore the "Unable to configure SunPKCS11 provider Initialization failed slotListIndex is 0 but token only has 0 slots" exception when using O365Manual mode, but I don't know really.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.