For the record, if you encounter this HTTP Status 400 error using ArcGIS 10.3.1 for Linux - it is a known bug. "BUG-000087955 - WMS services on ArcGIS for Server on Linux crash when performing a GetCapabilities request."
And it is solved by installing this patch: ArcGIS 10.3.1 for Server (Linux) WMS GetCapabilities Patch | Samples and Utilities
I am having the same issue adding a WMS service to not only ArcGIS Online but WebEOC. It this URL format you are recommending what you use to add a WMS service to ArcGIS Online?