The msg fiels is paramiko Message object. It cannot be converted simply via str().
Apparently the Gerrit Trigger plugin only recognizes the value if it matches specific pattern. Therefore there must be "gerrit version 2.16.7" so we can use all features of the plugin.