@indexofrefraction thanks for your reply and suggestions.
After several days testing, I fixed this issue by move the krpano tools folder under user's home directory.
When I put the krpano tools folder under "/" directory of centOS file system, register license with root, call "register show" command by either other users with "sodo" or root directly, the "show" command will return "Not registered." randomly.
But when I put the krpano tools folder under "/home/username/" directory of centOS file system, call "register show" command by the same user of registration operator, the "show" command always return the correct result.
I tested this issue with a simple script: