fail to open file

The path is wrong, the file is unreadable, or its index is missing

why

htslib reports the same message for a missing path, a permissions problem, and a file whose companion index is absent. Inside a container or on a cluster node, a path that exists for you may simply not be mounted there.

what to do

Check the exact path from the same context the tool runs in — inside the container, on the compute node — not from your login shell. Then confirm the index exists next to the file (.bai, .tbi, .fai) and is newer than the file itself.

htslib error reporting
This is one entry from BioErrors, a catalogue of bioinformatics error messages that point at the wrong thing. Every entry was traced to its real cause before it was written down.
If your error is not in it, paste it there and it gets traced and added.