Home > Back-end >  Small white inquired, run after packaged jar and alone is not the same as the operation result is wh
Small white inquired, run after packaged jar and alone is not the same as the operation result is wh

Time:10-05

Concrete is like this:

Such as a program need to connect a redis, but local and redis address is blocked, I tried two ways to run the

1. Direct local debugging program, program execution, will show that the application is running all the time, but not an error connection refused
2. Then I dozen jars, or locally run the program, there will be the following error
Under Caused by: java.net.ConnectException: Connection refused (Connection refused)

The small white is, why the local debugging and running of time will not directly said error network impassability? ? Bosses, please answer the small white thank you very much!

CodePudding user response:

Running environment is what kind of error message is the network connection was refused

CodePudding user response:

But local and redis address is blocked? Redis on other host, open ports or close to the firewall

CodePudding user response:

Running environment are local ha, only one is the direct way to debug, one is blended into jars, the command line run the jar package, so I doubt is the environment are all the same, why the jar package run will be an error, and trial run is not an error has been performed, no result, no result is connected not redis, but why not an error prompt
  • Related