tpm2-software / tpm2-abrmd

TPM2 Access Broker & Resource Management Daemon implementing the TCG spec.
https://github.com/tpm2-software/tpm2-abrmd
BSD 2-Clause "Simplified" License
115 stars 98 forks source link

Could not initialize TCTI file: do a # systemctl daemon-reload and tpm2-abrmd.service restart #833

Open kwmartin opened 1 year ago

kwmartin commented 1 year ago

I'm a TPM2 newby. I compiled and installed tpm2-abrmd. Running make check had all commands pass except: XFAIL: test/integration/start-auth-session.int which in googling found in one location statement stating it was expected to fail and no reason why? My problem is below. I have spent considerable time googling and can't find it. I have also spent a lot of time reading "A Practical Guide to TPM2.0" but all very few examples are C code, practically nothing re TPM2-Tools. The only thing I can find on using the "Tools" is the Infineon OPTIGA TM TPM Application Note; which is somewhat relevant but mostly applies to the Raspberry Pi and their chip. Anyways:


> tpm2_getcap properties-variable

** (process:409013): WARNING **: 14:33:35.992: Failed to create connection with service: Method ?CreateConnection? returned type ?(aht)?, but expected ?(t)?
ERROR:tcti:src/tss2-tcti/tctildr-dl.c:169:tcti_from_file() Could not initialize TCTI file: libtss2-tcti-tabrmd.so.0 
and so on

I eventually (by chance) found problem after 1.5 days. It might be worth mentioning in the README.md to save others time that after >sudo make install, it is necessary to: a) >sudo systemctl daemon-reload
and b)> sudo systemctl restart tpm2-abrmd.service. It's probably a good idea to check as well.
> sudo systemctl status --no-pager --full tpm2-abrmd.service.
A simple command to verify is:
> tpm2_getcap properties-variable which finally (and for the first time) /dev/tpm0 is now working.