cloudquery icon indicating copy to clipboard operation
cloudquery copied to clipboard

Bug: unix domain socket on Windows

Open noahcarey opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

Error: failed to listen unix:C:\Users\Administrator\AppData\Local\Temp\cq-KmpksAOvAWwLxjQg.sock: listen unix C:\Users\Administrator\AppData\Local\Temp\cq-KmpksAOvAWwLxjQg.sock: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

Expected Behavior

Loading spec(s) args=["sync.yml"] invocation-id=633c732f-c3f8-43ff-97de-80c650c81360 module=cli2024-05-20T08:25:28Z INF Plugin server listening address="C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\cq-NEOiJvbOPnzarExn.sock" invocation-id=633c732f-c3f8-43ff-97de-80c650c81360 module=cli

CloudQuery (redacted) config

kind: source
spec:
  name: 'cve-sync'
  registry: 'grpc'
  path: '127.0.0.1:7777'
  version: 'v1.0.0'
  tables: ['*']
  destinations:
    - 'mongodb'
  spec:
    connectionString: mongodb://127.0.0.1:27017
    database: test
---
kind: destination
spec:
  name: mongodb
  path: cloudquery/mongodb
  registry: cloudquery
  version: 'v2.3.11'
  spec:
    connection_string: mongodb://127.0.0.1:27017
    database: test

Steps To Reproduce

No response

CloudQuery (redacted) logs

Error: failed to listen unix:C:\Users\Administrator\AppData\Local\Temp\cq-KmpksAOvAWwLxjQg.sock: listen unix C:\Users\Administrator\AppData\Local\Temp\cq-KmpksAOvAWwLxjQg.sock: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
Usage:
  mongodb serve [flags]

Flags:
      --address localhost:7777              address to serve on. can be tcp: localhost:7777 or unix socket: `/tmp/plugin.rpc.sock` (default "localhost:7777")
  -h, --help                                help for serve
      --license string                      Path to offline license file or directory
      --log-format string                   log format. one of: text,json (default "text")
      --log-level string                    log level. one of: trace,debug,info,warn,error (default "info")
      --network string                      the network must be "tcp", "tcp4", "tcp6", "unix" or "unixpacket" (default "tcp")
      --no-sentry                           disable sentry
      --otel-endpoint string                Open Telemetry HTTP collector endpoint
      --otel-endpoint-headers stringArray   Open Telemetry HTTP collector endpoint headers
      --otel-endpoint-insecure              use Open Telemetry HTTP endpoint (for development only)
      --otel-endpoint-urlpath string        Open Telemetry HTTP collector endpoint URL path

2024/05/20 08:42:57 failed to serve: failed to listen unix:C:\Users\Administrator\AppData\Local\Temp\cq-KmpksAOvAWwLxjQg.sock: listen unix C:\Users\Administrator\AppData\Local\Temp\cq-KmpksAOvAWwLxjQg.sock: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
Error: failed to run plugin .cq\plugins\destination\cloudquery\mongodb\v2.3.11\plugin.exe: exit status 1

CloudQuery version

5.18.2

Additional Context

No response

Pull request (optional)

  • [ ] I can submit a pull request

noahcarey avatar May 20 '24 15:05 noahcarey

Hi @noahcarey, thanks for opening the issue. Can you share the command you're using to start the plugins?

erezrokah avatar May 20 '24 17:05 erezrokah

Hi @noahcarey, thanks for opening the issue. Can you share the command you're using to start the plugins?

Hi. I used this command. cloudquery sync sync.yml

noahcarey avatar May 20 '24 17:05 noahcarey

I used this command. cloudquery sync sync.yml

Thanks, how are you starting the plugin(s)? e.g. go run main.go serve ...

erezrokah avatar May 20 '24 17:05 erezrokah

Closing as stale. Please comment with the information requested in https://github.com/cloudquery/cloudquery/issues/18029#issuecomment-2120927446 if still happens and I'll re-open

erezrokah avatar Jun 11 '24 08:06 erezrokah