ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
16.18k stars 3.02k forks source link

ipfs/kubo:master-latest docker causing error #10558

Closed ehsan6sha closed 1 week ago

ehsan6sha commented 4 weeks ago

Checklist

Installation method

built from source

Version

Kubo version: 0.32.0-dev-56c68a1
Repo version: 16
System version: arm64/linux
Golang version: go1.23.2

Config

No response

Description

the latest update starts to show Error: invalid or no prefix in shard identifier: �������������������������������������

even when started fresh

gammazero commented 3 weeks ago

@ehsan6sha

Check Config

It seems like something is wrong with the config in the Docker container. Are you using the default config? If you are, the config should be located in the container at /data/ipfs/config. Could you post the output from the command:

docker exec -ti <container_id> /bin/cat /data/ipfs/config 

If the IPFS repo is mounted outside of the container, then check for faults in the storage where the repo is mounted. If this is the case, them please run disk diagnostics to check for faults.

Error Detail

The error comes from here because the shard identifier above does not start with "/repo/flatfs/shard/".

Kubo calls this from the flatfs plugin, here, getting the shard identifier from the "shardFunc" parameter in the fsrepo datastore config. Normally the config should contain something like:

 "Datastore": {                                                                                                           
    "Spec": {                                                                                                              
      "mounts": [                                                                                                          
        {                                                                                                                  
          "child": {                                                                                                       
            "path": "blocks",                                                                                              
            "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",                                                           
            "sync": true,                                                                                                  
            "type": "flatfs"                                                                                               
          },                                                                                                               
          "mountpoint": "/blocks",                                                                                         
          "prefix": "flatfs.datastore",                                                                                    
          "type": "measure"                                                                                                
        },
    ...
}
github-actions[bot] commented 2 weeks ago

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

github-actions[bot] commented 1 week ago

This issue was closed because it is missing author input.