Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'socket hang up' when I rename extension image and add org #221

Open
ibreakthecloud opened this issue Oct 6, 2022 · 5 comments
Open

'socket hang up' when I rename extension image and add org #221

ibreakthecloud opened this issue Oct 6, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@ibreakthecloud
Copy link

Describe the bug
I have created a docker extension, currently the code is private. when I do
docker build -t secretscanner-docker-extension:latest .
and then
docker extension install secretscanner-docker-extension:latest

I am able to use the extension properly, ui is able to do
ddClient.extension.vm?.service?.get('/ping')

But, when I do
docker build -t deepfenceio/secretscanner-docker-extension:latest .
and then
docker extension install deepfence/secretscanner-docker-extension:latest
ddClient.extension.vm?.service?.get('/ping') throws below error in console log

{name: 'Error', message: 'socket hang up', statusCode: undefined}

my docker compose yaml

version: '3'
services:
  app:
    image: ${DESKTOP_PLUGIN_IMAGE}

  deepfence-secret-scanner:
    container_name: deepfence-secret-scanner
    image: deepfenceio/deepfence_secret_scanner_ce:latest

Add the steps to reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Describe the expected behavior
A clear and concise description of what you expected to happen.

Optional: Add screenshots
If applicable, add screenshots to help explain your problem.

Output of docker extension version:

Client Version: v0.2.9rsion                                      
Server API Version: 0.2.3

Output of docker version:

Client:er version          
 Cloud integration: v1.0.29
 Version:           20.10.17
 API version:       1.41
 Go version:        go1.17.11
 Git commit:        100c701
 Built:             Mon Jun  6 23:04:45 2022
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Desktop 4.12.0 (85629)
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:01:23 2022
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Include the Diagnostics ID

(paste your output here)

Additional context
Add any other context about the problem here.

@ibreakthecloud ibreakthecloud added the bug Something isn't working label Oct 6, 2022
@ibreakthecloud ibreakthecloud changed the title 'socket hang up' when I rename extension image to add org 'socket hang up' when I rename extension image and add org Oct 6, 2022
@ibreakthecloud
Copy link
Author

Also, If I exec inside service container do curl to /ping it works for both the cases

@benja-M-1
Copy link
Member

I Hi @ibreakthecloud thank you for reporting this!

I can reproduce this as well. This could be related to the length of the socket path. If I change the image tag to a/b:latest it works.
This is something we know, we must find a way to shorten the socket path.

@ibreakthecloud
Copy link
Author

I Hi @ibreakthecloud thank you for reporting this!

I can reproduce this as well. This could be related to the length of the socket path. If I change the image tag to a/b:latest it works. This is something we know, we must find a way to shorten the socket path.

Thanks for the quick reply @benja-M-1 .
Is there a way to manually put the socket path, instead of letting it generate?

@benja-M-1
Copy link
Member

Unfortunately, no, there is not. In metadata.json you can shorten the name of the generated socker but it may not be enough. The name of the extension also counts in the length.

@felipecruz91
Copy link
Contributor

felipecruz91 commented Dec 9, 2022

In Docker Desktop 4.15 we've improved the docker extension init command to generate a shorter socket name in the metadata.json that does not depend on the extension name. No matter the name of your extension, the socket name will be backend.sock.

@ibreakthecloud In your existing metadata.json file, could you replace the socket name with a shorter one such as backend.sock?

While this is not a definitive solution, it will reduce the likelihood of hitting this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants