0

I was using spring boot for my application. I deployed the jar file using the command java -jar ...jarname.jar. it's working only when the command prompt or putty is open.

when I close the command prompt or putty and trying to access the service, I am getting the below exception.

Caused by: java.net.ConnectException: Connection refused: connect

Please let me know the issue.

Muhammad Shahzad
  • 9,340
  • 21
  • 86
  • 130
Prithivi Raj
  • 2,658
  • 1
  • 19
  • 34

1 Answers1

1

If we are talking about the Linux put ampersand after the command e.g. 'java -jar ...jarname.jar &' ... This way the command will be ran in the background and detached from console. See here ...

Community
  • 1
  • 1
David Marko
  • 2,477
  • 3
  • 27
  • 58