Reboot machine gracefully from CLI?

Works for me. Can you tell me the exact command you use and the error message?