SAS 9.4M7 on four Windows Server 2019 platforms (metadata, compute, mid-tier, LASR)
Does anyone know a way to test from a Windows Powershell command whether the metadata server is started? After applying Windows Updates on our servers they are scheduled to reboot overnight. However, the metadata server is taking significantly longer to restart than the other three and so any SAS services on the other servers which rely on the metadata server are failing to start. I have Powershell scripts on all the servers to start all the SAS services but some won't start properly if there's no metadata (crucially, Object Spawners). So I wanted them to check for the metadata before continuing. The scripts are run by Windows Task Scheduler as internal System accounts so they can't use WMI or CIM to check the metadata service.
Of course, I could simply delay the restarts to a time when the metadata server should have restarted but that has the possibility of failing too if it's not given long enough.
Thanks.
I think you could run a batch SAS program that does the following:
Your powershell script could run this batch SAS program, and then wait until it finishes and look for the signal files and proceed accordingly.
Carl Sommer
This looks exactly like what I was wanting. But will it test whether there is a response on the port, or just whether the port is open?
If you really wanted to ensure that you were talking to a functional metadata server, then you would want to pursue the PROC METADATA approach. That's more code and coordination than the command @gwootton suggested.
Carl
That answers my question. I'll give it a try. I don't think there's any data of anything else listening on port 8561. Thanks Greg (and Carl).
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.