ERROR: No cluster could be found for workspace '*' and cluster 'default'


#1

Github reference: https://github.com/prisma/prisma-admin-feedback/issues/91

Went to slack to find out I’m not the only one experiencing this but Andy Deitler as well:
https://prisma.slack.com/archives/CA491RJH0/p1552687055746500

He said:

Every time I run “prisma deploy” I am now getting this error. I had run one prisma instance with 1.29-beta to check out _admin, but now I’m trying to run a completely different instance with 1.28.5 and getting this no matter what I do.

ERROR: No cluster could be found for workspace '*' and cluster 'default'
{
  "data": {
    "generateClusterToken": null
  },
  "errors": [
    {
      "message": "No cluster could be found for workspace '*' and cluster 'default'",
      "locations": [
        {
          "line": 3,
          "column": 9
        }
      ],
      "path": [
        "generateClusterToken"
      ],
      "code": 222
    }
  ],
  "status": 200
}

Same thing happened to me. I came from 1.28, tried the 1.29-beta, and got the exact same error. Tried the following already:

  1. I went back to 1.28 and the error still persists: npm i -g prisma coming from the beta version that I installed using npm i -g prisma@beta. Confirmed that I was able to go back to version 1.28.5 by doing:
    prisma --version that results to:
prisma/1.28.5 (windows-x64) node-v11.10.0
  1. Removed prisma completely: npm uninstall -g prisma
  2. Removing the docker containers: docker stop then docker rm
  3. Removing the docker images and re-downloading: docker image rm then docker-compose up -d
  4. Re-starting docker: docker-machine stop then docker-machine start
  5. Restarting my pc
  6. Removed prisma npm uninstall -g prisma then cleared the npm cache npm cache clean --force
    But to no avail.

I didn’t have any issue like this prior to trying out 1.29-beta


docker-compose.yml

version: '3'
services:
  prisma:
    image: prismagraphql/prisma:1.28
    restart: always
    ports:
    - "4466:4466"
    environment:
      PRISMA_CONFIG: |
        port: 4466
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        # managementApiSecret: my-secret
        databases:
          default:
            connector: postgres
            host: postgres
            user: prisma
            password: prisma
            rawAccess: true
            port: 5432
            migrations: true
  postgres:
    image: postgres
    restart: always
    environment:
      POSTGRES_USER: prisma
      POSTGRES_PASSWORD: prisma
    volumes:
      - postgres:/var/lib/postgresql/data
volumes:
  postgres:

prisma.yml

endpoint: http://192.168.99.100:4466/s5/dev
datamodel: datamodel.prisma

generate:
  - generator: typescript-client
    output: ./generated/prisma-client/

docker info

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 4
Server Version: 18.09.3
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: e6b3f5632f50dbc4e9cb6288d911bf4f5e95b18e
runc version: 6635b4f0c6af3810594d2770f662f34ddc15b40d
init version: fec3683
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.14.104-boot2docker
Operating System: Boot2Docker 18.09.3 (TCL 8.2.1)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 989.4MiB
Name: default
ID: UDMO:2FDG:XM4E:RPKA:ANB3:NGER:BSWH:S3EL:SZJN:2BGF:Y4B3:FIRF
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: immanuelrosal
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

#2

It got this problem too. And, I solved this problem by uncommenting the

managementApiSecret:<your-secret-here>

in docker-compose.yml file. And, Don’t forget to add your ApiSecret as well.

After that, create .env file in root path and write down .

PRISMA_MANAGEMENT_API_SECRET=<your-secret-here>

And try to deploy. It should work well. Thanks, Have a good day.


#3

I am getting this error too ,but this method not-working for me

this problem solved by use prisma 1.26.4 to deploy It work very well


#4

Please use 1.28.3 for now.

See https://github.com/prisma/prisma/issues/4215


#5

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.