Zowe connection problems

Tried multiple times.

z/OSMF REST API Error:
Rest API failure with HTTP(S) status 500
category: 6
rc:       8
reason:   513
message:  fopen() failed
details: 
  - EDC5041I An error was detected at the system level when opening a file. (errno2=0xC00A0022)
  - __amrc: __last_op=401 __code=0x00080098

 Error: z/OSMF REST API Error:
Rest API failure with HTTP(S) status 500
category: 6
rc:       8
reason:   513
message:  fopen() failed
details: 
  - EDC5041I An error was detected at the system level when opening a file. (errno2=0xC00A0022)
  - __amrc: __last_op=401 __code=0x00080098