René's URL Explorer Experiment


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.(DomainSocket.java:63) at com.github.dockerjava.transport.BsdDomainSocket.(BsdDomainSocket.java:43) at com.github.dockerjava.transport.DomainSocket.get(DomainSocket.java:138) at com.github.dockerjava.transport.UnixSocket.get(UnixSocket.java:29) at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl$2.createSocket(ApacheDockerHttpClientImpl.java:153) at org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:125) at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:409) at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:164) at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:174) at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:135) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57) at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:172) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57) at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:93) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57) at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:128) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57) at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:116) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:178) at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:67) at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl.execute(ApacheDockerHttpClientImpl.java:191) ... 67 more Caused by: com.sun.jna.LastErrorException: [61] Connection refused at com.github.dockerjava.transport.BsdDomainSocket.connect(Native Method) at com.github.dockerjava.transport.BsdDomainSocket.connect(BsdDomainSocket.java:49) at com.github.dockerjava.transport.DomainSocket.open(DomainSocket.java:69) at com.github.dockerjava.transport.DomainSocket.(DomainSocket.java:59) ... 92 more

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

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:eb3ffcea-e49a-de35-acb6-e336880e7962
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCD80:3AD161:7D53DB:AB8C8C:697283A9
html-safe-nonce2024f74b073e87a35e03bd00f4ac4d0a5238ea6ae0bd0e53a9df2bd62e6bd7ba
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDgwOjNBRDE2MTo3RDUzREI6QUI4QzhDOjY5NzI4M0E5IiwidmlzaXRvcl9pZCI6IjMwODU5NTM5NDU0NzgyNjc4MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8d32dfa937bf1479aa3b73594b7f3436c7381f682c24befe31c9bcccba84c37b
hovercard-subject-tagpull_request:1194740003
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/docker-java/docker-java/pull/2041/files
twitter:imagehttps://avatars.githubusercontent.com/u/889237?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/889237?s=400&v=4
og:image:altWhile 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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7631aa5e32c11c73e45f19f2aaeaa7e0305d2ec80414866e8b020f3c2144ccae
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/docker-java/docker-java git https://github.com/docker-java/docker-java.git
octolytics-dimension-user_id7772003
octolytics-dimension-user_logindocker-java
octolytics-dimension-repository_id20415251
octolytics-dimension-repository_nwodocker-java/docker-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20415251
octolytics-dimension-repository_network_root_nwodocker-java/docker-java
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release40f44656d2185a364dd710032a2e10ee2f1d7e20
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/docker-java/docker-java/pull/2041/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdocker-java%2Fdocker-java%2Fpull%2F2041%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdocker-java%2Fdocker-java%2Fpull%2F2041%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=docker-java%2Fdocker-java
Reloadhttps://github.com/docker-java/docker-java/pull/2041/files
Reloadhttps://github.com/docker-java/docker-java/pull/2041/files
Reloadhttps://github.com/docker-java/docker-java/pull/2041/files
docker-java https://github.com/docker-java
docker-javahttps://github.com/docker-java/docker-java
Notifications https://github.com/login?return_to=%2Fdocker-java%2Fdocker-java
Fork 1.1k https://github.com/login?return_to=%2Fdocker-java%2Fdocker-java
Star 3.2k https://github.com/login?return_to=%2Fdocker-java%2Fdocker-java
Code https://github.com/docker-java/docker-java
Issues 37 https://github.com/docker-java/docker-java/issues
Pull requests 49 https://github.com/docker-java/docker-java/pulls
Discussions https://github.com/docker-java/docker-java/discussions
Actions https://github.com/docker-java/docker-java/actions
Projects 0 https://github.com/docker-java/docker-java/projects
Security 0 https://github.com/docker-java/docker-java/security
Insights https://github.com/docker-java/docker-java/pulse
Code https://github.com/docker-java/docker-java
Issues https://github.com/docker-java/docker-java/issues
Pull requests https://github.com/docker-java/docker-java/pulls
Discussions https://github.com/docker-java/docker-java/discussions
Actions https://github.com/docker-java/docker-java/actions
Projects https://github.com/docker-java/docker-java/projects
Security https://github.com/docker-java/docker-java/security
Insights https://github.com/docker-java/docker-java/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fdocker-java%2Fdocker-java%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fdocker-java%2Fdocker-java%2Fissues%2Fnew%2Fchoose
eddumelendezhttps://github.com/eddumelendez
docker-java:mainhttps://github.com/docker-java/docker-java/tree/main
Sineaggi:dont-trash-ioexceptionhttps://github.com/Sineaggi/docker-java/tree/dont-trash-ioexception
Conversation 9 https://github.com/docker-java/docker-java/pull/2041
Commits 4 https://github.com/docker-java/docker-java/pull/2041/commits
Checks 5 https://github.com/docker-java/docker-java/pull/2041/checks
Files changed https://github.com/docker-java/docker-java/pull/2041/files
Please reload this pagehttps://github.com/docker-java/docker-java/pull/2041/files
Don't swallow IOException caused by opening socket https://github.com/docker-java/docker-java/pull/2041/files#top
Show all changes 4 commits https://github.com/docker-java/docker-java/pull/2041/files
e423efe Don't swallow IOException caused by opening socket Sineaggi Jan 12, 2023 https://github.com/docker-java/docker-java/pull/2041/commits/e423efe2bd886e4117460401ac19868c2cfd095c
9d8db99 Add additional context to socket exception Sineaggi Oct 27, 2023 https://github.com/docker-java/docker-java/pull/2041/commits/9d8db991f5be6ffd4155657793e23c197b24eb57
c5fdb50 Merge branch 'main' into dont-trash-ioexception Sineaggi Aug 3, 2024 https://github.com/docker-java/docker-java/pull/2041/commits/c5fdb509c15764572400f91b2e0800f7aa8344da
a3707f0 Merge branch 'main' into dont-trash-ioexception eddumelendez Dec 11, 2024 https://github.com/docker-java/docker-java/pull/2041/commits/a3707f0e50d1b81188b2800a8ce47ec52c09ad29
Clear filters https://github.com/docker-java/docker-java/pull/2041/files
Please reload this pagehttps://github.com/docker-java/docker-java/pull/2041/files
Please reload this pagehttps://github.com/docker-java/docker-java/pull/2041/files
UnixSocketFactory.java https://github.com/docker-java/docker-java/pull/2041/files#diff-649f79ebb1938ceabb5855d75cd800193c5706adcf85a989c948787a366dc02a
UnixSocket.java https://github.com/docker-java/docker-java/pull/2041/files#diff-e25643c855be49887519c32fb8b303bbe1390a68d6665fbe06ad76e1a4d2d5ba
https://github.com/docker-java/docker-java/blob/main/.github/CODEOWNERS#L1
...r-java-transport-okhttp/src/main/java/com/github/dockerjava/okhttp/UnixSocketFactory.javahttps://github.com/docker-java/docker-java/pull/2041/files#diff-649f79ebb1938ceabb5855d75cd800193c5706adcf85a989c948787a366dc02a
View file https://github.com/Sineaggi/docker-java/blob/a3707f0e50d1b81188b2800a8ce47ec52c09ad29/docker-java-transport-okhttp/src/main/java/com/github/dockerjava/okhttp/UnixSocketFactory.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/docker-java/docker-java/pull/2041/{{ revealButtonHref }}
https://github.com/docker-java/docker-java/pull/2041/files#diff-649f79ebb1938ceabb5855d75cd800193c5706adcf85a989c948787a366dc02a
https://github.com/docker-java/docker-java/pull/2041/files#diff-649f79ebb1938ceabb5855d75cd800193c5706adcf85a989c948787a366dc02a
https://github.com/docker-java/docker-java/blob/main/.github/CODEOWNERS#L1
docker-java-transport/src/main/java/com/github/dockerjava/transport/UnixSocket.javahttps://github.com/docker-java/docker-java/pull/2041/files#diff-e25643c855be49887519c32fb8b303bbe1390a68d6665fbe06ad76e1a4d2d5ba
View file https://github.com/Sineaggi/docker-java/blob/a3707f0e50d1b81188b2800a8ce47ec52c09ad29/docker-java-transport/src/main/java/com/github/dockerjava/transport/UnixSocket.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/docker-java/docker-java/pull/2041/{{ revealButtonHref }}
https://github.com/docker-java/docker-java/pull/2041/files#diff-e25643c855be49887519c32fb8b303bbe1390a68d6665fbe06ad76e1a4d2d5ba
https://github.com/docker-java/docker-java/pull/2041/files#diff-e25643c855be49887519c32fb8b303bbe1390a68d6665fbe06ad76e1a4d2d5ba
https://github.com/docker-java/docker-java/pull/2041/files#diff-e25643c855be49887519c32fb8b303bbe1390a68d6665fbe06ad76e1a4d2d5ba
https://github.com/docker-java/docker-java/pull/2041/files#diff-e25643c855be49887519c32fb8b303bbe1390a68d6665fbe06ad76e1a4d2d5ba
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.