2881099 / FreeIM

.NETCore websocket 实现简易、高性能、集群即时通讯组件,支持点对点通讯、群聊通讯、上线下线事件消息等众多实用性功能.
MIT License
1.42k stars 418 forks source link

关于部署后imserver后有加入提醒,没有消息 #24

Open taohaiyu opened 3 years ago

taohaiyu commented 3 years ago

配置imserver,我用的是域名,一个二级域名,比如:我发布imserver,配置的域名是server.xxx.com:6001,web的域名是im.xxx.com,然后就没有消息响应是怎么回事呢?

2881099 commented 3 years ago

wss https?具体有什么反应,没收到消息也可能是 servers 配置不正确,比如和 dotnet xxx.dll —urls=server配置的值

taohaiyu commented 3 years ago

"ImServerOption": { "CSRedisClient": "dev.xxx.cn,allowAdmin=true,password=xxxcom,idleTimeout=3000,poolsize=10,defaultdatabase=3", "Servers": "imserver.xxx.cn:6001", "Server": "imserver.xxx.cn:6001" }

ImHelper.Initialization(new ImClientOptions
        {
            Redis = new CSRedis.CSRedisClient("dev.xxx.cn,allowAdmin=true,password=xxxxx,idleTimeout=3000,poolsize=10,defaultdatabase=3"),
            Servers = new[] { "imserver.xxx.cn:6001" }
        });

这配置可以?

taohaiyu commented 3 years ago

这是线上的,一直没消息响应

2881099 commented 3 years ago

redis 配置都一样吗

idleTimeout=3000 太小,这个是毫秒单位

—urls 呢,怎么配置的,跟 servers 一样?

2881099 commented 3 years ago

跟开发环境对照好好梳理一下

2881099 commented 3 years ago

浏览器有跨域问题,二级域名没问题