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

failed to debug in macOS sonoma version 14.3 #2215

Closed
stonezdj opened this issue Feb 2, 2024 · 4 comments
Closed

failed to debug in macOS sonoma version 14.3 #2215

stonezdj opened this issue Feb 2, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@stonezdj
Copy link

stonezdj commented Feb 2, 2024

Bug Description

Install VSCode plugin and enable mirrord.
-->Start Debugging
-->Select Target pod to mirror
Local process is launched and start to running.
But after send a request to the remote app, the local application should stopped at the break point, but it failed with this message.

....
2024-02-02T14:09:28.768543Z ERROR ThreadId(01) mirrord_layer::error: Error occured in Layer >> ProxyError(ConnectionClosed)
....
Detaching

The cluster is kind cluster

Steps to Reproduce

  1. Install VSCode plugin and enable mirrord.
  2. Start Debugging
  3. Select Target pod to mirror
  4. Local process is launched and start to running.
  5. Send a request to the remote app, the local application should stopped at the expected break point, but it failed with this message.
....
2024-02-02T14:09:28.768543Z ERROR ThreadId(01) mirrord_layer::error: Error occured in Layer >> ProxyError(ConnectionClosed)
....
Detaching

Backtrace

No response

Relevant Logs

No response

Your operating system and version

macOS 14.3

Local process

/Users/daojunz/homebrew/bin/mirrord of version 3.86.0

Local process version

No response

Additional Info

No response

@stonezdj stonezdj added the bug Something isn't working label Feb 2, 2024
@t4lz
Copy link
Member

t4lz commented Feb 2, 2024

Hi @stonezdj, thanks for reporting this. Could you please share a couple of additional details:

  1. What language/framework is your application written with? Could you maybe share a minimal reproduction of this issue? Meaning a (possibly simplified and reduced) application that you can share with us, where this issue still occurs.
  2. Are you running with a mirrord configuration file? If yes, could you please share that configuration?
  3. Could you please share with us the relevant vscode launch configuration?
  4. Are there no IDE notifications from mirrord with more details about what went wrong?

Thanks!

@stonezdj
Copy link
Author

stonezdj commented Feb 2, 2024

1.The language is golang language, application:
https://github.com/goharbor/harbor

Install Harbor via helm chart

helm repo add harbor https://helm.goharbor.io
helm install myrelease harbor/harbor --version=v1.14.0  --set expose.type=ingress 
  1. The mirrord configuration file
{
    "target": "deployment/myrelease-harbor-core",
    "feature": {
      "env": true,
      "fs": "read",
      "network": true
    }
  }
  1. VSCode Launch configuration:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch go debug",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${fileDirname}",
            "envFile": "/Users/<user>/Documents/core/env",
            "args": []
        }
    ]
}
  1. when this error happen, the IDE debugger detached
2024/02/02 22:55:59.993 [I] [server.go:281]  http server Running on http://:8080
2024-02-02T14:56:00.621869Z ERROR ThreadId(01) mirrord_layer::error: Error occured in Layer >> ProxyError(ConnectionClosed)
2024/02/02 22:56:00.622 [C] [server.go:298]  ListenAndServe:  listen tcp :8080: listen: invalid argument
Process 75821 has exited with status 0
Detaching

@aviramha
Copy link
Member

aviramha commented Feb 2, 2024

@stonezdj I highly suspect your cluster VM version doesn't support mirroring, seeing the logs.
Can you set use this json:

{
  "agent": {"ttl": 120},
    "target": "deployment/myrelease-harbor-core",
    "feature": {
      "env": true,
      "fs": "read",
      "network": true
    }
  }

then obtain agent logs? (using kubectl logs mirrord-agent-GENERATED-RANDOM)
Also, you can try changing "network": {"incoming": "steal"} to see if stealing works.

@stonezdj
Copy link
Author

stonezdj commented Feb 3, 2024

Yes, the node kernel version is <4.20, after switch to another cluster with kernel version >4.20, it works, thanks!

@stonezdj stonezdj closed this as completed Feb 3, 2024
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