studio icon indicating copy to clipboard operation
studio copied to clipboard

Running npx prisma studio gives “This site can’t be reached. The connection was reset." error.

Open ObserverMoment opened this issue 5 years ago • 5 comments

Posted on request of siddhant via slack.

Caused by having other processes running on port 5555 (see below)

Closing all processes on Port 5555 clears up the issue but Studio should be automatically checking for this clash and opening on a different port.

Environment variables loaded from prisma/.env
@prisma/cli          : 2.8.1
Current platform     : darwin
Query Engine         : query-engine 439da16b2f8314c6faca7d2dad2cdcf0732e8a9c (at node_modules/@prisma/cli/query-engine-darwin)
Migration Engine     : migration-engine-cli 439da16b2f8314c6faca7d2dad2cdcf0732e8a9c (at node_modules/@prisma/cli/migration-engine-darwin)
Introspection Engine : introspection-core 439da16b2f8314c6faca7d2dad2cdcf0732e8a9c (at node_modules/@prisma/cli/introspection-engine-darwin)
Format Binary        : prisma-fmt 439da16b2f8314c6faca7d2dad2cdcf0732e8a9c (at node_modules/@prisma/cli/prisma-fmt-darwin)
Studio               : 0.296.0
  1. Logs from Developer Tools Console or Command line, if any:

Running isof -i:5555:

adb       3470 richbeans   11u  IPv4 0x8b6e5d9a14d1eb9b      0t0  TCP localhost:51517->localhost:personal-agent (ESTABLISHED)
qemu-syst 3475 richbeans   49u  IPv4 0x8b6e5d9a14a4fcfb      0t0  TCP localhost:personal-agent (LISTEN)
qemu-syst 3475 richbeans   50u  IPv6 0x8b6e5d9a1234a50b      0t0  TCP localhost:personal-agent (LISTEN)
qemu-syst 3475 richbeans   92u  IPv4 0x8b6e5d9a15ba193b      0t0  TCP localhost:personal-agent->localhost:51517 (ESTABLISHED)
qemu-syst 3475 richbeans   95u  IPv6 0x8b6e5d9a34ee4deb      0t0  TCP localhost:personal-agent->localhost:54851 (CLOSE_WAIT)

Running: curl localhost:5555:

curl: (56) Recv failure: Connection reset by peer

ObserverMoment avatar Oct 14 '20 08:10 ObserverMoment

Thanks @ObserverMoment, I'll investigate this!

sdnts avatar Oct 14 '20 12:10 sdnts

Looks like the Android emulator uses port 5555, which is what is blocking my instance of Studio.

ObserverMoment avatar Oct 14 '20 14:10 ObserverMoment

Ah, FWIW you can tell Studio to use different port manually by passing in a --port argument (till I figure out why this is happening!)

sdnts avatar Oct 14 '20 14:10 sdnts

Looks like the Android emulator uses port 5555, which is what is blocking my instance of Studio.

Closing my android emulator solved the issue for me😅, thank you.

DanteLentsoe avatar Jul 27 '22 12:07 DanteLentsoe

This was also happening to me. In my case, it was auto redirecting to https instead from http.

Solution: (Chrome) delete all "Cached Images and Files" in Settings - Privacy and Security.

tajbowness avatar Jul 14 '24 04:07 tajbowness