Browse Source

解决Redis服务出于安全会禁用CONFIG命令后服务不可用的问题

pull/276/head
648540858 3 years ago
parent
commit
2166ec9362
  1. 2
      src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java
  2. 2
      src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepliveTimeoutListener.java
  3. 2
      src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java
  4. 17
      src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMOnlineEventListener.java

2
src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java

@ -30,6 +30,8 @@ public class KeepaliveTimeoutListenerForPlatform extends KeyExpirationEventMessa
public KeepaliveTimeoutListenerForPlatform(RedisMessageListenerContainer listenerContainer) {
super(listenerContainer);
// 配置springboot默认Config为空,即不让应用去修改redis的默认配置,因为Redis服务出于安全会禁用CONFIG命令给远程用户使用
setKeyspaceNotificationsConfigParameter("");
}

2
src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepliveTimeoutListener.java

@ -30,6 +30,8 @@ public class KeepliveTimeoutListener extends KeyExpirationEventMessageListener {
public KeepliveTimeoutListener(RedisMessageListenerContainer listenerContainer) {
super(listenerContainer);
// 配置springboot默认Config为空,即不让应用去修改redis的默认配置,因为Redis服务出于安全会禁用CONFIG命令给远程用户使用
setKeyspaceNotificationsConfigParameter("");
}
/**

2
src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMKeepliveTimeoutListener.java

@ -29,6 +29,8 @@ public class ZLMKeepliveTimeoutListener extends KeyExpirationEventMessageListene
public ZLMKeepliveTimeoutListener(RedisMessageListenerContainer listenerContainer) {
super(listenerContainer);
// 配置springboot默认Config为空,即不让应用去修改redis的默认配置,因为Redis服务出于安全会禁用CONFIG命令给远程用户使用
setKeyspaceNotificationsConfigParameter("");
}
/**

17
src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMOnlineEventListener.java

@ -27,21 +27,6 @@ public class ZLMOnlineEventListener implements ApplicationListener<ZLMOnlineEven
private final static Logger logger = LoggerFactory.getLogger(ZLMOnlineEventListener.class);
@Autowired
private IVideoManagerStorager storager;
@Autowired
private RedisUtil redis;
@Autowired
private SipConfig sipConfig;
@Autowired
private UserSetup userSetup;
@Autowired
private IMediaServerService mediaServerService;
@Autowired
private IStreamPushService streamPushService;
@ -59,7 +44,5 @@ public class ZLMOnlineEventListener implements ApplicationListener<ZLMOnlineEven
streamPushService.zlmServerOnline(event.getMediaServerId());
streamProxyService.zlmServerOnline(event.getMediaServerId());
}
}

Loading…
Cancel
Save