Closed Dewsworld closed 3 years ago
Hi @Dewsworld
It looks like there is an issue with connecting to your server. Are you able to open raw connection to same server and same port from where application is running?
Hi @Dewsworld
It looks like there is an issue with connecting to your server. Are you able to open raw connection to same server and same port from where application is running?
@ra1u Can you put some code to do that?
Try to get valid Future<Socket>
when calling
You can also take a look at lib/connection.dart where might be source of current issue
Try to get valid
Future<Socket>
when callingYou can also take a look at lib/connection.dart where might be source of current issue
Here is the result from log, please look at the SocketException still persists after a few lines
[+1489 ms] I/flutter (11938): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[ ] I/flutter (11938): │ #0 main (package:flutter_redis_sample/main.dart:13:7)
[ ] I/flutter (11938): │ #1 _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:136:25)
[ ] I/flutter (11938): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
[ ] I/flutter (11938): │ 🐛 Instance of 'Future<Socket>'
[ ] I/flutter (11938): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[ +44 ms] D/libc-netbsd(11938): [getaddrinfo]: mtk hostname=test2.lalbok.services; servname=(null); netid=0; mark=0
[ ] D/libc-netbsd(11938): [getaddrinfo]: mtk ai_addrlen=0; ai_canonname=(null); ai_flags=1024; ai_family=0
[ +3 ms] D/libc-netbsd(11938): getaddrinfo: test2.lalbok.services get result from proxy gai_error = 0
[+3690 ms] D/GraphicBuffer(11938): register, handle(0x74acfb6d40) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
[ +226 ms] E/flutter (11938): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = test2.lalbok.services, port = 39824
[ ] E/flutter (11938):
[ +154 ms] D/GraphicBuffer(11938): register, handle(0x74acfa1540) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
It is hard to tell what is going on without more info, but if you are unable to connect to your redis server by using only Socket it is out of scope of this library. I unfortunately do not have much of experience in flutter, to be able to help you further.
Okey, thanks for your effort.
Btw, here is the documents I followed to setup redis.
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04
Is there anything I am missing on server side? If you could.
I would start start by investigating why there is "Connection refused" error message
Okey, thanks again for your assistance. Will find something.
Hello When I run a simple code
I get this error
2021-01-12 15:54:38.405 3460-3488/com.dw.flutter_redis_sample E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = some_production_server_address, port = 39609
I have added this in the manifest
<uses-permission android:name="android.permission.INTERNET"/>
Also, I am using a real device.
I am using port 6379, I am not sure why this port used for 39609 (which also changes each time I restart the app)