https://authzed.com logo
Title
t

Toi

12/15/2022, 2:33 PM
I've deployed an instance of spicedb but I'm having some trouble connecting to it. I get this error:
"type": "Error",
"message": "2 UNKNOWN: "
Is it something on the server side?
Also, the server keeps logging this warning:
{
  "level": "warn",
  "time": "2022-12-15T14:09:27Z",
  "message": "datastore wasn't ready when attempting garbage collection"
}
Not sure if I should worry about it
Apparently it didn't connect to the db because I didn't run the migration first
Shouldn't the image run the migration command itself? Or should I manually run it?
v

vroldanbet

12/15/2022, 3:22 PM
Can you describe your setup? using the operator? which datastore?
t

Toi

12/15/2022, 3:50 PM
I'm not running the operator. I'm running it on kubernetes though. I've managed to deploy the pod, and the server started successfully. I ran the migration manually and it connected to my postgres successfully as well. The UNKNOWN error still persists though. The server doesn't log anything when I make the request, so I'm not sure if it's reaching the server
j

Joey

12/15/2022, 3:50 PM
you need to run
spicedb migrate
yourself unless using the operator
you need to restart the server after you run the migrate
otherwise, it won't be marked as healthy
t

Toi

12/15/2022, 3:51 PM
I restarted it, and the pod seems to be healthy too
j

Joey

12/15/2022, 3:51 PM
how are you trying to connect to the pod?
zed
or a client lib?
t

Toi

12/15/2022, 3:51 PM
datastore garbage collection worker started
grpc server started serving
I'm using the node client
j

Joey

12/15/2022, 3:52 PM
okay
make sure you're setting the correct security option on the node client create call
if you're not using TLS and you're not exposing via localhost, you'll need the specialized
insecure
flag
there is also support for a custom TLS cert
if you are using self-signed TLS
t

Toi

12/15/2022, 3:57 PM
I'm using TLS. The connection does seem to be established according to the grpc logs:
connectivity_state | (1) dns:<my-url> CONNECTING -> READY
subchannel_call | [3] Received server headers:
        :status: 464
        server: awselb/2.0
        date: Thu, 15 Dec 2022 15:55:28 GMT
        content-length: 0
j

Joey

12/15/2022, 3:59 PM
are you connecting to the correct port?
t

Toi

12/15/2022, 3:59 PM
Apparently, it might be this;
HTTP 464

The load balancer received an incoming request protocol that is incompatible with the version config of the target group protocol.
j

Joey

12/15/2022, 4:00 PM
what kind of LB are you using?
t

Toi

12/16/2022, 9:45 PM
Sorry about the delay. It might be something in our infrastrcture, we are still investigating. Probably something related to http/1.1