Swagger-UI emplyeed in nginx by bunled jar, it shows blank page

Refresh

April 2019

Views

9 time

0

Swagger-ui can visit on "dev" environment, But it fail when I deploy it in cloud.

I tried AddResoucesHandler, but it is not working.

error message:

GET
https://user.throw.atatakai.cn/webjars/springfox-swagger-ui/springfox.css?v=2.9.2
net::ERR_ABORTED 404 (Not Found) swagger-ui.html:8 GET
https://user.throw.atatakai.cn/webjars/springfox-swagger-ui/swagger-ui.css?v=2.9.2
net::ERR_ABORTED 404 (Not Found) swagger-ui.html:70 GET
https://user.throw.atatakai.cn/webjars/springfox-swagger-ui/swagger-ui-bundle.js?v=2.9.2
net::ERR_ABORTED 404 (Not Found) swagger-ui.html:71 GET
https://user.throw.atatakai.cn/webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js?v=2.9.2
net::ERR_ABORTED 404 (Not Found) swagger-ui.html:72 GET
https://user.throw.atatakai.cn/webjars/springfox-swagger-ui/springfox.js?v=2.9.2
404 (Not Found)

and nginx error-log

2019/04/24 21:09:36 [error] 28774#0: *212397 connect() failed (111: Connection refused) while connecting to upstream, client: 125.90.49.14, server: user.throw.atatakai.cn, request: "GET /swagger-ui.html HTTP/1.1", upstream: "http://127.0.0.1:8099/swagger-ui.html", host: "user.throw.atatakai.cn"
2019/04/24 21:09:36 [error] 28774#0: *212397 connect() failed (111: Connection refused) while connecting to upstream, client: 125.90.49.14, server: user.throw.atatakai.cn, request: "GET /swagger-ui.html HTTP/1.1", upstream: "http://127.0.0.1:8099/502.html", host: "user.throw.atatakai.cn"
2019/04/24 21:09:37 [error] 28774#0: *212397 connect() failed (111: Connection refused) while connecting to upstream, client: 125.90.49.14, server: user.throw.atatakai.cn, request: "GET /swagger-ui.html HTTP/1.1", upstream: "http://127.0.0.1:8099/swagger-ui.html", host: "user.throw.atatakai.cn"
2019/04/24 21:09:37 [error] 28774#0: *212397 connect() failed (111: Connection refused) while connecting to upstream, client: 125.90.49.14, server: user.throw.atatakai.cn, request: "GET /swagger-ui.html HTTP/1.1", upstream: "http://127.0.0.1:8099/502.html", host: "user.throw.atatakai.cn"
[[email protected] user.throw.atatakai.cn]# cat /www/wwwlogs/user.throw.atatakai.cn.error.log
2019/04/24 21:09:36 [error] 28774#0: *212397 connect() failed (111: Connection refused) while connecting to upstream, client: 125.90.49.14, server: user.throw.atatakai.cn, request: "GET /swagger-ui.html HTTP/1.1", upstream: "http://127.0.0.1:8099/swagger-ui.html", host: "user.throw.atatakai.cn"
2019/04/24 21:09:36 [error] 28774#0: *212397 connect() failed (111: Connection refused) while connecting to upstream, client: 125.90.49.14, server: user.throw.atatakai.cn, request: "GET /swagger-ui.html HTTP/1.1", upstream: "http://127.0.0.1:8099/502.html", host: "user.throw.atatakai.cn"
2019/04/24 21:09:37 [error] 28774#0: *212397 connect() failed (111: Connection refused) while connecting to upstream, client: 125.90.49.14, server: user.throw.atatakai.cn, request: "GET /swagger-ui.html HTTP/1.1", upstream: "http://127.0.0.1:8099/swagger-ui.html", host: "user.throw.atatakai.cn"
2019/04/24 21:09:37 [error] 28774#0: *212397 connect() failed (111: Connection refused) while connecting to upstream, client: 125.90.49.14, server: user.throw.atatakai.cn, request: "GET /swagger-ui.html HTTP/1.1", upstream: "http://127.0.0.1:8099/502.html", host: "user.throw.atatakai.cn"
2019/04/24 21:11:06 [error] 28774#0: *212415 connect() failed (111: Connection refused) while connecting to upstream, client: 217.182.175.162, server: user.throw.atatakai.cn, request: "HEAD /webjars/springfox-swagger-ui/swagger-ui-standalone-preset.js?v=2.9.2 HTTP/1.1", upstream: "http://127.0.0.1:8099/404.html", host: "user.throw.atatakai.cn"
2019/04/24 21:11:06 [error] 28774#0: *212416 connect() failed (111: Connection refused) while connecting to upstream, client: 217.182.175.162, server: user.throw.atatakai.cn, request: "HEAD /webjars/springfox-swagger-ui/swagger-ui.css?v=2.9.2 HTTP/1.1", upstream: "http://127.0.0.1:8099/404.html", host: "user.throw.atatakai.cn"
2019/04/24 21:11:07 [error] 28774#0: *212419 connect() failed (111: Connection refused) while connecting to upstream, client: 217.182.175.162, server: user.throw.atatakai.cn, request: "HEAD /webjars/springfox-swagger-ui/swagger-ui-bundle.js?v=2.9.2 HTTP/1.1", upstream: "http://127.0.0.1:8099/404.html", host: "user.throw.atatakai.cn"
2019/04/24 21:11:07 [error] 28774#0: *212420 connect() failed (111: Connection refused) while connecting to upstream, client: 217.182.175.162, server: user.throw.atatakai.cn, request: "HEAD /webjars/springfox-swagger-ui/springfox.js?v=2.9.2 HTTP/1.1", upstream: "http://127.0.0.1:8099/404.html", host: "user.throw.atatakai.cn"
2019/04/24 21:11:08 [error] 28774#0: *212421 connect() failed (111: Connection refused) while connecting to upstream, client: 217.182.175.162, server: user.throw.atatakai.cn, request: "HEAD /webjars/springfox-swagger-ui/springfox.css?v=2.9.2 HTTP/1.1", upstream: "http://127.0.0.1:8099/404.html", host: "user.throw.atatakai.cn"
2019/04/24 21:14:19 [error] 28774#0: *212425 connect() failed (111: Connection refused) while connecting to upstream, client: 125.90.49.14, server: user.throw.atatakai.cn, request: "GET /swagger-ui.html HTTP/1.1", upstream: "http://127.0.0.1:8099/swagger-ui.html", host: "user.throw.atatakai.cn"
2019/04/24 21:14:19 [error] 28774#0: *212425 connect() failed (111: Connection refused) while connecting to upstream, client: 125.90.49.14, server: user.throw.atatakai.cn, request: "GET /swagger-ui.html HTTP/1.1", upstream: "http://127.0.0.1:8099/502.html", host: "user.throw.atatakai.cn"

0 answers