Would you mind sharing more details ? What are your environment variables ? How did you override the command ? You say it only fails on the first run, not on the following runs ?
From what your logs says, the [Errno 111] Connection refused suggest an issue that’s network related.