Nsight Systems Error: No GPU associated to the given GPU ID

I am profiling a CUDA app on a server using its local nsight system. As I started profiling, I got the following error message:

ErrorText: GPU Metrics: No GPU associated to the given GPU ID,

and accordingly, profiling failed afterwards. This error message never showed up before. I double-checked options in GPU metrics, and verified that all indices listed there are associated with physical GPUs. What caused the error message to be thrown?