java – Could not establish smb connection because of error STATUS_BAD_NETWORK_NAME in NIFI

I am trying to use PutSmbFile processor in Apache NIFI to write some files. However I am getting the following error:

GetSmbFile(id=df5140e6-b9a6-1fdsfsd)
Could not establish smb connection because of error STATUS_BAD_NETWORK_NAME (0xc00000cc):
Could not connect to XX.XX.XX.Xfs: com.hierynomus.mssmb2.SMBApiException: STATUS_BAD_NETWORK_NAME (0xc00000cc): Could not connect to XX.XX.XX.Xfs

But the same works when trying via python