I just configured the Insights for ArcGIS application on our 10.5 ArcGIS Server environment. After following the guides to setup the requirements I was able to access the application. When trying to add Map Services I get "an error has occured", and watching the browser developer tools I can see that the problem is that Insights is trying to connect to the hosting ArcGIS Server with the https protocol but using the 6080 port. When configuring the web adaptor, the data store and when federating the server I always used https with port 6443. I don't know why but the application keeps trying to use the wrong port.
An example of one of the requests that causes the error could be:
As you can see, it tries to use https on port 6080.