HTTP Status 500 - java.net.ConnectException: Connection refused (Connection refused) type Exception report message java.net.ConnectException: Connection refused (Connection refused) description The server encountered an internal error that prevented it from fulfilling this request. exception java.lang.RuntimeException: java.net.ConnectException: Connection refused (Connection refused) com.cengage.ztest.lti.LTISigningKeyResolver.loadJwkSet(LTISigningKeyResolver.java:41) com.cengage.ztest.lti.LTISigningKeyResolver.resolveSigningKey(LTISigningKeyResolver.java:29) io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:342) io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:513) io.jsonwebtoken.impl.DefaultJwtParser.parseClaimsJws(DefaultJwtParser.java:573) com.cengage.ztest.lti.LTIProviderServlet.verify13Request(LTIProviderServlet.java:133) com.cengage.ztest.lti.LTIProviderServlet.verifyRequest(LTIProviderServlet.java:104) com.cengage.ztest.lti.LTIProviderServlet.doPost(LTIProviderServlet.java:95) javax.servlet.http.HttpServlet.service(HttpServlet.java:648) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:290) com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:280) com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184) com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:89) com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121) com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133) root cause java.net.ConnectException: Connection refused (Connection refused) java.net.PlainSocketImpl.socketConnect(Native Method) java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) java.net.Socket.connect(Socket.java:607) sun.net.NetworkClient.doConnect(NetworkClient.java:175) sun.net.www.http.HttpClient.openServer(HttpClient.java:463) sun.net.www.http.HttpClient.openServer(HttpClient.java:558) sun.net.www.http.HttpClient.(HttpClient.java:242) sun.net.www.http.HttpClient.New(HttpClient.java:339) sun.net.www.http.HttpClient.New(HttpClient.java:357) sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570) sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) com.nimbusds.jose.util.DefaultResourceRetriever.retrieveResource(DefaultResourceRetriever.java:166) com.nimbusds.jose.jwk.JWKSet.load(JWKSet.java:421) com.nimbusds.jose.jwk.JWKSet.load(JWKSet.java:440) com.cengage.ztest.lti.LTISigningKeyResolver.loadJwkSet(LTISigningKeyResolver.java:39) com.cengage.ztest.lti.LTISigningKeyResolver.resolveSigningKey(LTISigningKeyResolver.java:29) io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:342) io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:513) io.jsonwebtoken.impl.DefaultJwtParser.parseClaimsJws(DefaultJwtParser.java:573) com.cengage.ztest.lti.LTIProviderServlet.verify13Request(LTIProviderServlet.java:133) com.cengage.ztest.lti.LTIProviderServlet.verifyRequest(LTIProviderServlet.java:104) com.cengage.ztest.lti.LTIProviderServlet.doPost(LTIProviderServlet.java:95) javax.servlet.http.HttpServlet.service(HttpServlet.java:648) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:290) com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:280) com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184) com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:89) com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121) com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133) note The full stack trace of the root cause is available in the Apache Tomcat/8.5.9 logs. Apache Tomcat/8.5.9