{"record":{"id":"237b5bef550db721","repo":"ipfs/kubo","slug":"no-local-swarm-address-for-migration-node","errorCode":null,"errorMessage":"no local swarm address for migration node","messagePattern":"no local swarm address for migration node","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/ipfs/kubo/add_migrations.go","lineNumber":108,"sourceCode":"\t\tipfsPath, err := ufs.Add(ctx, files.NewReaderStatFile(f, fi), options.Unixfs.Pin(pin, \"\"))\n\t\tf.Close()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfmt.Printf(\"Added migration file %q: %s\\n\", filepath.Base(filePath), ipfsPath)\n\t}\n\n\treturn nil\n}\n\n// addMigrationPaths adds the files at paths to IPFS, optionally pinning\n// them. This is done after connecting to the peer.\nfunc addMigrationPaths(ctx context.Context, node *core.IpfsNode, peerInfo peer.AddrInfo, paths []path.Path, pin bool) error {\n\tif len(paths) == 0 {\n\t\treturn errors.New(\"nothing downloaded by ipfs fetcher\")\n\t}\n\tif len(peerInfo.Addrs) == 0 {\n\t\treturn errors.New(\"no local swarm address for migration node\")\n\t}\n\n\tipfs, err := coreapi.NewCoreAPI(node)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Connect to temp node\n\tif err := ipfs.Swarm().Connect(ctx, peerInfo); err != nil {\n\t\treturn fmt.Errorf(\"could not connect to migration peer %q: %s\", peerInfo.ID, err)\n\t}\n\tfmt.Printf(\"connected to migration peer %q\\n\", peerInfo)\n\n\tif pin {\n\t\tpinAPI := ipfs.Pin()\n\t\tfor _, ipfsPath := range paths {\n\t\t\terr := pinAPI.Add(ctx, ipfsPath)\n\t\t\tif err != nil {","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/cmd/ipfs/kubo/add_migrations.go#L90-L126","documentation":"addMigrationPaths needs at least one swarm address for the temporary migration node so it can connect to it from the main node. An empty peer.AddrInfo.Addrs means the migration node reported no listen addresses, making the swarm connect impossible.","triggerScenarios":"The temporary migration ipfs node initialized/started but exposed no addresses (failed to bind, misconfigured Addresses.Swarm, or the AddrInfo was populated from `ipfs id` output that lacked Addrs).","commonSituations":"Port conflicts or restricted environments (containers without loopback networking) preventing the temp node from listening; broken API/swarm address config in the temp IPFS_PATH; firewall blocking local sockets.","solutions":["Ensure the temp migration node can bind a swarm address (check its config Addresses.Swarm and logs)","Check for port conflicts or sandboxing (containers, seccomp) that block local listening","Re-run `ipfs daemon --migrate`; inspect the temp node's `ipfs id` output for empty Addrs","Fall back to external migrations: run fs-repo-migrations directly instead of the embedded fetch path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"id, _ := exec.Command(\"ipfs\", \"--config\", tmpPath, \"id\").Output()\nif !strings.Contains(string(id), \"\\\"Addrs\\\": [\") {\n    return errors.New(\"temp migration node has no swarm addresses\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify the temp node's `ipfs id` shows non-empty Addrs before connecting","Avoid port-restricted or networkless sandboxes when running daemon migrations","Use external fs-repo-migrations in restricted environments"],"tags":["migrations","swarm","network"],"backgroundTag":"missing-swarm-address","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}