and did specify the property unixsocket - value does not matter - to the properties given to the Driver class.
After that i was able to use AF_UNIX Sockets.
Would be nice if its possible to get some patch or property switch like this one, to make use of them.
Or maybe use a custom SocketFactory interfae like connector/J does.
I might have misunderstood the issue (you did not attach the factory implementation) , however
Does your factory create an already connected socket?
Also, can't you extend AFUnixSocket with a custom (perhaps anonymous) class that does implement connect() so it does not throw an Exception, if parameter is InetSocketAddr?
Vladislav Vaintroub
added a comment - - edited I might have misunderstood the issue (you did not attach the factory implementation) , however
Does your factory create an already connected socket?
Also, can't you extend AFUnixSocket with a custom (perhaps anonymous) class that does implement connect() so it does not throw an Exception, if parameter is InetSocketAddr?
Yes the factory does create AF_UNIX sockets which are already connected - there is no need to connect this socket at all.
I am unable to extend the AFUNIXSocket class, it has a private constructor which i need to call. This maybe an option - i need to get an upstream patch on the other project to get a protected constructor constructor to be more extension friendly.
Although it would be nice to not have the call to "connect" at all but let this handle the socket factory - like the mysql com.mysql.jdbc.Socketfactory class does.
Torsten Krah
added a comment - Yes the factory does create AF_UNIX sockets which are already connected - there is no need to connect this socket at all.
I am unable to extend the AFUNIXSocket class, it has a private constructor which i need to call. This maybe an option - i need to get an upstream patch on the other project to get a protected constructor constructor to be more extension friendly.
Although it would be nice to not have the call to "connect" at all but let this handle the socket factory - like the mysql com.mysql.jdbc.Socketfactory class does.
I pushed a fix similar to yours, but instead of using dummy property, I just check if socket created by the factory is connected. If so, I skip connecting.
Here is my patch http://lists.askmonty.org/pipermail/commits/2013-May/004736.html . I'm closing the bug assuming that it fixes the issue. If not, please reopen it.
Vladislav Vaintroub
added a comment - I pushed a fix similar to yours, but instead of using dummy property, I just check if socket created by the factory is connected. If so, I skip connecting.
Here is my patch http://lists.askmonty.org/pipermail/commits/2013-May/004736.html . I'm closing the bug assuming that it fixes the issue. If not, please reopen it.
BTW, I recently implemented Unix domain socket support in the current trunk. Maybe you'll find it helpful. It needs JNA (Java Native Access) library to work (http://mvnrepository.com/artifact/net.java.dev.jna/jna). You'll need to use localSocket=/path/to/mysql.sock to connect via unix socket.
Vladislav Vaintroub
added a comment - BTW, I recently implemented Unix domain socket support in the current trunk. Maybe you'll find it helpful. It needs JNA (Java Native Access) library to work ( http://mvnrepository.com/artifact/net.java.dev.jna/jna ). You'll need to use localSocket=/path/to/mysql.sock to connect via unix socket.
People
Vladislav Vaintroub
Torsten Krah
Votes:
0Vote for this issue
Watchers:
2Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":896.5,"ttfb":282.5,"pageVisibility":"visible","entityId":24123,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"400ebc03-2875-4817-a360-7af6dc4a556e","navigationType":0,"readyForUser":961.8000001907349,"redirectCount":0,"resourceLoadedEnd":630.2000007629395,"resourceLoadedStart":290.30000019073486,"resourceTiming":[{"duration":10.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":290.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":290.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":300.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":10.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":290.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":290.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":301.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":184,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":290.70000076293945,"connectEnd":290.70000076293945,"connectStart":290.70000076293945,"domainLookupEnd":290.70000076293945,"domainLookupStart":290.70000076293945,"fetchStart":290.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":302.9000005722046,"responseEnd":474.70000076293945,"responseStart":330.4000005722046,"secureConnectionStart":290.70000076293945},{"duration":339.4000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":290.80000019073486,"connectEnd":290.80000019073486,"connectStart":290.80000019073486,"domainLookupEnd":290.80000019073486,"domainLookupStart":290.80000019073486,"fetchStart":290.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":304.9000005722046,"responseEnd":630.2000007629395,"responseStart":361,"secureConnectionStart":290.80000019073486},{"duration":45.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":291,"connectEnd":291,"connectStart":291,"domainLookupEnd":291,"domainLookupStart":291,"fetchStart":291,"redirectEnd":0,"redirectStart":0,"requestStart":307.1000003814697,"responseEnd":336.1000003814697,"responseStart":333.9000005722046,"secureConnectionStart":291},{"duration":44.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":291.20000076293945,"connectEnd":291.20000076293945,"connectStart":291.20000076293945,"domainLookupEnd":291.20000076293945,"domainLookupStart":291.20000076293945,"fetchStart":291.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":306.9000005722046,"responseEnd":335.70000076293945,"responseStart":332.80000019073486,"secureConnectionStart":291.20000076293945},{"duration":54.09999942779541,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":291.4000005722046,"connectEnd":291.4000005722046,"connectStart":291.4000005722046,"domainLookupEnd":291.4000005722046,"domainLookupStart":291.4000005722046,"fetchStart":291.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":309,"responseEnd":345.5,"responseStart":342.6000003814697,"secureConnectionStart":291.4000005722046},{"duration":14.899999618530273,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":291.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":291.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":306.5,"responseStart":0,"secureConnectionStart":0},{"duration":53.90000057220459,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":291.80000019073486,"connectEnd":291.80000019073486,"connectStart":291.80000019073486,"domainLookupEnd":291.80000019073486,"domainLookupStart":291.80000019073486,"fetchStart":291.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":310.5,"responseEnd":345.70000076293945,"responseStart":343.4000005722046,"secureConnectionStart":291.80000019073486},{"duration":15.800000190734863,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":292,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":292,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":307.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":68.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":292.1000003814697,"connectEnd":292.1000003814697,"connectStart":292.1000003814697,"domainLookupEnd":292.1000003814697,"domainLookupStart":292.1000003814697,"fetchStart":292.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":310.70000076293945,"responseEnd":360.6000003814697,"responseStart":344,"secureConnectionStart":292.1000003814697},{"duration":276.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":292.9000005722046,"connectEnd":292.9000005722046,"connectStart":292.9000005722046,"domainLookupEnd":292.9000005722046,"domainLookupStart":292.9000005722046,"fetchStart":292.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":337.9000005722046,"responseEnd":569.4000005722046,"responseStart":563.8000001907349,"secureConnectionStart":292.9000005722046},{"duration":277.0999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":292.9000005722046,"connectEnd":292.9000005722046,"connectStart":292.9000005722046,"domainLookupEnd":292.9000005722046,"domainLookupStart":292.9000005722046,"fetchStart":292.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":338.1000003814697,"responseEnd":570,"responseStart":565.1000003814697,"secureConnectionStart":292.9000005722046},{"duration":83.79999923706055,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":616.2000007629395,"connectEnd":616.2000007629395,"connectStart":616.2000007629395,"domainLookupEnd":616.2000007629395,"domainLookupStart":616.2000007629395,"fetchStart":616.2000007629395,"redirectEnd":0,"redirectStart":0,"requestStart":662.2000007629395,"responseEnd":700,"responseStart":699.4000005722046,"secureConnectionStart":616.2000007629395},{"duration":178.39999961853027,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":853.2000007629395,"connectEnd":853.2000007629395,"connectStart":853.2000007629395,"domainLookupEnd":853.2000007629395,"domainLookupStart":853.2000007629395,"fetchStart":853.2000007629395,"redirectEnd":0,"redirectStart":0,"requestStart":997.9000005722046,"responseEnd":1031.6000003814697,"responseStart":1030.1000003814697,"secureConnectionStart":853.2000007629395},{"duration":159.39999961853027,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":889.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":889.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1049,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":78,"responseStart":282,"responseEnd":288,"domLoading":285,"domInteractive":1056,"domContentLoadedEventStart":1056,"domContentLoadedEventEnd":1103,"domComplete":1429,"loadEventStart":1429,"loadEventEnd":1429,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1029.3000001907349},{"name":"bigPipe.sidebar-id.end","time":1030},{"name":"bigPipe.activity-panel-pipe-id.start","time":1030.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1031.8000001907349},{"name":"activityTabFullyLoaded","time":1122}],"measures":[],"correlationId":"60facbbe61e6c5","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":121,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I might have misunderstood the issue (you did not attach the factory implementation) , however
Also, can't you extend AFUnixSocket with a custom (perhaps anonymous) class that does implement connect() so it does not throw an Exception, if parameter is InetSocketAddr?