简体   繁体   中英

The application on Angular does not receive a response from the server

There is an application on Angular, the backend is an application on Java-Spring. Both of them are running on a server in a shared network, on a Windows OC machine in VirtualBox (Linux). The essence of the problem is that when you try to open a web application in a browser, it runs completely on one computer out of five with Windows OC and on one of one on Linux OC. The browser is everywhere Chrome, only in Linux Mozilla The application itself is launched, but it does not receive data from the backend at startup. At the same time I get an error

Failed to load resource:
http://10.151.78.6:5003/es-serv/api/v1/get-data/sh1 net::ERR_CONNECTION_RESET

Here is the controller method that receives requests, there is no call to it in the logs

   @GetMapping("/get-data/" + RestApiConstants.VARIABLE_NAME)
    public ResponseEntity<ListResponse<DataDto>> getData(
       @PathVariable(RestApiConstants.PARAM_NAME_WORD) String name) {
        log.info("getData -> start");
        return converterDtoService.converterDataDto(name);
    }

Moreover, if you just try to open the link in the browser bar

http://10.151.78.6:5003/es-serv/api/v1/get-data/sh1

Then I get the data every time, I have never noticed any failures. Very similar to the problem with CORS, but then the browser gives a specific error to all requests. Yes, and cors is disabled in the Java application. And even then it is not clear why it still works on some browsers. It doesn't look like a timeout problem either, because I get an error instantly, and when the server doesn't respond, some time passes and it's noticeable. And another such moment, I added a forced data reading button to the application. And after 20-30 attempts to read the data, the answer may still come to those computers that did not receive them.

If it was a problem with the network, then it is unclear why on the same computer from the same browser, the GET request typed in the browser line gets answers all the time, without a single pass.

Tell me where to look to understand the reason?

对服务器的网络调用

The problem was solved by updating the browsers to the latest version. And before that, the browser version was not very old. I don't understand how this could affect the transmission of the GET request over the network?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM