Title: Don't swallow IOException caused by opening socket by Sineaggi · Pull Request #2041 · docker-java/docker-java · GitHub
Open Graph Title: Don't swallow IOException caused by opening socket by Sineaggi · Pull Request #2041 · docker-java/docker-java
X Title: Don't swallow IOException caused by opening socket by Sineaggi · Pull Request #2041 · docker-java/docker-java
Description: While debugging an issue locally I noticed the stacktrace included references to the DomainSocket class. This meant that somehow java.net.UnixDomainSocketAddress was being bypassed. I thought there was an issue with the jvm I was running on, but it turns out we were simply swallowing the IOException thrown by the SocketChannel.open(this.socketAddress); call, then trying to load the socket via the DomainSocket class.
I've fixed the code by adding the thrown methods to the signature, and catching the exact exceptions thrown by the methods in the class one level higher.
Exception in question.
Caused by: java.io.IOException: com.sun.jna.LastErrorException: [61] Connection refused
at com.github.dockerjava.transport.DomainSocket.
Open Graph Description: While debugging an issue locally I noticed the stacktrace included references to the DomainSocket class. This meant that somehow java.net.UnixDomainSocketAddress was being bypassed. I thought there...
X Description: While debugging an issue locally I noticed the stacktrace included references to the DomainSocket class. This meant that somehow java.net.UnixDomainSocketAddress was being bypassed. I thought there...
Opengraph URL: https://github.com/docker-java/docker-java/pull/2041
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:eb3ffcea-e49a-de35-acb6-e336880e7962 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CD80:3AD161:7D53DB:AB8C8C:697283A9 |
| html-safe-nonce | 2024f74b073e87a35e03bd00f4ac4d0a5238ea6ae0bd0e53a9df2bd62e6bd7ba |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDgwOjNBRDE2MTo3RDUzREI6QUI4QzhDOjY5NzI4M0E5IiwidmlzaXRvcl9pZCI6IjMwODU5NTM5NDU0NzgyNjc4MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8d32dfa937bf1479aa3b73594b7f3436c7381f682c24befe31c9bcccba84c37b |
| hovercard-subject-tag | pull_request:1194740003 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/docker-java/docker-java/pull/2041/files |
| twitter:image | https://avatars.githubusercontent.com/u/889237?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/889237?s=400&v=4 |
| og:image:alt | While debugging an issue locally I noticed the stacktrace included references to the DomainSocket class. This meant that somehow java.net.UnixDomainSocketAddress was being bypassed. I thought there... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7631aa5e32c11c73e45f19f2aaeaa7e0305d2ec80414866e8b020f3c2144ccae |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/docker-java/docker-java git https://github.com/docker-java/docker-java.git |
| octolytics-dimension-user_id | 7772003 |
| octolytics-dimension-user_login | docker-java |
| octolytics-dimension-repository_id | 20415251 |
| octolytics-dimension-repository_nwo | docker-java/docker-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20415251 |
| octolytics-dimension-repository_network_root_nwo | docker-java/docker-java |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 40f44656d2185a364dd710032a2e10ee2f1d7e20 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width