I want to use Nmap for port knocking on CTF machines, so I've read the manual for configuring it properly:
nmap <ip> -p <port1>,<port2>,... -r --max-retries 0 --max-parallelism 1
-r ensures ports are scanned in the listed order,
--max-retries 0 ensures that ports are not probed more than once, and
max-parallelism 1 ensures that only a single thread runs.
However, the above Nmap command fails to open the hidden service. If I instead use the following port knocking client everything just works: