OS and Network Services: The provided refnum is invalid

Updated Feb 15, 2023

Issue Details

When trying to get the error logs of my NI Linux Real-Time target from NI MAX. I right-click my target under Remote Devices and select View Error Log. Then I receive error: 
OS and Network Services: The provided refnum is invalid

Solution

This error can be caused by a corrupt software installation on your target. 
To fix the issue format your target from NI MAX by right-clicking the device and selecting Format Disk and following the prompts. 
Afterwards you should be able to get the Error Log from NI MAX without errors.