The java project under Linux uses JCIFS to access windows's attachment server connection timeout?

problem description

use jcifs to connect to the attachment server of windows, which can be accessed when the native eclipes is started. The linux of the official server always reports connection timeout, but if the attachment is started and manipulated locally, the official server can also be accessed at this time

the platform version of the problem and what methods you have tried

related codes


    
    NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(null, adminName, adminPassword);
    SmbFile remoteFile = new SmbFile(smbUrl.toString()+url,auth);
    
    remoteFile.connect();
 
    response.setCharacterEncoding("utf-8");
    response.setContentType(type);
    InputStream smbInputStream = new BufferedInputStream(new SmbFileInputStream(remoteFile));
    try{
        StreamUtils.copy(smbInputStream,response.getOutputStream());
    }finally{
        smbInputStream.close();
    }


Dec.06,2021
Menu