ipfs-shipyard / ipfs-shipyard/java-ipfs-http-client

when i use pubsub shutdown ipfs will bug

Aperta
#228 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
558
Fork
240
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

nohup ipfs daemon --enable-pubsub-experiment --enable-namesys-pubsub > nohup.out

root@4b49ea53b543:~# cat nohup.out
Initializing daemon...
Kubo version: 0.18.1
Repo version: 13
System version: amd64/linux
Golang version: go1.19.1
2023-05-04T06:33:14.126Z ERROR cmd/ipfs ipfs/daemon.go:406 Private networking (swarm.key / LIBP2P_FORCE_PNET) does not work with public HTTP IPNIs enabled by Routing.Type=auto. Kubo will use Routing.Type=dht instead. Update config to remove this message.
go-libp2p resource manager protection disabled
Swarm is limited to private network of peers with the swarm key
Swarm key fingerprint: 5563f4bb81734cca734ff7565b478edb
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4003/ws
Swarm listening on /ip4/172.17.0.3/tcp/4001
Swarm listening on /ip4/172.17.0.3/tcp/4003/ws
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/127.0.0.1/tcp/4003/ws
Swarm announcing /ip4/172.17.0.3/tcp/4001
Swarm announcing /ip4/172.17.0.3/tcp/4003/ws
API server listening on /ip4/0.0.0.0/tcp/5001
WebUI: http://0.0.0.0:5001/webui
Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080
Daemon is ready
2023-05-04T06:33:46.039Z ERROR swarm2 swarm/swarm.go:215 error when shutting down listener: close tcp4 0.0.0.0:4003: use of closed network connection
2023-05-04T06:34:14.161Z ERROR cmd/ipfs ipfs/daemon.go:588 failed to access config: cannot access config, repo not open
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1a8 pc=0x21339b7]

goroutine 838 [running]:
main.daemonFunc.func7()
github.com/ipfs/kubo@v0.18.1/cmd/ipfs/daemon.go:590 +0xb7
created by time.goFunc
time/sleep.go:176 +0x32

`public static void main(String[] args) {

test();
}

private static void test() {
IPFS _ipfs = new IPFS("ip...", 5001);
String topic = "uL3JlY29yZC9MMmx3Ym5NdkFDUUlBUklnZk5RSjdHS0xGN2tBeU9XVzh4dHg2NG16SC1CdUlWazdrQUhwTDhsdXdpOA";
Consumer> results = new Consumer>() {

@Override
public void accept(Map arg0) {
// TODO Auto-generated method stub
System.out.println(arg0);

}

};
Consumer error = new Consumer() {

@Override
public void accept(IOException arg0) {
// TODO Auto-generated method stub
System.out.println(arg0);
throw new UnsupportedOperationException("Unimplemented method 'accept'");
}

};
ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(1);
executor.submit(() -> {
try {
_ipfs.pubsub.sub(topic, results, error);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
});

try {
Thread.sleep(10000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("shutdown");
try {
_ipfs.shutdown();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}`

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start by reproducing the reported shutdown sequence with the Java pubsub example and the shown Kubo daemon command. Read the reported cmd/ipfs/daemon.go:590 stack trace and determine whether the failure belongs to this client or the daemon; done means the component and a reliable reproduction are identified.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.