René's URL Explorer Experiment


Title: Hotplug events do not fire when application is running inside of a docker container · Issue #90 · usb4java/usb4java · GitHub

Open Graph Title: Hotplug events do not fire when application is running inside of a docker container · Issue #90 · usb4java/usb4java

X Title: Hotplug events do not fire when application is running inside of a docker container · Issue #90 · usb4java/usb4java

Description: Environment: OS: Debian Bullseye Java version Temurin JDK 21 (repeatable in Amazon Corretto 17 and 11 as well) usb4java version 1.3.0 Bug description When running an application on Linux on the host, you can run a java application and ha...

Open Graph Description: Environment: OS: Debian Bullseye Java version Temurin JDK 21 (repeatable in Amazon Corretto 17 and 11 as well) usb4java version 1.3.0 Bug description When running an application on Linux on the hos...

X Description: Environment: OS: Debian Bullseye Java version Temurin JDK 21 (repeatable in Amazon Corretto 17 and 11 as well) usb4java version 1.3.0 Bug description When running an application on Linux on the hos...

Opengraph URL: https://github.com/usb4java/usb4java/issues/90

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Hotplug events do not fire when application is running inside of a docker container","articleBody":"**Environment:**\r\n - OS: Debian Bullseye\r\n - Java version Temurin JDK 21  (repeatable in Amazon Corretto 17 and 11 as well)\r\n - usb4java version 1.3.0\r\n\r\n**Bug description**\r\nWhen running an application on Linux on the host, you can run a java application and have the attach and detach events fire.  When running the same application in a Docker container, those events will not fire.  Further, trying to manually poll the USB devices and compare old/new is not possible, as the devices returned from `UsbHostManager.getUsbServices().getRootUsbHub()` are always the same.  Ex. When a device is no longer attached, it will still appear in the list if it was attached at startup.\r\n\r\n**Reproduction**\r\n1. Compile the code below into a jar file.\r\n```\r\nimport javax.usb.UsbException;\r\nimport javax.usb.UsbHostManager;\r\nimport javax.usb.event.UsbServicesEvent;\r\nimport javax.usb.event.UsbServicesListener;\r\n\r\npublic class Application {\r\n\r\n    public static void main(String[] args) throws UsbException, InterruptedException {\r\n        UsbHostManager.getUsbServices().addUsbServicesListener(new UsbServicesListener() {\r\n            @Override\r\n            public void usbDeviceAttached(UsbServicesEvent event) {\r\n                System.out.println(\"Device attached.\");\r\n            }\r\n\r\n            @Override\r\n            public void usbDeviceDetached(UsbServicesEvent event) {\r\n                System.out.println(\"Device detached.\");\r\n            }\r\n        });\r\n\r\n        Thread.sleep(15000);\r\n    }\r\n}\r\n\r\n```\r\n3. Run on a linux machine with sudo.  `sudo java -Djava.security.egd=file:/dev/./urandom -jar app.jar`\r\n4. Connect and disconnect USB devices to see console output.\r\n5. Build the jar into a container and use the below Dockerfile to build with `sudo docker build --build-arg=\"JAR_FILE=app.jar\" -t test1 .`\r\n```\r\nFROM eclipse-temurin:21-jre-jammy\r\nARG JAR_FILE\r\nCOPY ${JAR_FILE} /usr/app/app.jar\r\nENTRYPOINT [\"java\",\"-Djava.security.egd=file:/dev/./urandom\",\"-jar\",\"/usr/app/app.jar\"]\r\n```\r\n6. Run the container with `sudo docker run -it --rm --privileged test1:latest`\r\n7. Observe that connecting and disconnecting does not fire the event.\r\n\r\n**Expected behavior**\r\nI expect that the application running in a container with the correct privileges' would allow firing of the attach and detach events.\r\n","author":{"url":"https://github.com/westinpigott","@type":"Person","name":"westinpigott"},"datePublished":"2023-12-07T20:30:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/90/usb4java/issues/90"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:69daedeb-55e6-7c83-55aa-be65c710f704
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA3E0:3930F2:E82A4FA:12E509D3:69773F31
html-safe-nonce04463c4b86676eb2717bd2f379fa9052e186a04c6455d8e97bdc170fa8729975
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0UwOjM5MzBGMjpFODJBNEZBOjEyRTUwOUQzOjY5NzczRjMxIiwidmlzaXRvcl9pZCI6IjcyNDUyNTMyMjMyODE4MDMwNTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2a8efef1e8e262571ce692245e1c2361fbd0d917424b054d234bb9010b909aa2
hovercard-subject-tagissue:2031479560
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/usb4java/usb4java/90/issue_layout
twitter:imagehttps://opengraph.githubassets.com/56cad38ab6220c1c044ff86155a7fcc117c4673fb553500e6b29ca3e29e87e36/usb4java/usb4java/issues/90
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/56cad38ab6220c1c044ff86155a7fcc117c4673fb553500e6b29ca3e29e87e36/usb4java/usb4java/issues/90
og:image:altEnvironment: OS: Debian Bullseye Java version Temurin JDK 21 (repeatable in Amazon Corretto 17 and 11 as well) usb4java version 1.3.0 Bug description When running an application on Linux on the hos...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamewestinpigott
hostnamegithub.com
expected-hostnamegithub.com
None01d198479908d09a841b2febe8eb105a81af2af7d81830960fe0971e1f4adc09
turbo-cache-controlno-preview
go-importgithub.com/usb4java/usb4java git https://github.com/usb4java/usb4java.git
octolytics-dimension-user_id5460495
octolytics-dimension-user_loginusb4java
octolytics-dimension-repository_id1528861
octolytics-dimension-repository_nwousb4java/usb4java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1528861
octolytics-dimension-repository_network_root_nwousb4java/usb4java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8b4769605623191b876ce084a47e46d8431b205a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/usb4java/usb4java/issues/90#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fusb4java%2Fusb4java%2Fissues%2F90
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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fusb4java%2Fusb4java%2Fissues%2F90
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=usb4java%2Fusb4java
Reloadhttps://patch-diff.githubusercontent.com/usb4java/usb4java/issues/90
Reloadhttps://patch-diff.githubusercontent.com/usb4java/usb4java/issues/90
Reloadhttps://patch-diff.githubusercontent.com/usb4java/usb4java/issues/90
usb4java https://patch-diff.githubusercontent.com/usb4java
usb4javahttps://patch-diff.githubusercontent.com/usb4java/usb4java
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fusb4java%2Fusb4java
Fork 109 https://patch-diff.githubusercontent.com/login?return_to=%2Fusb4java%2Fusb4java
Star 316 https://patch-diff.githubusercontent.com/login?return_to=%2Fusb4java%2Fusb4java
Code https://patch-diff.githubusercontent.com/usb4java/usb4java
Issues 30 https://patch-diff.githubusercontent.com/usb4java/usb4java/issues
Pull requests 1 https://patch-diff.githubusercontent.com/usb4java/usb4java/pulls
Actions https://patch-diff.githubusercontent.com/usb4java/usb4java/actions
Security 0 https://patch-diff.githubusercontent.com/usb4java/usb4java/security
Insights https://patch-diff.githubusercontent.com/usb4java/usb4java/pulse
Code https://patch-diff.githubusercontent.com/usb4java/usb4java
Issues https://patch-diff.githubusercontent.com/usb4java/usb4java/issues
Pull requests https://patch-diff.githubusercontent.com/usb4java/usb4java/pulls
Actions https://patch-diff.githubusercontent.com/usb4java/usb4java/actions
Security https://patch-diff.githubusercontent.com/usb4java/usb4java/security
Insights https://patch-diff.githubusercontent.com/usb4java/usb4java/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/usb4java/usb4java/issues/90
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/usb4java/usb4java/issues/90
Hotplug events do not fire when application is running inside of a docker containerhttps://patch-diff.githubusercontent.com/usb4java/usb4java/issues/90#top
https://github.com/westinpigott
https://github.com/westinpigott
westinpigotthttps://github.com/westinpigott
on Dec 7, 2023https://github.com/usb4java/usb4java/issues/90#issue-2031479560
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.