SP 2016 on -premises error: Sorry, we’re having trouble reaching the server

while sharing permission and in all sorts of people picker i’m getting this error “Sorry, we’re having trouble reaching the server” enter image description here on clicking Shared with i’m getting error “unexpected response data from serverenter image description here

i tried the following,

  • resetting IIS,
  • restarted the server
  • different user names
  • memory space is sufficinet

Please help me in fixing this error