Guys, I do have a Python toolbox developed under ArcGIS 10.6. This is used in ArcGIS Desktop 10.3.1 and it works without any issues. Also the publishing on ArcGIS Server 10.3.1 works without any issues.
When I open the toolbox on the server in another environment I see the GUI and can select start. Yet after the start it terminates with the message "tool is invalid".
It works perfectly on my ArcGIS Server 10.3.1 single machine deployment but fails with the described error in the other environment.
The python version is the same on both servers.
I've seen this thread, yet the answers were not quite sufficient.
The tool structure is as follows:
I just saw recently, that my code contained a nice little snippet in the updateMessages function, which is "invalid" from a Python persepctive:
parameters.setWarningMessage ( "Original value was " + str(old) + "m. " "Rounded to " + parameters.valueAsText + " as it is a multiple of 1000m.")
Yet the tool was valid....
I will try the changes in the target environment...