Open-IM-Server is open source instant messaging Server.Backend in Go.

Open-IM-Server

avatar

LICENSE Language

Open-IM-Server: Open source Instant Messaging Server

Instant messaging server. Backend in pure Golang, wire transport protocol is JSON over websocket.

Everything is a message in Open-IM-Server, so you can extend custom messages easily, there is no need to modify the server code.

Using microservice architectures, Open-IM-Server can be deployed using clusters.

By deployment of the Open-IM-Server on the customer's server, developers can integrate instant messaging and real-time network capabilities into their own applications free of charge and quickly, and ensure the security and privacy of business data.

Features

  • Everything in Free
  • Scalable architecture
  • Easy integration
  • Good scalability
  • High performance
  • Lightweight
  • Supports multiple protocols

Community

Quick start

Installing Open-IM-Server

Open-IM relies on five open source high-performance components: ETCD, MySQL, MongoDB, Redis, and Kafka. Privatization deployment Before Open-IM-Server, please make sure that the above five components have been installed. If your server does not have the above components, you must first install Missing components. If you have the above components, it is recommended to use them directly. If not, it is recommended to use Docker-compose, no To install dependencies, one-click deployment, faster and more convenient.

Source code deployment

  1. Install Go environment. Make sure Go version is at least 1.15.

  2. Clone the Open-IM project to your server.

    git clone https://github.com/OpenIMSDK/Open-IM-Server.git
    
  3. Build and start Service.

    1. Shell authorization

      #cd Open-IM-server/script
      
      chmod +x *.sh
      
    2. Execute the build shell

      ./build_all_service.sh
      
    3. Start service

      ./start_all.sh
      
    4. Check service

      ./check_all.sh
      

      OpenIMServersonSystempng

Docker deployment

All images are available at https://hub.docker.com/r/lyt1123/open_im_server

  1. Install Docker 1.13 or above.

  2. Install Docker Compose 1.22 or above.

  3. Clone the Open-IM project to your server.

    git clone https://github.com/OpenIMSDK/Open-IM-Server.git
    
  4. Start docker-compose with one click(Docker automatically pulls all images)

    docker-compose up -d
    
  5. Check service

    ./docker_check_service.sh 
    

    OpenIMServersondockerpng

CONFIGURATION INSTRUCTIONS

Open-IM configuration is divided into basic component configuration and business internal service configuration. Developers need to fill in the address of each component as the address of their server component when using the product, and ensure that the internal service port of the business is not occupied

Basic Component Configuration Instructions

  • ETCD
    • Etcd is used for the discovery and registration of rpc services, etcd Schema is the prefix of the registered name, it is recommended to modify it to your company name, etcd address (ip+port) supports clustered deployment, you can fill in multiple ETCD addresses separated by commas, and also only one etcd address.
  • MySQL
    • mysql is used for full storage of messages and user relationships. Cluster deployment is not supported for the time being. Modify addresses and users, passwords, and database names.
  • Mongo
    • Mongo is used for offline storage of messages. The default storage is 7 days. Cluster deployment is temporarily not supported. Just modify the address and database name.
  • Redis
    • Redis is currently mainly used for message serial number storage and user token information storage. Cluster deployment is temporarily not supported. Just modify the corresponding redis address and password.
  • Kafka
    • Kafka is used as a message transfer storage queue to support cluster deployment, just modify the corresponding address

Internal Service Configuration Instructions

  • credential&&push
    • The Open-IM needs to use the three-party offline push function. Currently, Tencent's three-party push is used. It supports IOS, Android and OSX push. This information is some registration information pushed by Tencent. Developers need to go to Tencent Cloud Mobile Push to register the corresponding information. If you do not fill in the corresponding information, you cannot use the offline message push function
  • api&&rpcport&&longconnsvr&&rpcregistername
    • The api port is the http interface, longconnsvr is the websocket listening port, and rpcport is the internal service startup port. Both support cluster deployment. Make sure that these ports are not used. If you want to open multiple services for a single service, fill in multiple ports separated by commas. rpcregistername is the service name registered by each service to the registry etcd, no need to modify
  • log&&modulename
    • The log configuration includes the storage path of the log file, and the log is sent to elasticsearch for log viewing. Currently, the log is not supported to be sent to elasticsearch. The configuration does not need to be modified for the time being. The modulename is used to split the log according to the name of the service module. The default configuration is fine.
  • multiloginpolicy&&tokenpolicy
    • Open-IM supports multi-terminal login. Currently, there are three multi-terminal login policies. The PC terminal and the mobile terminal are online at the same time by default. When multiple policies are configured to be true, the first policy with true is used by default, and the token policy is the generated token policy. , The developer can customize the expiration time of the token

SCRIPT DESCRIPTION

Open-IM script provides service compilation, start, and stop scripts. There are four Open-IM script start modules, one is the http+rpc service start module, the second is the websocket service start module, then the msg_transfer module, and the last is the push module

  • path_info.cfg&&style_info.cfg&&functions.sh
    • Contains the path information of each module, including the path where the source code is located, the name of the service startup, the shell print font style, and some functions for processing shell strings
  • build_all_service.sh
    • Compile the module, compile all the source code of Open-IM into a binary file and put it into the bin directory
  • start_rpc_api_service.sh&&msg_gateway_start.sh&&msg_transfer_start.sh&&push_start.sh
    • Independent script startup module, followed by api and rpc modules, message gateway module, message transfer module, and push module
  • start_all.sh&&stop_all.sh
    • Total script, start all services and close all services

Authentication Clow Chart

avatar

Architecture

avatar

License

Open-IM-Server is under the Apache 2.0 license. See the LICENSE file for details.

Comments
  • 服务端部署时启动sdk_server失败

    服务端部署时启动sdk_server失败

    If you are deploying OpenIM for the first time sdk_server的启动脚本sdk_svr_start.sh中,包含了两条无法识别的参数,会导致服务端程序启动失败。分别是: -openIM_ws_address 截图如下: image 和-openIM_api_address, image

    同时配置文件中的日志级别后面需加一个空格,否则读取日志级别时也会报错。 截图如下: image

  • 克隆代码失败

    克隆代码失败

    If you are deploying OpenIM for the first time

    尝试按照教程流程克隆代码,但clone指令报错。

    使用的clone指令为:

    git clone https://github.com/OpenIMSDK/Open-IM-Server.git --recursive
    

    报错信息为:

    获取了子模组路径 'cmd/Open-IM-SDK-Core',但是它没有包含 3cf486771bbe7ecb33f7e7c3cdf733f28b16d8b7。直接获取该提交失败。
    

    截图如下: image

  • [BUG] config.yaml自定义数据库账号密码报错(已反馈BUG一个月了)

    [BUG] config.yaml自定义数据库账号密码报错(已反馈BUG一个月了)

    Environment:

    Contos 8

    Physical Memory Capacity:

    8G

    Docker Image:

    最新镜像

    Code Version:

    最新版本

    Component installation:

    相关组件都有安装且正常

    Log File:

    goroutine 1 [running]: Open_IM/pkg/common/db.initMysqlDB() /Open-IM-Server/pkg/common/db/mysql.go:34 +0x156e Open_IM/pkg/common/db.init.0() /Open-IM-Server/pkg/common/db/model.go:43 +0x2e 0 Open failed Error 1045: Access denied for user 'root'@'xxxxxx' (using password: YES) root:xxxxxx@tcp(127.0.0.1:13306)/mysql?charset=utf8mb4&parseTime=true&loc=Local panic: Error 1045: Access denied for user 'root'@'172.21.0.1' (using password: YES)

    该问题在微信群反馈了N次,群管理还说新版本改好了,结果也没改!!!现在这问题都一个月了,每个礼拜都在群里艾特你们官方的人员问情况,结果都是回复一两句,人就消失了,对问题跟进这方面做的太差了,如果这样,要微信群何在?在群里反馈不跟,在github之前也反馈问题,也没跟?对此很失望。

  • Connection refused issue on mac (using docker deployment)

    Connection refused issue on mac (using docker deployment)

    Following is the log :

    ==========================================================
    ==========================================================
    ==========================================================
    ==========server start time:2022-07-13 03:07:49===========
    ==========================================================
    ==========================================================
    ==========================================================
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start api server, address:  0.0.0.0:10002
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start cms api server, address:  0.0.0.0:10006
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start user rpc server, port:  10110
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start friend rpc server, port:  10120
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start group rpc server, port:  10150
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start auth rpc server, port:  10160
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start cms rpc server, port:  10200
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start msg cms rpc server, port:  10190
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start statistics rpc server, port:  10180
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start msg rpc server, port:  10130
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start office rpc server, port:  10210
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start organization rpc server, port:  10220
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start conversation rpc server, port:  10230
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start auth rpc server, port:  10240
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start rpc/msg_gateway server, port:  10140 10001
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start push rpc server, port:  10170
    init address is  [127.0.0.1:9092] topics is  [ms2ps_chat]
    /Open-IM-Server 
    /Open-IM-Server 
    /Open-IM-Server 
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    init address is  [127.0.0.1:9092] topics is  [ws2ms_chat]
    init address is  [127.0.0.1:9092] topics is  [ws2ms_chat]
    init address is  [127.0.0.1:9092] topics is  [msg_to_mongo]
    start msg_transfer server
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    init address is  [127.0.0.1:9092] topics is  [ws2ms_chat]
    init address is  [127.0.0.1:9092] topics is  [ws2ms_chat]
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    init address is  [127.0.0.1:9092] topics is  [msg_to_mongo]
    create index success
    start msg_transfer server
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    init address is  [127.0.0.1:9092] topics is  [ws2ms_chat]
    create index success
    init address is  [127.0.0.1:9092] topics is  [ws2ms_chat]
    init address is  [127.0.0.1:9092] topics is  [msg_to_mongo]
    init address is  [127.0.0.1:9092] topics is  [ws2ms_chat]
    init address is  [127.0.0.1:9092] topics is  [ws2ms_chat]
    start msg_transfer server
    init address is  [127.0.0.1:9092] topics is  [msg_to_mongo]
    ws server is starting
    start msg_transfer server
    /Open-IM-Server 
    open db ok  root:openIM@tcp(127.0.0.1:13306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
    0 0 mongo driver client init success:  mongodb://127.0.0.1:37017/openIM/?maxPoolSize=100
    create index success
    start demo api server, port:  10004
    start demo api server address:  0.0.0.0:10004
    

    Also each container is successfully started, but when I try to access (localhost:10002 || 0.0.0.0:10002) getting connection refused in browser

    Docker version:20.10.14

  • 希望opemim增加类似rpc的即时回调通知第三方系统,完成特殊业务需求

    希望opemim增加类似rpc的即时回调通知第三方系统,完成特殊业务需求

    需求: 通过rpc或wss等协议任意监听openim里的数据接收和发送,并支持双向通信,既可以监听来自openim里的任意事件或接口,也能触发相关事件或接口。 理由 1.熟悉并修改openim风险更大 需要一定的精力熟悉,并承担未知的风险 2.二开后将可能会无法随时更新openim,并伴随未知风险 3.由于openim很稳定,我们借助openim的稳定性,将特殊需求在我们其他系统框架中去实现,这样就可以降低以上说明的风险和避免部分问题,灵活性将大大提高 参考 可能我说的不是很清楚 但是有一个项目是 某Q协议项目 他们的实现应该是比较理想的效果,也能更好的完整表达我的想法 这是一个https://github.com/Mrs4s/go-cqhttp 服务框架 可以二开也可以开启wss github.com/wdvxdr1123/ZeroBot 这个就是基于上述的服务框架通过socket实现的二开,一种解耦的方式实现特殊的需求,希望项目组能考虑一下这种方式

  • [BUG] 启动时报错,默认配置不对?

    [BUG] 启动时报错,默认配置不对?

    =========================================================

    ==========server start time:2022-11-07 05:33:08===========

    ==========================================================

    ========================================================== GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365 sdk server init args is : apiAddress: http://127.0.0.1:10002 wsAddress: ws://127.0.0.1:10001 10003 6 2022-11-07 05:33:31.392 [INFO] [PID:482] [FilePath:ws_init_login.go:180] [OperationID:] [InitServer {"platform":5,"api_addr":"http://127.0.0.1:10002","ws_addr":"ws://127.0.0.1:10001","data_dir":"../db/sdk/","log_level":0,"object_storage":"","encryption_key":""}] ws server is starting GET IM DEFAULT CONFIG PATH : /Open-IM-Server ENV PATH: panic: yaml: unmarshal errors: line 31: cannot unmarshal !!seq into string

    goroutine 1 [running]: Open_IM/pkg/common/config.init.0() /Open-IM-Server/pkg/common/config/config.go:568 +0x365

    Environment:

    Physical Memory Capacity:

    Docker Image:

    Code Version:

    Component installation:

    Log File:

    screenshot:

  • MsgToUser 是否存在内网流量放大

    MsgToUser 是否存在内网流量放大

    每条用户消息, push 服到 gate 服,都是 push 服发送所有 gate 服,是否性能有问题,存在内网流量放大的情况

    func MsgToUser(pushMsg *pbPush.PushMsgReq) {
    	var wsResult []*pbRelay.SingleMsgToUser
    	isOfflinePush := utils.GetSwitchFromOptions(pushMsg.MsgData.Options, constant.IsOfflinePush)
    	log.Debug("Get msg from msg_transfer And push msg", pushMsg.OperationID, "PushData", pushMsg.String())
    	grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName)
    	//Online push message
    	log.Debug("test", pushMsg.OperationID, "len  grpc", len(grpcCons), "data", pushMsg.String())
    	for _, v := range grpcCons {
    		msgClient := pbRelay.NewOnlineMessageRelayServiceClient(v)
    		reply, err := msgClient.OnlinePushMsg(context.Background(), &pbRelay.OnlinePushMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserID: pushMsg.PushToUserID})
    		if err != nil {
    			log.InfoByKv("push data to client rpc err", pushMsg.OperationID, "err", err)
    			continue
    		}
    		if reply != nil && reply.Resp != nil {
    			wsResult = append(wsResult, reply.Resp...)
    		}
    	}
    	...
    }
    
  • Nginx wss 反代问题

    Nginx wss 反代问题

    Nginx配置:

    server {
            listen 3000 ssl http2 default_server;
            listen [::]:3000 ssl http2 default_server;
            server_name _;
    
            ssl_certificate /opt/case/1.pem;
            ssl_certificate_key /opt/case/1.key;
    
            location / {
                    proxy_pass http://127.0.0.1:30000;
                    proxy_set_header Host $host;
                    proxy_http_version 1.1;
                    proxy_set_header Upgrade $http_upgrade;
                    proxy_set_header Connection "upgrade";
                    proxy_buffering off;
            }
        }
    

    Nginx报错信息如下:

    [error] 11603#11603: *1 connect() failed (111: Connection refused) while connecting to upstream, client: *****, server: _, request: "GET /?sendID=xx&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVSUQiOiJxaWFveWl5YW5nIiwiUGxhdGZvcm0iOiJXZWIiLCJleHAiOjE2NDM4MDU5MzcsIm5iZiI6MTY0MzIwMTEzNywiaWF0IjoxNjQzMjAxMTM3fQ.T-3wo-Xg-uro3ApN2whnZ2J5mwpS9aCNfEZwDyskByU&platformID=5 HTTP/1.1", upstream: "http://127.0.0.1:30000/?sendID=xx&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVSUQiOiJxaWFveWl5YW5nIiwiUGxhdGZvcm0iOiJXZWIiLCJleHAiOjE2NDM4MDU5MzcsIm5iZiI6MTY0MzIwMTEzNywiaWF0IjoxNjQzMjAxMTM3fQ.T-3wo-Xg-uro3ApN2whnZ2J5mwpS9aCNfEZwDyskByU&platformID=5", host: "_:3000"
    

    Websocket报错信息如下:

    <html>
    <body>
    <!--StartFragment-->
    
    Error during WebSocket handshake: Unexpected response code: 502
    --
    
    
    <br class="Apple-interchange-newline"><!--EndFragment-->
    </body>
    </html>
    
  • Ubuntu16.04 docker 安装启动失败

    Ubuntu16.04 docker 安装启动失败

    etcd is up-to-date zookeeper is up-to-date redis is up-to-date mongo is up-to-date mysql is up-to-date kafka is up-to-date Starting open_im_server ... error

    ERROR: for open_im_server Cannot start service open_im_server: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "./docker_start_all.sh": permission denied": unknown

    ERROR: for open_im_server Cannot start service open_im_server: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "./docker_start_all.sh": permission denied": unknown ERROR: Encountered errors while bringing up the project.

  • [建议/想法]希望能开一个子项目.

    [建议/想法]希望能开一个子项目.

    这个项目很好,特别是针对社交类,通讯类.基本上这也算是现在大部分app的"标配"功能了. 只是针对一些工具类,或小项目时,还是有点"体积过大". 我是一个独立开发者,会开发一些工具类或非社交类的app.但这些app也会有"实时通知"功能.不是ios那种远程push,就是在线用户的实时通讯. 比如: 我开发一个app,刚上线时是不会加IM这种通讯的,但会有一些"实时通知"的需要,像实时封禁,某一延时(异步)的实时提示,或实时下发一些配置等等.这些不需要用户与用户之间通讯,更多的是服务端对现在"正在线"的用户发送一些"自定议消息". 其实需要的功能很简单,用打开或注册后能加入至少一个"群(订阅)",当有需要时,服务器端可以对某一个用户或某一个"群(订单)"发送一个自定义消息就行了.在线的收到,不在线的不用发送,app端或服务端都不用保存数据,只是在线发送出去就行了.

    这个需求在app开发上比IM使用要更广泛.现在也没有类似像样的开源产品,大部分好像都是自己用websocket实现.但对小团队或独立开发来说,websocket的开发或优化也是大麻烦.

    这样的产品,不管是任何类型的app或web都有需求,如果以后还能再平滑迁移到openim更好,不能平滑迁移也无所谓.但如果只为了这个"实时通知"直接把openim加到项目里,又会特别"臃肿",维护成本也高不少.所以标题才说如果能有一个基于openim的子项目去实现更好一些.

    以上只是我个人开发app过程中遇到的需求,算是给官方提供一种思路吧.

  • [BUG] k8s部署后,登陆失败

    [BUG] k8s部署后,登陆失败

    k8s部署后,使用Open-IM-PC-Web-Demo测试链接,在注册完成后,无法登陆,提示 {"errCode":10005,"errMsg":"Post "http://:10002/auth/user_token": dial tcp :10002: connect: connection refused"} config.yaml版本: 2.3.1

  • 部署成功后,测试官网的demo 发现10008 端口 属于商业版,官网的demo只能用商业版才能测试成功吗

    部署成功后,测试官网的demo 发现10008 端口 属于商业版,官网的demo只能用商业版才能测试成功吗

    问题具体说明

    服务端部署成功后按照官方的demo更改ip进行测试发现10008端口数据商业版目前开源的服务端部署成功后并有10008端口,是否意味着官网的demo的只有商业版才能测试成功。
    在废弃的文档中发现历史的demo是没有10008端口的,但是废弃文档中的demo的仓库地址已经无法访问
    现在openIm 是否依旧处于开源状态,还是已经开始闭源了?
    

    测试版本

    V.2.33
    

    测试demo截图

    image

    文档端口说明截图

    image

    废弃的demo截图

    image

  • 日志的路径(storageLocation)修改后不生效

    日志的路径(storageLocation)修改后不生效

    1. 先用默认的配置文件部署了,然后docker-compose down ; rm components -rf
    2. 修改配置如下: image

    image

    1. 然后再次install,components的安装目录是在了data下,但是logs的还是在默认的位置 image 4.所有的服务都是能启动成功,就是日志的路径没有修改成功。 image
  • [BUG] Mongodb数据过期时间策略无效

    [BUG] Mongodb数据过期时间策略无效

    在config.yaml中dbRetainChatRecords配置项代表Mongodb的数据保存时间 但是在star_all.sh中将start_cron.sh给注释掉了,且在创建Mongodb索引时也没有使用Mongodb的ttl策略,那么在config.yaml中dbRetainChatRecords配置项其实根本没有生效,Mongodb里面的数据一直持久保存。 我使用的是v2.3.3版本的代码

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots
Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots

Tinode Instant Messaging Server Instant messaging server. Backend in pure Go (license GPL 3.0), client-side binding in Java, Javascript, and Swift, as

Jan 6, 2023
Scalable real-time messaging server in language-agnostic way
Scalable real-time messaging server in language-agnostic way

Centrifugo is a scalable real-time messaging server in language-agnostic way. Centrifugo works in conjunction with application backend written in any

Jan 1, 2023
Berty is a secure peer-to-peer messaging app that works with or without internet access, cellular data or trust in the network
Berty is a secure peer-to-peer messaging app that works with or without internet access, cellular data or trust in the network

?? Berty is a secure peer-to-peer messaging app that works with or without internet access, cellular data or trust in the network Introduction Berty i

Dec 29, 2022
Self hosted live chat server written in Go

goch is a self-hosted live-chat server written in Go. It allows you to run a live-chat software on your own infrastructure. You can create multip

Dec 11, 2022
A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)
A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)

A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)

Jan 9, 2023
Simple TCP-based chat server

hub-server Simple TCP-based chat server. Client can be found: https://github.com/alankritjoshi/hub-client Setup go run server.go 1234 How it works Use

Oct 25, 2021
Open-IM-Server is open source instant messaging Server.Backend in Go.
Open-IM-Server is open source instant messaging Server.Backend in Go.

Open-IM-Server is open source instant messaging Server.Backend in Go.

Dec 31, 2022
Instant messaging server for the Extensible Messaging and Presence Protocol (XMPP).
Instant messaging server for the Extensible Messaging and Presence Protocol (XMPP).

Instant messaging server for the Extensible Messaging and Presence Protocol (XMPP).

Dec 31, 2022
Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots
Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots

Tinode Instant Messaging Server Instant messaging server. Backend in pure Go (license GPL 3.0), client-side binding in Java, Javascript, and Swift, as

Jan 6, 2023
Instant messaging platform. Backend in Go and Client in Flutter

Seemer Messaging Server Instant messaging server. Backend in pure Go (license GPL 3.0), client-side binding in Flutter as well as gRPC client support

Nov 28, 2022
纯Go编写的IM,完全自定义协议的高性能即时通讯服务(High-performance instant messaging service with fully customizable protocol)
纯Go编写的IM,完全自定义协议的高性能即时通讯服务(High-performance instant messaging service with fully customizable protocol)

LiMaoIM (Everything so easy) This project is a simple and easy to use, powerful performance, simple design concept instant messaging service, fully cu

Dec 5, 2022
Simple-messaging - Brokerless messaging. Pub/Sub. Producer/Consumer. Pure Go. No C.

Simple Messaging Simple messaging for pub/sub and producer/consumer. Pure Go! Usage Request-Response Producer: consumerAddr, err := net.ResolveTCPAddr

Jan 20, 2022
Msg is gRPC-based backend for messaging written in golang.

Msg Msg is gRPC-based backend for messaging written in golang. Goals Future goals: Implement message service which will allow users to send messages t

Jun 8, 2022
SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool
SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥.   👉  Open source Application Performance Monitoring (APM) & Observability tool

Monitor your applications and troubleshoot problems in your deployed applications, an open-source alternative to DataDog, New Relic, etc. Documentatio

Sep 24, 2021
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers

Developer-oriented Continuous Delivery Product ⁣ English | 简体中文 Table of Contents Zadig Table of Contents What is Zadig Quick start How to use? How to

Oct 19, 2021
Instant, disposable, single-binary web based live chat server. Go + VueJS.
Instant, disposable, single-binary web based live chat server. Go + VueJS.

Niltalk Niltalk is a web based disposable chat server. It allows users to create password protected disposable, ephemeral chatrooms and invite peers t

Jan 4, 2023
The Zuri Core is an open-source API that serves as the backend and backbone of Zuri Chat
The Zuri Core is an open-source API that serves as the backend and backbone of Zuri Chat

The Zuri Core is an open-source API that serves as the backend and backbone of Zuri Chat

Dec 26, 2022
pREST (PostgreSQL REST), simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new

pREST pREST (PostgreSQL REST), simplify and accelerate development, instant, realtime, high-performance on any Postgres application, existing or new P

Jan 9, 2023
Instant Kubernetes-Native Application Observability
Instant Kubernetes-Native Application Observability

What is Pixie? Pixie gives you instant visibility by giving access to metrics, events, traces and logs without changing code. We're building up Pixie

Jan 4, 2023
:rocket: Instant live visualization of your Go application runtime statistics (GC, MemStats, etc.) in the browser
:rocket: Instant live visualization of your Go application runtime statistics (GC, MemStats, etc.) in the browser

Statsviz Instant live visualization of your Go application runtime statistics (GC, MemStats, etc.). Import "github.com/arl/statsviz" Register statsviz

Jan 3, 2023