Closed anandwana001 closed 2 years ago
Steps:
npx dsadmin --project=my-datastore-project --datastore-emulator-host=localhost:8081
npx dsadmin --project=my-datastore-project --datastore-emulator-host=localhost:8081 dsadmin (project my-datastore-project) listening on http://localhost:8080 node:internal/process/promises:227 triggerUncaughtException(err, true /* fromPromise */); ^ Error: connect ECONNREFUSED 127.0.0.1:8081 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1139:16) { errno: -61, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 8081, statusCode: 503, connectedSocket: false, reusedSocket: false } npm ERR! code 1 npm ERR! path /Desktop/opensource/oppia npm ERR! command failed npm ERR! command sh -c dsadmin "--project=my-datastore-project" "--datastore-emulator-host=localhost:8081" npm ERR! A complete log of this run can be found in: npm ERR! /.npm/_logs/2021-12-17T02_11_46_504Z-debug.log
Chrom console log
api.js:17 POST http://localhost:8080/v1/projects/my-datastore-project:runQuery net::ERR_EMPTY_RESPONSE Wu @ api.js:17 id @ api.js:30 (anonymous) @ api.js:65 P @ react-query.js:1050 E @ react-query.js:620 ww @ react-query.js:680 t.fetch @ react-query.js:1081 n.executeFetch @ react-query.js:2336 n.onSubscribe @ react-query.js:2189 t.subscribe @ react-query.js:34 (anonymous) @ react-query.js:2960 o5 @ index-3eae4d6e.js:276 t.unstable_runWithPriority @ index-3eae4d6e.js:14 ho @ index-3eae4d6e.js:136 Ri @ index-3eae4d6e.js:275 (anonymous) @ index-3eae4d6e.js:275 Fe @ index-3eae4d6e.js:12 I.port1.onmessage @ index-3eae4d6e.js:8 react-query.js:1107 TypeError: Failed to fetch at Wu (api.js:17) at id (api.js:30) at Object.queryFn (api.js:65) at Object.P [as fn] (react-query.js:1050) at E (react-query.js:620) at new ww (react-query.js:680) at e.t.fetch (react-query.js:1081) at t.n.executeFetch (react-query.js:2336) at t.n.onSubscribe (react-query.js:2189) at t.subscribe (react-query.js:34) onError @ react-query.js:1107 f @ react-query.js:592 (anonymous) @ react-query.js:656 Promise.catch (async) E @ react-query.js:640 ww @ react-query.js:680 t.fetch @ react-query.js:1081 n.executeFetch @ react-query.js:2336 n.onSubscribe @ react-query.js:2189 t.subscribe @ react-query.js:34 (anonymous) @ react-query.js:2960 o5 @ index-3eae4d6e.js:276 t.unstable_runWithPriority @ index-3eae4d6e.js:14 ho @ index-3eae4d6e.js:136 Ri @ index-3eae4d6e.js:275 (anonymous) @ index-3eae4d6e.js:275 Fe @ index-3eae4d6e.js:12 I.port1.onmessage @ index-3eae4d6e.js:8 api.js:17 POST http://localhost:8080/v1/projects/my-datastore-project:runQuery net::ERR_CONNECTION_REFUSED Wu @ api.js:17 id @ api.js:30 (anonymous) @ api.js:50 P @ react-query.js:1050 E @ react-query.js:620 ww @ react-query.js:680 t.fetch @ react-query.js:1081 n.executeFetch @ react-query.js:2336 n.onSubscribe @ react-query.js:2189 t.subscribe @ react-query.js:34 (anonymous) @ react-query.js:2960 o5 @ index-3eae4d6e.js:276 t.unstable_runWithPriority @ index-3eae4d6e.js:14 ho @ index-3eae4d6e.js:136 Ri @ index-3eae4d6e.js:275 (anonymous) @ index-3eae4d6e.js:275 Fe @ index-3eae4d6e.js:12 I.port1.onmessage @ index-3eae4d6e.js:8 react-query.js:1107 TypeError: Failed to fetch at Wu (api.js:17) at id (api.js:30) at Object.queryFn (api.js:50) at Object.P [as fn] (react-query.js:1050) at E (react-query.js:620) at new ww (react-query.js:680) at e.t.fetch (react-query.js:1081) at t.n.executeFetch (react-query.js:2336) at t.n.onSubscribe (react-query.js:2189) at t.subscribe (react-query.js:34) onError @ react-query.js:1107 f @ react-query.js:592 (anonymous) @ react-query.js:656 Promise.catch (async) E @ react-query.js:640 ww @ react-query.js:680 t.fetch @ react-query.js:1081 n.executeFetch @ react-query.js:2336 n.onSubscribe @ react-query.js:2189 t.subscribe @ react-query.js:34 (anonymous) @ react-query.js:2960 o5 @ index-3eae4d6e.js:276 t.unstable_runWithPriority @ index-3eae4d6e.js:14 ho @ index-3eae4d6e.js:136 Ri @ index-3eae4d6e.js:275 (anonymous) @ index-3eae4d6e.js:275 Fe @ index-3eae4d6e.js:12 I.port1.onmessage @ index-3eae4d6e.js:8 :8080/favicon.ico:1 GET http://localhost:8080/favicon.ico net::ERR_CONNECTION_REFUSED
It looks like your datastore emulator is not running on 127.0.0.1 port 8081, or at least not accepting connections. Maybe it's listening on another port? Or even not binding to 127.0.0.1?
Steps:
npx dsadmin --project=my-datastore-project --datastore-emulator-host=localhost:8081
Chrom console log