I’m having trouble getting the list of pins in an ipfs-cluster I just set up. I’m using ipfs-cluster-ctl 0.13.3 and ipfs-cluster-service 0.13.3.
Without SSL & basic auth configured on the restapi endpoint, I was able to run ipfs-cluster-ctl pin ls
and get a list of pins. Once I configured SSL & basic auth and run the same pin ls
(with the extra args required for SSL) there are errors.
When I run ipfs-cluster-ctl --no-check-certificate --host '/dns4/cluster.sbtp.xyz/tcp/9094' --basic-auth [REDACTED] pin ls
, I get the following:
2022-09-11T13:12:50.787-0700 DEBUG cluster-ctl ipfs-cluster-ctl/main.go:153 debug level enabled
2022-09-11T13:12:50.787-0700 WARN cluster-ctl ipfs-cluster-ctl/main.go:170 SSL automatically enabled with basic auth credentials. Set "force-http" to disable
2022-09-11T13:12:50.787-0700 DEBUG apiclient client/lbclient.go:81 retrying 1 times
2022-09-11T13:12:50.787-0700 DEBUG apiclient client/request.go:64 GET: https://cluster.sbtp.xyz:9094/allocations?filter=all
2022-09-11T13:12:51.168-0700 ERROR apiclient client/request.go:151 json: cannot unmarshal array into Go value of type api.Pin
2022-09-11T13:12:51.168-0700 ERROR apiclient client/lbclient.go:95 could not cast error into api.Error
error : json: cannot unmarshal array into Go value of type api.Pin
The funny thing is, when I open https://cluster.sbtp.xyz:9094/allocations?filter=pin
in my browser, I get json output as expected
[{"replication_factor_min":2,"replication_factor_max":2,"name":"","mode":"recursive","shard_size":104857600,"user_allocations":null,"expire_at":"0001-01-01T00:00:00Z","metadata":null,"pin_update":null,"cid":{"/":"REDACTED"},"type":2,"allocations":["REDACTED","REDACTED"],"max_depth":-1,"reference":null},{"replication_factor_min":-1,"replication_factor_max":-1,"name":"","mode":"recursive","shard_size":104857600,"user_allocations":null,"expire_at":"0001-01-01T00:00:00Z","metadata":null,"pin_update":null,"cid":{"/":"REDACTED"},"type":2,"allocations":[],"max_depth":-1,"reference":null}]
Could these errors indicate bugs?
|2022-09-11T13:12:51.168-0700|ERROR|apiclient|client/request.go:151|json: cannot unmarshal array into Go value of type api.Pin|
|---|---|---|---|---|
|2022-09-11T13:12:51.168-0700|ERROR|apiclient|client/lbclient.go:95|could not cast error into api.Error|
EDIT: Just realized I’m running old versions. I’m going to update
EDIT2: Update to v1.0.2 solved the problem.