opserver / Opserver

Stack Exchange's Monitoring System
https://opserver.github.io/Opserver/
MIT License
4.51k stars 827 forks source link

Redis: cannot connect #255

Closed ZedZipDev closed 6 years ago

ZedZipDev commented 7 years ago

● d-srv: 6379 (View INFO)

Data unavailable for Core

Unable to fetch from Redis: It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING @ at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log) at StackExchange.Opserver.Data.Redis.RedisInstance.GetConnection(Boolean allowAdmin, Int32 syncTimeout) in D:_Work\Opserver-overhaul\Opserver.Core\Data\Redis\RedisInstance.cs:line 136 at StackExchange.Opserver.Data.Redis.RedisInstance.get_Connection() in D:_Work\Opserver-overhaul\Opserver.Core\Data\Redis\RedisInstance.cs:line 48 at StackExchange.Opserver.Data.Redis.RedisInstance.<b__23_0>d.MoveNext() in D:_Work\Opserver-overhaul\Opserver.Core\Data\Redis\RedisInstance.Config.cs:line 17

ZedZipDev commented 7 years ago

There is at Dashboard: "● 2 Missing/Unknown Instances "

That is my config

{
    "allServers": {
        "name": "All",
        "instances": [
            {
                "name": "Core",
                "port": "6379",
                "analysisRegexes": {
                     "**Dev**": "^d-",
                     "**Live**": "^srv-",
                    }
          }
        ]
    },
"Servers":[
      {
         "name":"d-11",
         "instances":[
            {
               "name":"d-11",
               "port":"6379"
            }
         ]
      },
      {
         "name":"d-srv",
         "instances":[
            {
               "name":"d-srv",
               "port":"6379"
            }
         ]
      }
   ]    
}

What is incorrect?

ZedZipDev commented 7 years ago

I have replaced the server name with "localhost", it works. It seems it cannot recognize the hostname for the local host.

NickCraver commented 7 years ago

If you try to connect with redis-cli and the hostname, does it work? I'm not sure if this is a DNS resolution issue (which would be my first guess).

AlexSikilinda commented 7 years ago

@Oleg26Dev this may happen because SSL is disabled by default.

Try changing public bool UseSSL { get; set; } = false; to public bool UseSSL { get; set; } = true; in RedisSettings.cs.

It probably may be configured from the config file, but I didn't try that. @NickCraver may help with this.

NickCraver commented 6 years ago

Closing out to cleanup, looks like a local DNS failure and not an Opserver issue directly.