Error "unable to refresh item" is returned when performing analysis using the spatial analysis tools in the Portal for ArcGIS map viewer. This error occurs when ArcGIS Web Adaptor (or any reverse proxy) is on a machine different from the hosting ArcGIS Server.
1. The hosting server should be first federated in Portal for ArcGIS before any other server. The hosting server should be first in the list of Federated servers in Portal.Or2. The hosting server and its web adaptor should be on the same machine together.