Java implements Python requests module linux reporting error

find a JAVA implementation Python requests module on the Internet (JAVA implements the Http request)

try {
            logger1.info("===============>>>>>" + Path + "------------>>" + headers);
            data= Requests.post(Path)
                    .headers(headers )
                    .requestCharset(cs)
                    .send()
                    .readToText();
        }catch (Exception e){
            e.printStackTrace();
            data = "error";
        }

where Charset cs = Charset.forName ("utf-8");

there is no problem for this code to run locally on window, but it will report an error when deployed to the server, and there is no problem with the parameters passed on the log printing. what is the reason for this?

Dec.08,2021

send the exception message


exception message print result: no exception message was seen before unknowhostException,. Just configure the domain name and ip under hosts

.
  • Does a single thread need a lock?

    < H2 > recently wrote a background management system based on springboot, which provides many interfaces to add, delete, modify and insert databases without manually creating any threads. I wonder if there will be problems if concurrency occurs < H2 ...

    Dec.08,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36cb8-2c024.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36cb8-2c024.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?