Event Viewer error

I run IT at a small company. We have avast installed on all of our computers with our AMS on our server with Avast SBS…it has been running fine for the past few months but now I get this error…
Cannot connect Server lookup diden’t find any AMS’! socket, WinSock error 0x0000000 has occured.

I get this error every few seconds in the event viewer…and when I try to log onto the server using ADNM console I get this error.

Title: No connection could be made because the target machine actively refused it

Body: Unable to login as Administrator or connection error.

I also used the AMS Manteninece program and ran some tests by looking at the certs and such…all worked fine…I also updated the AMS program and it all worked great!?..This is confusing me greatly as this happened randomly. No prior problems…Thanks for the help!

UPDATE…Fixed the issue…for some reason the AMS did not receive the updated Key and was expired… that fixed it!..to fix…AMS Mantaince program…License program…point it to the file and presto! All fixed!