我使用 grails cloudfoundry 插件和隧道连接到远程 Mongo DB 服务。连接很好,因为我可以第一次搜索,但几秒钟后,终端开始打印 502 Bad Gateway 错误,我无法执行任何 mongo db 命令。
| 运行 cf-tunnel-disconnect 关闭当前隧道 |
Error Exception in thread "ThreadPoolTaskExecutor-3"
| Error org.cloudfoundry.caldecott.TunnelException: Error while reading from tunnel
| Error at org.cloudfoundry.caldecott.client.TunnelHandler$Reader.run(TunnelHandler.java:172)
| Error at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
| Error at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
| Error at java.lang.Thread.run(Thread.java:680)
| Error Caused by: org.springframework.web.client.HttpServerErrorException: **502 Bad Gateway
| Error** at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:92)
| Error at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:494)
| Error at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:451)
| Error at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:409)
| Error at org.cloudfoundry.caldecott.client.HttpTunnel.receiveDataBuffered(HttpTunnel.java:150)
| Error at org.cloudfoundry.caldecott.client.HttpTunnel.receiveBytes(HttpTunnel.java:140)
| Error at org.cloudfoundry.caldecott.client.HttpTunnel.read(HttpTunnel.java:83)
| Error at org.cloudfoundry.caldecott.client.TunnelHandler$Reader.run(TunnelHandler.java:148)
| Error ... 3 more