-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootsrap is not working when opendht compiled for android #684
Comments
Look, i added log in to addBootstrap dht_interface.h and now log is called lOC 83 in dht_interface.h Logcat out: means clang for some reason is using functions from dht_inteface.h instead of dht.h |
This migt be also reason that jami android app stops communicating after some time of sleep even if service is runnig. I made many tests with Push with noPush and service running. And result the same, after some time app is in background just stops cummunicating. In log i just see that ICE is not able to find connection. |
Hi, From the behaviour you encountered, you might be using the DHT Proxy client ? In that case, dht.cpp and the bootstrap option are not used. dht_proxy_client is used instead. However, to be able to use push notifications you need to setup a push notification server configured with a push service working on your device. On Android that's typically a FCM/GCM API account, which would works with gorush and the DHT proxy server. |
Yes You are right i am using DhtProxy client mode, yes make sense local bootstrap is not needed. I started investigation becuse of android app is loosing connectivity when going to background for some time even with service running and all push enabled. |
Still simple HW app is not connecting to dht nework, could You check below logs and say what could be possible reason.
node->put always fails
node->getNodeInfo gives node_id always 0
The code and config of simple app:
|
From the logs, it looks like network requests to the proxy server fail (for both ipv4 and ipv6), which is odd. Was the log captured when the app was in the background ? Note that to work with push notifications, unfortunately you would need to have a FCM API token configured with the Android app and provided as the "push_token" |
Above issue is solved, on the device i was initially testing HW app, selinux was blocking network connections. After moving HW app to another device all works. HW app means dhtnode like app with listen to specific value. So just opendht layer running with dht proxy option, no push, seems to be super stable, after almost 24 hours on the phone works fine, sending and receiving data on listen handler. |
but all tests done on jami android app with different configurations:
and result same after some time of phone is left no touched jami app stops receiving and sending messages |
in the logs i see issue related to ICE, mainly: "All ICE checklists failed" (PJNATH_EICEFAILED). I can get detialed logs if You would like to check it. |
Hi, just tryed to build "Hello World" application base on libopendht.a taken from android build.
And i realized that node->bootstrap("bootstap.jami.net", "4222"); is doing anything.
What i found that bootstrap call chain is finally calling addBootstrap from securedht.h:
and this is the last log string in logcat. Log put inside dht_->addBootstrap(host, service); is not called:
located in dht.h
void addBootstrap(const std::string& host, const std::string& service) override {
logger_->d("dht_->addBootstrap %s %s", host, service); <------ this is not going to logcat
bootstrap_nodes.emplace_back(host, service);
startBootstrap();
}
means dht_->addBootstrap(host, service); is calling wrong function.
More, if i compile this on intel x64 all works. Looks like android clang is breaking something? override is not working?
The text was updated successfully, but these errors were encountered: