Redsmin / proxy

:satellite: Redsmin proxy deamon - Access local redis instance from Redsmin
https://redsmin.com
MIT License
100 stars 16 forks source link

redsmin-proxy can't connect to redsmin server #20

Closed rscarvalho closed 8 years ago

rscarvalho commented 9 years ago

I'm trying to use redsmin-proxy to make the bridge between my local redis server and redsmin, but I'm having no success. It keeps timing out and reconnecting in an endless loop. On redsmin UI I'm receiving this message:

screen shot 2015-09-25 at 5 42 47 pm

This is the terminal output for redsmin:

2015-09-25T21:40:06.758Z - info: [Endpoint] Connecting to ssl.redsmin.com:993...
2015-09-25T21:40:06.774Z - info: [RedisClient] Redis client connected to redis://127.0.0.1:6379
2015-09-25T21:40:07.414Z - debug: [Endpoint] Connected
2015-09-25T21:40:07.414Z - debug: [Endpoint] Handshaking...
2015-09-25T21:40:17.438Z - error: [Endpoint] Connection closed
2015-09-25T21:40:17.439Z - info: [Endpoint] Reconnecting...
2015-09-25T21:40:17.439Z - info: [Endpoint] Connecting to ssl.redsmin.com:993...
2015-09-25T21:40:17.799Z - debug: [Endpoint] Connected
2015-09-25T21:40:17.799Z - debug: [Endpoint] Handshaking...
2015-09-25T21:40:27.884Z - error: [Endpoint] Connection closed
FGRibreau commented 9 years ago

Hello Rodolfo!

Have you tried to start Redsmin proxy in debug mode to see what was going on? Have you verified that you were able to access to ssl.redsmin.com.

rscarvalho commented 9 years ago

@FGRibreau that is the log in debug mode. I can connect normally to ssl.redsmin.com via openssl s_client and telnet.

FGRibreau commented 9 years ago

Hello @rscarvalho,

It's the first time I see this kind of issue, did you tested openssl & telnet from the docker/VM/server you run redsmin-proxy on? Do you use docker to run redsmin-proxy? Are you sure catnpm bin -g/../lib/node_modules/redsmin/etc/redsmin.json is configured correctly?

What is your server-ip? Our firewall could also have blocked it (it would be the first time though)

kop commented 7 years ago

I have the same issue. It was working fine until I updated redsmin-proxy to latest version and now it can't connect.

What can I do to help with debugging this?

I  2017-06-20T15:10:39.522Z - info: [Endpoint] Connecting to ssl.redsmin.com:993...
E  2017-06-20T15:10:39.925Z - debug: [Endpoint] Connected
E  2017-06-20T15:10:39.925Z - debug: [Endpoint] Handshaking...
E  2017-06-20T15:10:49.925Z - error: [Endpoint] Connection closed 
E  2017-06-20T15:10:49.925Z - debug: onClose():: reconnecting...
FGRibreau commented 7 years ago

@kop do you still have the same issue ? Did you try to launch redsmin-proxy with DEBUG=true environment variable ?

kop commented 7 years ago

@FGRibreau, no, I don't. I think this issue is related to Redsmin server. Probably client just does not print correct error when ssl.redsmin.com is not working properly.

FGRibreau commented 7 years ago

Hum it definitely works we have checks around the world every 5 minutes to ensure Redsmin-proxy works and I just verified locally with redsmin-proxy latest version on nodejs v8.

capture d ecran 2017-06-24 12 25 45
nickvoegeli commented 6 years ago

I'm experiencing this same issue. redsmin-proxy is successfully negotiating the handshake on one AWS EC2 instance but not the other. The servers are in two different AWS accounts, and I'm trying to connect each to a different redsmin account.

Log excerpt:

2018-02-27T10:00:54.063Z - info: [RedisClient] Redis client connected to redis://redis.policywizards.net:6379
2018-02-27T10:00:54.068Z - info: [Endpoint] Connecting to ssl.redsmin.com:993...
2018-02-27T10:00:54.700Z - debug: [Endpoint] Connected
2018-02-27T10:00:54.702Z - debug: [Endpoint] Handshaking...
2018-02-27T10:01:04.700Z - error: [Endpoint] Connection closed 
2018-02-27T10:01:04.700Z - debug: onClose():: reconnecting...
2018-02-27T10:01:05.453Z - info: [Endpoint] Reconnecting...
2018-02-27T10:01:05.453Z - info: [Endpoint] Connecting to ssl.redsmin.com:993...
2018-02-27T10:01:05.740Z - debug: [Endpoint] Connected
2018-02-27T10:01:05.740Z - debug: [Endpoint] Handshaking...

Common specs for both servers: OS: 64-bit Ubuntu 16.04 redsmin-proxy@4.0.1

Things I've tried:

Neither server has any iptables rules configured:

$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Any thoughts here? There don't seem to be any significant differences between these two servers.

nickvoegeli commented 6 years ago

Strangely, I waited two days, deleted that server from the redsmin GUI, and started over, and it worked the second time. No idea why.

FGRibreau commented 6 years ago

@nickvoegeli sorry for the delay, it seems really weird indeed. There might be some connectivity issues between your AWS instance and us. Be sure to setup a process runner on top of redsmin-proxy to handle disconnections

pankajjha-cd commented 3 years ago

This is exactly happening with me. I am running Centos 7 with Node v12.20.1

{"message":"[Endpoint] Connection closed ","level":"error"}
{"message":"onClose():: reconnecting...","level":"debug"}
{"message":"[Endpoint] Reconnecting...","level":"info"}
{"message":"[Endpoint] Connecting to ssl.redsmin.com:993...","level":"info"}
{"message":"[Endpoint] Connected","level":"debug"}
{"message":"[Endpoint] Handshaking...","level":"debug"}
{"message":"[Endpoint] Handshake succeeded","level":"debug"}
Endpoint#write *1
$4
info

Redis#write $4105
# Server
redis_version:6.1.242
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:d12db0dfec3596cf
redis_mode:standalone
os:Linux 4.9.162-xxxx-std-ipv6-64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:c11-builtin
gcc_version:8.3.1
process_id:6057
process_supervised:systemd
run_id:befeb3afcc46d8c8d2351333c3651bab50845512
tcp_port:6379
server_time_usec:1616139810276006
uptime_in_seconds:1381
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:5527074
executable:/usr/bin/redis-server
config_file:/etc/redis/redis.conf
io_threads_active:0

# Clients
connected_clients:17
cluster_connections:0
maxclients:10000
client_recent_max_input_buffer:64
client_recent_max_output_buffer:0
blocked_clients:0
tracking_clients:0
clients_in_timeout_table:0

# Memory
used_memory:2088680
used_memory_human:1.99M
used_memory_rss:16969728
used_memory_rss_human:16.18M
used_memory_peak:3561176
used_memory_peak_human:3.40M
used_memory_peak_perc:58.65%
used_memory_overhead:1175592
used_memory_startup:811224
used_memory_dataset:913088
used_memory_dataset_perc:71.48%
allocator_allocated:2265536
allocator_active:2830336
allocator_resident:5816320
total_system_memory:33569505280
total_system_memory_human:31.26G
used_memory_lua:44032
used_memory_lua_human:43.00K
used_memory_scripts:2336
used_memory_scripts_human:2.28K
number_of_cached_scripts:4
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:1.25
allocator_frag_bytes:564800
allocator_rss_ratio:2.05
allocator_rss_bytes:2985984
rss_overhead_ratio:2.92
rss_overhead_bytes:11153408
mem_fragmentation_ratio:7.82
mem_fragmentation_bytes:14800960
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:348824
mem_aof_buffer:0
mem_allocator:jemalloc-5.1.0
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0

# Persistence
loading:0
current_cow_size:0
rdb_changes_since_last_save:4564
rdb_bgsave_in_progress:0
rdb_last_save_time:1616139690
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:6782976
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0
module_fork_in_progress:0
module_fork_last_cow_size:0

# Stats
total_connections_received:77
total_commands_processed:54531
instantaneous_ops_per_sec:45
total_net_input_bytes:12931147
total_net_output_bytes:1480621
instantaneous_input_kbps:8.45
instantaneous_output_kbps:2.72
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:27
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:71
evicted_keys:0
keyspace_hits:2360
keyspace_misses:12883
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:965
total_forks:5
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
tracking_total_keys:0
tracking_total_items:0
tracking_total_prefixes:0
unexpected_error_replies:0
total_error_replies:11
dump_payload_sanitizations:0
total_reads_processed:39997
total_writes_processed:39936
io_threaded_reads_processed:0
io_threaded_writes_processed:0

# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:5cdc43225260b7b962eb2d8068c1a71dc6f8fdd6
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:5.204000
used_cpu_user:5.420000
used_cpu_sys_children:0.028000
used_cpu_user_children:0.024000
used_cpu_sys_main_thread:5.184000
used_cpu_user_main_thread:5.416000

# Modules

# Errorstats
errorstat_ERR:count=11

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=151,expires=128,avg_ttl=61564701
arrrrny commented 2 years ago

I am having the same issue, I have been using redsmin almost a year and today after I killed all node aplications and restarted redsmin started to get below error: My IP is: 46.1.214.116 Redsmin KEY =624ee2fdcfcf3810486bd1fc

Screen Shot 2022-04-07 at 4 27 07 PM