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

ECONNREFUSED when using docker #80

Closed
Jab2870 opened this issue May 3, 2021 · 1 comment
Closed

ECONNREFUSED when using docker #80

Jab2870 opened this issue May 3, 2021 · 1 comment

Comments

@Jab2870
Copy link

Jab2870 commented May 3, 2021

Hi,

I am trying to make this work with docker compose. Here is the appropriate part
of my docker-compose file:

    synapse:
        image: matrixdotorg/synapse:latest
        volumes:
            - ./synapse/data:/data
        networks:
            - proxy-tier
            - matrix
        environment:
            - VIRTUAL_HOST=matrix.jn.hn
            - VIRTUAL_PORT=8008
            - LETSENCRYPT_HOST=matrix.jn.hn
            - LETSENCRYPT_EMAIL=jonathan@jonathanh.co.uk
            - HSTS=on

    bridge-mx-puppet-discord:
        image: sorunome/mx-puppet-discord:latest
        expose:
            - 8434
        volumes:
            - ./mx-puppet-discord/data:/data
        networks:
            - matrix

From the mx-puppet-discord container, I can ping synapse and from the synapse
container I can ping bridge-mx-puppet-discord so I don't belive there is an
issue with the two containers communicating.

I have the following in my config.yaml for mx-puppet-discord

bridge:
  # Port to host the bridge on
  # Used for communication between the homeserver and the bridge
  port: 8434

  # The host connections to the bridge's webserver are allowed from
  bindAddress: 0.0.0.0

  # Public domain of the homeserver
  domain: jn.hn

  # Reachable URL of the Matrix homeserver
  homeserverUrl: http://synapse:443

...

# Map of homeserver URLs to their C-S API endpoint
#
# Useful for double-puppeting if .well-known is unavailable for some reason
homeserverUrlMap:
  jn.hn: http://synapse:443

However, I get the following logs from the bridge container:

May-3 20:28:50.459 [bot-sdk-MatrixLiteClient] info: (REQ-9) POST http://synapse:443/_matrix/client/r0/register
May-3 20:28:50.469 [bot-sdk-MatrixLiteClient] error: (REQ-9) RequestError: connect ECONNREFUSED 172.26.0.2:443
    at ClientRequest.<anonymous> (/opt/mx-puppet-discord/node_modules/got/dist/source/core/index.js:937:25)
    at Object.onceWrapper (node:events:486:26)
    at ClientRequest.emit (node:events:391:22)
    at ClientRequest.origin.emit (/opt/mx-puppet-discord/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)
    at Socket.socketErrorListener (node:_http_client:494:9)
    at Socket.emit (node:events:379:20)
    at emitErrorNT (node:internal/streams/destroy:188:8)
    at emitErrorCloseNT (node:internal/streams/destroy:153:3)
    at processTicksAndRejections (node:internal/process/task_queues:81:21)
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1139:16) {
  code: 'ECONNREFUSED',
  timings: {
    start: 1620073730465,
    socket: 1620073730465,
    lookup: 1620073730466,
    connect: undefined,
    secureConnect: undefined,
    upload: undefined,
    response: undefined,
    end: undefined,
    error: 1620073730466,
    abort: undefined,
    phases: {
      wait: 0,
      dns: 1,
      tcp: undefined,
      tls: undefined,
      request: undefined,
      firstByte: undefined,
      download: undefined,
      total: 1
    }
  }
}
May-3 20:28:50.470 [bot-sdk-Appservice] error: Encountered error registering user:
May-3 20:28:50.474 [bot-sdk-Appservice] error: RequestError: connect ECONNREFUSED 172.26.0.2:443
    at ClientRequest.<anonymous> (/opt/mx-puppet-discord/node_modules/got/dist/source/core/index.js:937:25)
    at Object.onceWrapper (node:events:486:26)
    at ClientRequest.emit (node:events:391:22)
    at ClientRequest.origin.emit (/opt/mx-puppet-discord/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)
    at Socket.socketErrorListener (node:_http_client:494:9)
    at Socket.emit (node:events:379:20)
    at emitErrorNT (node:internal/streams/destroy:188:8)
    at emitErrorCloseNT (node:internal/streams/destroy:153:3)
    at processTicksAndRejections (node:internal/process/task_queues:81:21)
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1139:16) {
  code: 'ECONNREFUSED',
  timings: {
    start: 1620073730465,
    socket: 1620073730465,
    lookup: 1620073730466,
    connect: undefined,
    secureConnect: undefined,
    upload: undefined,
    response: undefined,
    end: undefined,
    error: 1620073730466,
    abort: undefined,
    phases: {
      wait: 0,
      dns: 1,
      tcp: undefined,
      tls: undefined,
      request: undefined,
      firstByte: undefined,
      download: undefined,
      total: 1
    }
  }
}

Do you have any suggestions?

@Jab2870
Copy link
Author

Jab2870 commented May 3, 2021

Sorry, I was being thick. homeserverUrl should have been http://synapse:8008

@Jab2870 Jab2870 closed this as completed May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant