[SOLVED] Self hosted Moralis Server Walkthrough

Hi,
I am going through the Self hosted Moralis Server Walkthrough tutorial available at this link https://www.youtube.com/watch?v=l2qTyc-V9cM

The below error appears when I run the parse-server-migration.
It appears that I am not able to authenticate from the front end because of this.

Could you please assist.

221101-parse-server-migration john$ yarn dev
yarn run v1.22.17
$ ts-node src/index.ts
warn: DeprecationWarning: The Parse Server option 'directAccess' default will change to 'true' in a future version. Additionally, the environment variable 'PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS' will be deprecated and renamed to 'PARSE_SERVER_DIRECT_ACCESS' in a future version; it is currently possible to use either one.
warn: DeprecationWarning: The Parse Server option 'enforcePrivateUsers' default will change to 'true' in a future version.
warn: DeprecationWarning: The Parse Server option 'allowClientClassCreation' default will change to 'false' in a future version.
(node:1555) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Moralis Server is running on port 1337.
info: Parse LiveQuery Server started running
info: Ran cloud function requestMessage for user undefined with:
  Input: {"address":"0x08ce...","chain":5,"networkType":"evm"}
  Result: {"message":"defi.finance wants you to sign in with your Ethereum account:\n0x08ce...\n\nPlease sign this message to confirm your identity.\n\nURI: https://defi.finance\nVersion: 1\nChain ID: 5\nNonce: anMsIEYccrsrDWf3A\nIssued At: 2022-11-01T13:17:40.859Z\nExpiration Time: 2023-01-01T00:00:00.000Z"} {"functionName":"requestMessage","params":{"address":"0x08ce...","chain":5,"networkType":"evm"}}
info: Ran cloud function getServerTime for user undefined with:
  Input: {}
  Result: null {"functionName":"getServerTime","params":{}}
MongoServerSelectionError: connection <monitor> to 3.106.176.171:27017 closed
    at Timeout._onTimeout (/Users/john/dev_local/Moralis/221101-parse-server-migration/node_modules/mongodb/src/sdam/topology.ts:594:30)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  reason: TopologyDescription {
    type: 'ReplicaSetNoPrimary',
    servers: Map(3) {
      'ac-jzrlwt3-shard-00-00.fmihcul.mongodb.net:27017' => [ServerDescription],
      'ac-jzrlwt3-shard-00-01.fmihcul.mongodb.net:27017' => [ServerDescription],
      'ac-jzrlwt3-shard-00-02.fmihcul.mongodb.net:27017' => [ServerDescription]
    },
    stale: false,
    compatible: true,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    setName: 'atlas-u9miiy-shard-0',
    logicalSessionTimeoutMinutes: undefined
  },
  code: undefined,
  [Symbol(errorLabels)]: Set(0) {}
}
error Command failed with exit code 1.

It looks like this connection gives timeout

1 Like

Thank you for your answer.
The issue came from the fact that I was using a vpn, my bad I should have checked :see_no_evil:
It works fine now, thank you again and feel free to delete this topic if you believe it is not useful for others.