Connect Server is not working

pvkas13
pvkas13
Community Member

Connect Server is returning error

Error on Nodejs SDK and REST API

Error {
  status: 408,
  message: 'sync did not complete within timeout, please retry the request'
}

We are following this document Here
We followed all steps multiple times to make sure we are not missing any parts.
Tried with both solution (Docker & Kubernetes). They have same results.

Tried directly using the docker-compose file in example
These are the initilization logs with OP_LOG_LEVEL=DEBUG

1.op-connect-api

{"log_message":"(I) [discovery-local] starting discovery, advertising endpoint 8080 /meta/message","timestamp":"2021-05-06T17:32:13.947321Z","level":3}
{"log_message":"(D) mounting route GET /heartbeat","timestamp":"2021-05-06T17:32:13.960593Z","level":4}
{"log_message":"(D) mounting route GET /health","timestamp":"2021-05-06T17:32:13.960797Z","level":4}
{"log_message":"(D) mounting route GET /v1/vaults","timestamp":"2021-05-06T17:32:13.960851Z","level":4}
{"log_message":"(D) mounting route GET /v1/vaults/:vaultUUID","timestamp":"2021-05-06T17:32:13.960876Z","level":4}
{"log_message":"(D) mounting route GET /v1/vaults/:vaultUUID/items","timestamp":"2021-05-06T17:32:13.961018Z","level":4}
{"log_message":"(D) mounting route POST /v1/vaults/:vaultUUID/items","timestamp":"2021-05-06T17:32:13.961168Z","level":4}
{"log_message":"(D) mounting route GET /v1/vaults/:vaultUUID/items/:uuid","timestamp":"2021-05-06T17:32:13.961289Z","level":4}
{"log_message":"(D) mounting route PUT /v1/vaults/:vaultUUID/items/:uuid","timestamp":"2021-05-06T17:32:13.961341Z","level":4}
{"log_message":"(D) mounting route DELETE /v1/vaults/:vaultUUID/items/:uuid","timestamp":"2021-05-06T17:32:13.961375Z","level":4}
{"log_message":"(D) mounting route PATCH /v1/vaults/:vaultUUID/items/:uuid","timestamp":"2021-05-06T17:32:13.961403Z","level":4}
{"log_message":"(D) mounting route GET /v1/activity","timestamp":"2021-05-06T17:32:13.961448Z","level":4}
{"log_message":"(I) starting 1Password Connect API ...","timestamp":"2021-05-06T17:32:13.961508Z","level":3}
{"log_message":"(I) serving on :8080","timestamp":"2021-05-06T17:32:13.961623Z","level":3}

2.op-connect-sync

{"log_message":"(I) [discovery-local] starting discovery, advertising endpoint 8080 /meta/message","timestamp":"2021-05-06T17:32:14.778889Z","level":3}
{"log_message":"(D) mounting route GET /heartbeat","timestamp":"2021-05-06T17:32:14.794311Z","level":4}
{"log_message":"(D) mounting route GET /health","timestamp":"2021-05-06T17:32:14.811507Z","level":4}
{"log_message":"(I) starting 1Password Connect Sync ...","timestamp":"2021-05-06T17:32:14.811834Z","level":3}
{"log_message":"(I) serving on :8080","timestamp":"2021-05-06T17:32:14.812225Z","level":3}
{"log_message":"(I) database initialization complete","timestamp":"2021-05-06T17:32:14.846409Z","level":3}
{"log_message":"(I) ### syncer credentials bootstrap ### ","timestamp":"2021-05-06T17:32:14.847951Z","level":3}

When we use SDK methods or API to get the list of vaults
these are the logs on op-connect-api

{"log_message":"(D) not handled: GET /v1/vaults/","timestamp":"2021-05-06T17:34:56.962677Z","level":4}
{"log_message":"(I) GET /v1/vaults","timestamp":"2021-05-06T17:34:56.982881Z","level":3,"scope":{"request_id":"13c09597-5725-45a7-8443-b91979cdcdc9"}}
{"log_message":"(I) notifying syncer of new token","timestamp":"2021-05-06T17:34:56.988643Z","level":3,"scope":{"request_id":"13c09597-5725-45a7-8443-b91979cdcdc9","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}
{"log_message":"(D) Unable to find existing span for request 13c09597-5725-45a7-8443-b91979cdcdc9","timestamp":"2021-05-06T17:34:57.00299Z","level":4,"scope":{"request_id":"13c09597-5725-45a7-8443-b91979cdcdc9","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}
{"log_message":"(I) awaiting healthy syncer before continuing","timestamp":"2021-05-06T17:34:57.012686Z","level":3,"scope":{"request_id":"13c09597-5725-45a7-8443-b91979cdcdc9","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}
{"log_message":"(D) post-handler contenttype: ","timestamp":"2021-05-06T17:35:07.03422Z","level":4,"scope":{"request_id":"13c09597-5725-45a7-8443-b91979cdcdc9","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}
{"log_message":"(D) setting auto-detected contenttype: application/json","timestamp":"2021-05-06T17:35:07.035335Z","level":4,"scope":{"request_id":"13c09597-5725-45a7-8443-b91979cdcdc9","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}
{"log_message":"(I) GET /v1/vaults completed (408: Request Timeout)","timestamp":"2021-05-06T17:35:07.037216Z","level":3,"scope":{"request_id":"13c09597-5725-45a7-8443-b91979cdcdc9","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}
{"log_message":"(D) not handled: GET /v1/vaults/","timestamp":"2021-05-06T17:36:23.372255Z","level":4}
{"log_message":"(I) GET /v1/vaults","timestamp":"2021-05-06T17:36:23.377774Z","level":3,"scope":{"request_id":"bb6140d7-cd78-4ee0-bddf-96f8c1f91594"}}
{"log_message":"(I) notifying syncer of new token","timestamp":"2021-05-06T17:36:23.37922Z","level":3,"scope":{"request_id":"bb6140d7-cd78-4ee0-bddf-96f8c1f91594","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}
{"log_message":"(D) Unable to find existing span for request bb6140d7-cd78-4ee0-bddf-96f8c1f91594","timestamp":"2021-05-06T17:36:23.383207Z","level":4,"scope":{"request_id":"bb6140d7-cd78-4ee0-bddf-96f8c1f91594","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}
{"log_message":"(D) post-handler contenttype: ","timestamp":"2021-05-06T17:36:33.387019Z","level":4,"scope":{"request_id":"bb6140d7-cd78-4ee0-bddf-96f8c1f91594","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}
{"log_message":"(D) setting auto-detected contenttype: application/json","timestamp":"2021-05-06T17:36:33.387255Z","level":4,"scope":{"request_id":"bb6140d7-cd78-4ee0-bddf-96f8c1f91594","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}
{"log_message":"(I) GET /v1/vaults completed (408: Request Timeout)","timestamp":"2021-05-06T17:36:33.387552Z","level":3,"scope":{"request_id":"bb6140d7-cd78-4ee0-bddf-96f8c1f91594","jti":"oq3jdvgub4swzyq6x7qabijyvq"}}

and no logs on op-connect-sync

Other Information

  • Docker image version 1.1 - arm (latest)

We also tried running with older docker images (v1.0) but is generating 500 status code

May be we are missing something and seems like two services are not able to communicate with each other correctly.

Thanks in advance.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided
Referrer: forum-search:syncing

Comments

  • Hello!

    I can see how this would be frustrating. Could you clarify if you're running Docker on an Apple M1 machine? This may be an issue where Docker, running on M1, is not correctly networking the two containers. The container discovery relies on multicast, and there could be some issues with networking on the ARM Docker builds.

  • pvkas13
    pvkas13
    Community Member

    Yes, I am running it on M1

  • Thanks!

    We're still testing against the M1 builds for Docker. Any issues with network communication may be isolated to compatibility issues with Docker and M1 architectures. That said, it looks like there were some updates over the weekend related to networking. Are you able to test using the latest Docker for Mac build?

  • wjlyerly
    wjlyerly
    Community Member

    I'm having a similar problem with the Connect Server running on Docker on an M1 Mac. Requests from a client result in a timeout (408). The same setup works fine on an Intel Mac.

  • lstartoni
    lstartoni
    Community Member

    I am seeing this issue as well, on an M1 Mac.

  • Hi lstartoni,

    Thanks for the follow up. We haven't yet released an arm64 image of the connect server but it is on our roadmap to smooth out issues with Apple Silicon and Docker

  • roderik
    roderik
    Community Member

    We went all-in on secrets last week and we have 1 dev working on M1.

    By defining the platform to run the containers run, but she is indeed stuck on the 408 error when she wants to interact with the API.

      op-connect-api:
        image: 1password/connect-api:latest
        platform: linux/amd64
        ports:
          - '8080:8080'
        volumes:
          - './1password-credentials.json:/home/opuser/.op/1password-credentials.json'
          - 'data:/home/opuser/.op/data'
      op-connect-sync:
        image: 1password/connect-sync:latest
        platform: linux/amd64
        ports:
          - '8081:8080'
        volumes:
          - './1password-credentials.json:/home/opuser/.op/1password-credentials.json'
          - 'data:/home/opuser/.op/data'
    

    Is there any progress or workaround out there?

  • roderik
    roderik
    Community Member

    I found a temporary workaround by port forwarding to our connect in the k8s cluster, but it is very difficult to work with on an M1 mac.

This discussion has been closed.