mrusme / superhighway84

USENET-inspired, uncensorable, decentralized internet discussion system running on IPFS & OrbitDB
https://xn--gckvb8fzb.com/superhighway84
GNU General Public License v3.0
694 stars 24 forks source link

Can people get messages on v0.2? #44

Closed Jay4242 closed 2 years ago

Jay4242 commented 2 years ago

I wasn't getting any messages with the new update. I checked my logs and saw this occasionally,

2022-05-08T16:16:14.384-0700 WARN replicator/replicator.go:120 unable to close emitter {"error": "closed an emitter more than once"} berty.tech/go-orbit-db/stores/replicator.(replicator).Stop /home/anon/go/pkg/mod/berty.tech/go-orbit-db@v1.17.1/stores/replicator/replicator.go:120 berty.tech/go-orbit-db/stores/basestore.(BaseStore).Close /home/anon/go/pkg/mod/berty.tech/go-orbit-db@v1.17.1/stores/basestore/base_store.go:309 berty.tech/go-orbit-db/baseorbitdb.(orbitDB).closeAllStores /home/anon/go/pkg/mod/berty.tech/go-orbit-db@v1.17.1/baseorbitdb/orbitdb.go:208 berty.tech/go-orbit-db/baseorbitdb.(orbitDB).Close /home/anon/go/pkg/mod/berty.tech/go-orbit-db@v1.17.1/baseorbitdb/orbitdb.go:478 github.com/mrusme/superhighway84/database.(*Database).Disconnect /zmedia/scratch/software/github/superhighway84/database/database.go:226 main.main /zmedia/scratch/software/github/superhighway84/superhighway84.go:144 runtime.main /usr/lib/go-1.17/src/runtime/proc.go:255

Although, I'm not seeing it on other machines.

mrusme commented 2 years ago

Oh, wait, go 1.17? Could you upgrade to 1.18 and rebuild?

mrusme commented 2 years ago

Just on a side-note, in case this still persists, please try the following:

Remove the IPFS repo that Superhighway84 was using, e.g.:

mv ~/.ipfs ~/.ipfs.old

Initialize a new repository using the up to date IPFS version (0.12):

ipfs init

Optionally reconfigure the lowpower profile:

ipfs config profile apply lowpower

And try launching Superhighway84:

superhighway84
2022/05/27 00:10:45 loading configuration ...
2022/05/27 00:10:45 initializing logger ...
2022/05/27 00:10:45 initializing cache ...
2022/05/27 00:10:45 initializing TUI and loading database, please wait ...
2022/05/27 00:10:45 initializing database ...
2022/05/27 00:10:45 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.
2022/05/27 00:10:46 connecting database ...

This step could take a significant amount of time and it might seem as if it's hanging. You can check the log for more info:

tail -f ~/.cache/superhighway84.log

PS: To get rid of the warning, as usual:

sysctl -w net.core.rmem_max=2500000
mrusme commented 2 years ago

If you're still facing issue, there's a last resort, which is, removing the local db and starting with a fresh database. You can do so like this:

mv ~/.cache/superhighway84 ~/.cache/superhighway84.old
mv ~/.cache/superhighway84.program ~/.cache/superhighway84.program.old

This way Superhighway84 will resync everything from ground up, which might take some time as well. You'll initially be greeted with an empty interface, but after a few seconds/minutes you should be able to see content coming in. If not, Ctrl+Q and restart it.

If you should still be having issues, please post some output from the log I mentioned before. Make sure to anonymize everything that you're not comfortable with sharing.

georgedorn commented 1 year ago

This no longer works; after moving/removing those two items, superhighway84 fails to start, with:

$ IPFS_PATH=~/.ipfs-sh84 ./superhighway84 --help
2023/03/02 14:21:38 loading configuration ...
2023/03/02 14:21:38 initializing logger ...
2023/03/02 14:21:38 initializing cache ...
2023/03/02 14:21:38 open /home/gdorn/.cache/superhighway84/program: no such file or directory
panic: open /home/gdorn/.cache/superhighway84/program: no such file or directory

goroutine 1 [running]:
log.Panicln({0xc0005fff48?, 0x29?, 0xc000052011?})
    /opt/hostedtoolcache/go/1.18.9/x64/src/log/log.go:399 +0x65
main.main()
    /home/runner/work/superhighway84/superhighway84/superhighway84.go:72 +0x315

ETA: If somebody else runs into this, deleting ~/.config/superhighway84.toml will trigger it to rebuild everything on next launch.