ASP.net 应用程序连接 REDIS SocketFailure on Ping
ASP.net app connection REDIS SocketFailure on Ping
我刚刚在我的一台开发服务器上安装了 REDIS 服务器。我正在尝试将我的本地主机应用程序连接到这个外部服务器。我正在使用 StackExchange.REDIS api 连接到位于我的内部开发服务器 10.26.130.170 的这个 REDIS 服务器。我安装了所有默认的 REDIS 软件,到目前为止没有进行任何自定义。
这是我项目中的连接 class ::
public sealed class RedisSingleton
{
private static Lazy<ConfigurationOptions> configOptions = new Lazy<ConfigurationOptions>(() =>
{
var configOptions = new ConfigurationOptions();
configOptions.EndPoints.Add("10.26.130.170:6379");
configOptions.ClientName = "MyAppRedisConn";
configOptions.ConnectTimeout = 100000;
configOptions.SyncTimeout = 100000;
configOptions.AbortOnConnectFail = true;
return configOptions;
});
private static Lazy<ConnectionMultiplexer> LazyRedisconn = new Lazy<ConnectionMultiplexer>(
() => ConnectionMultiplexer.Connect(configOptions.Value));
public static ConnectionMultiplexer ActiveRedisInstance
{
get
{
return LazyRedisconn.Value;
}
}
}
请多多指教。有没有一种方法可以快速检查我的本地主机并使用 ping 或其他命令验证端口 6379 到 REDIS 服务器的连接。
redis远程服务器6379端口没有打开。我在 windows PortQueryUI 工具的帮助下找到了它。
我通过在远程服务器上打开端口找到了解决方案。
我刚刚在我的一台开发服务器上安装了 REDIS 服务器。我正在尝试将我的本地主机应用程序连接到这个外部服务器。我正在使用 StackExchange.REDIS api 连接到位于我的内部开发服务器 10.26.130.170 的这个 REDIS 服务器。我安装了所有默认的 REDIS 软件,到目前为止没有进行任何自定义。
这是我项目中的连接 class ::
public sealed class RedisSingleton
{
private static Lazy<ConfigurationOptions> configOptions = new Lazy<ConfigurationOptions>(() =>
{
var configOptions = new ConfigurationOptions();
configOptions.EndPoints.Add("10.26.130.170:6379");
configOptions.ClientName = "MyAppRedisConn";
configOptions.ConnectTimeout = 100000;
configOptions.SyncTimeout = 100000;
configOptions.AbortOnConnectFail = true;
return configOptions;
});
private static Lazy<ConnectionMultiplexer> LazyRedisconn = new Lazy<ConnectionMultiplexer>(
() => ConnectionMultiplexer.Connect(configOptions.Value));
public static ConnectionMultiplexer ActiveRedisInstance
{
get
{
return LazyRedisconn.Value;
}
}
}
请多多指教。有没有一种方法可以快速检查我的本地主机并使用 ping 或其他命令验证端口 6379 到 REDIS 服务器的连接。
redis远程服务器6379端口没有打开。我在 windows PortQueryUI 工具的帮助下找到了它。
我通过在远程服务器上打开端口找到了解决方案。