open-im-server icon indicating copy to clipboard operation
open-im-server copied to clipboard

Bug: Admin frontend resources unable to access

Open hywan9 opened this issue 1 year ago • 4 comments

What happened?

After I deployed open-im-server and chat , admin fronted page counld not opened. It is not started on my machine.

What did you expect to happen?

http://ip:11002 can be accessed normally

How can we reproduce it (as minimally and precisely as possible)?

https://docs.openim.io/guides/gettingStarted/mac-deployment-guide

Anything else we need to know?

PC Web frontend resources is normal, and "make check" output "Check all openim service ports successfully"

version

```console $ {name} version # paste output here ```

Cloud provider

OS version

Model Name: MacBook Air Model Identifier: Mac14,2 Chip: Apple M2 Total Number of Cores: 8 (4 performance and 4 efficiency) Memory: 16 GB

Darwin MacBook-Air.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:59:33 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8112 arm64

Install tools

hywan9 avatar Jan 25 '24 10:01 hywan9

Did you deploy using Docker, or did you use the source code directly?

skiffer-git avatar Jan 26 '24 01:01 skiffer-git

Did you deploy using Docker, or did you use the source code directly?

I use the source code .

hywan9 avatar Jan 26 '24 01:01 hywan9

I noticed from your issue description that you are using a Mac for deploying OpenIM. In order to assist you more effectively, I have a few questions and would appreciate if you could provide some additional information. This will help us understand the root cause of the problem and guide you towards a solution.

Could you please run the following commands in your terminal and share the outputs with us? These commands will give us a clearer picture of your current Docker environment and the status of the OpenIM services:

  1. docker ps - To list the running Docker containers.
  2. docker images - To show the Docker images currently available on your machine.
  3. docker compose logs openim-server - To retrieve logs from the OpenIM server container.
  4. docker compose logs openim-chat - To obtain logs from the OpenIM chat container.

Additionally, if you could provide your config/config.yaml file, it would be immensely helpful. This file contains important configuration settings, and reviewing it might reveal potential misconfigurations or other issues relevant to the deployment problem.

Please ensure that any sensitive information is redacted before sharing your configuration file or logs.

Thank you for your cooperation and patience. We are committed to resolving your issue and look forward to your response.

@keelewang

cubxxw avatar Jan 26 '24 02:01 cubxxw

Thank you for your help. This is my output:

➜ docker ps
CONTAINER ID   IMAGE                                        COMMAND                  CREATED         STATUS         PORTS                                                   NAMES
f9f302b628b9   mongo:6.0.2                                  "docker-entrypoint.s…"   3 minutes ago   Up 3 minutes   0.0.0.0:37017->27017/tcp                                mongo
aa6e0d833a7b   bitnami/zookeeper:3.8                        "/opt/bitnami/script…"   3 minutes ago   Up 3 minutes   2888/tcp, 3888/tcp, 8080/tcp, 0.0.0.0:12181->2181/tcp   zookeeper
be53ec2a1e6f   minio/minio:RELEASE.2024-01-11T07-46-16Z     "/usr/bin/docker-ent…"   3 minutes ago   Up 3 minutes   0.0.0.0:9090->9090/tcp, 0.0.0.0:10005->9000/tcp         minio
7ca86a967bbc   redis:7.0.0                                  "docker-entrypoint.s…"   3 minutes ago   Up 3 minutes   0.0.0.0:16379->6379/tcp                                 redis
358268115f81   ghcr.io/openimsdk/openim-web:v3.5.0-docker   "/docker-entrypoint.…"   3 minutes ago   Up 3 minutes   0.0.0.0:11001->80/tcp                                   openim-web
58e1318d88a6   bitnami/kafka:3.5.1                          "/opt/bitnami/script…"   3 minutes ago   Up 3 minutes   9092/tcp, 0.0.0.0:19094->9094/tcp                       kafka
00b8be8112f2   mariadb:10.6                                 "docker-entrypoint.s…"   22 hours ago    Up 3 minutes   0.0.0.0:13306->3306/tcp, 0.0.0.0:23306->33060/tcp       mysql

➜ docker images
REPOSITORY                                               TAG                            IMAGE ID       CREATED         SIZE
bitnami/zookeeper                                        3.8                            1ed1452d06b2   5 days ago      499MB
ghcr.io/openimsdk/openim-web                             v3.5.0-docker                  5832eaadfde7   13 days ago     222MB
registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web   v3.5.0-docker                  5832eaadfde7   13 days ago     222MB
minio/minio                                              RELEASE.2024-01-11T07-46-16Z   4c9840e16078   2 weeks ago     147MB
bitnami/kafka                                            3.5.1                          4fffda4a8101   7 weeks ago     517MB
mariadb                                                  10.6                           2a2baa9f15bf   2 months ago    381MB
mongo                                                    6.0.2                          1a5c8f74cf95   15 months ago   667MB
redis                                                    7.0.0                          07dcd1b2e705   20 months ago   111MB

➜ docker compose logs openim-server
no such service: openim-server

➜ docker compose logs openim-chat
no such service: openim-chat

This is my config/config.yaml

envs:
  discovery: zookeeper

zookeeper:
  schema: openim
  address: [ 127.0.0.1:12181 ]
  username: ''
  password: ''

mongo:
  uri: ''
  address: [ 127.0.0.1:37017 ]
  database: openIM_v3
  username: openIM
  password: openIM123
  maxPoolSize: 100

redis:
  address: [ 127.0.0.1:16379 ]
  username: ''
  password: openIM123

kafka:
  username: ''
  password: ''
  addr: [ 127.0.0.1:19094 ]
  latestMsgToRedis:
    topic: "latestMsgToRedis"
  offlineMsgToMongo:
    topic: "offlineMsgToMongoMysql"
  msgToPush:
    topic: "msgToPush"
  consumerGroupID:
    msgToRedis: redis
    msgToMongo: mongo
    msgToMySql: mysql
    msgToPush: push

rpc:
  registerIP: ''
  listenIP: 0.0.0.0

api:
  openImApiPort: [ 10002 ]
  listenIP: 0.0.0.0


object:
  enable: "minio"
  apiURL: "http://192.168.31.182:10002"
  minio:
    bucket: "openim"
    endpoint: "http://127.0.0.1:10005"
    accessKeyID: "root"
    secretAccessKey: "openIM123"
    sessionToken: ''
    signEndpoint: "http://192.168.31.182:10005"
    publicRead: false
  cos:
    bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com
    secretID: ''
    secretKey: ''
    sessionToken: ''
    publicRead: false
  oss:
    endpoint: "https://oss-cn-chengdu.aliyuncs.com"
    bucket: "demo-9999999"
    bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com"
    accessKeyID: ''
    accessKeySecret: ''
    sessionToken: ''
    publicRead: false
  kodo:
    endpoint: "http://s3.cn-east-1.qiniucs.com"
    bucket: "demo-9999999"
    bucketURL: "http://your.domain.com"
    accessKeyID: ''
    accessKeySecret: ''
    sessionToken: ''
    publicRead: false

###################### RPC Port Configuration ######################
# RPC service ports
# These ports are passed into the program by the script and are not recommended to modify
# For launching multiple programs, just fill in multiple ports separated by commas
# For example, [10110, 10111]
rpcPort:
  openImUserPort: [ 10110 ]
  openImFriendPort: [ 10120 ]
  openImMessagePort: [ 10130 ]
  openImGroupPort: [ 10150 ]
  openImAuthPort: [ 10160 ]
  openImPushPort: [ 10170 ]
  openImConversationPort: [ 10180 ]
  openImThirdPort: [ 10190 ]

###################### RPC Register Name Configuration ######################
# RPC service names for registration, it's not recommended to modify these
rpcRegisterName:
  openImUserName: User
  openImFriendName: Friend
  openImMsgName: Msg
  openImPushName: Push
  openImMessageGatewayName: MessageGateway
  openImGroupName: Group
  openImAuthName: Auth
  openImConversationName: Conversation
  openImThirdName: Third

###################### Log Configuration ######################
# Log configuration
#
# Storage directory
# Log rotation time
# Maximum number of logs to retain
# Log level, 6 means all levels
# Whether to output to stdout
# Whether to output in json format
# Whether to include stack trace in logs
log:
  storageLocation: /Users/kele/open-im-server/logs/
  rotationTime: 24
  remainRotationCount: 2
  remainLogLevel: 6
  isStdout: false
  isJson: false
  withStack: false

###################### Variables definition ######################
# Long connection server configuration
#
# Websocket port for msg_gateway
# Maximum number of websocket connections
# Maximum length of websocket request package
# Websocket connection handshake timeout
longConnSvr:
  openImWsPort: [ 10001 ]
  websocketMaxConnNum: 100000
  openImMessageGatewayPort: [ 10140 ]
  websocketMaxMsgLen: 4096
  websocketTimeout: 10

# Push notification service configuration
#
# Use GeTui for push notifications
# GeTui offline push configuration
# FCM offline push configuration
# Account file, place it in the config directory
# JPush configuration, modify these after applying in JPush backend
push:
  enable: getui
  geTui:
    pushUrl: "https://restapi.getui.com/v2/$appId"
    masterSecret: ''
    appKey: ''
    intent: ''
    channelID: ''
    channelName: ''
  fcm:
    serviceAccount: "x.json"
  jpns:
    appKey: ''
    masterSecret: ''
    pushUrl: ''
    pushIntent: ''

# App manager configuration
#
# Built-in app manager user IDs
# Built-in app manager nicknames
manager:
  userID: [ "openIM123456", "openIM654321", "openIMAdmin" ]
  nickname: [ "system1", "system2", "system3" ]

# chatAdmin, use for send notification
#
# Built-in app system notification account ID
# Built-in app system notification account nickname
im-admin:
  userID: [ "imAdmin" ]
  nickname: [ "imAdmin" ]

# Multi-platform login policy
# For each platform(Android, iOS, Windows, Mac, web), only one can be online at a time
multiLoginPolicy: 1

# Whether to store messages in MySQL, messages in MySQL are only used for management background
chatPersistenceMysql: true

# Message cache timeout in seconds, it's not recommended to modify
msgCacheTimeout: 86400

# Whether to enable read receipts for group chat
groupMessageHasReadReceiptEnable: true

# Whether to enable read receipts for single chat
singleMessageHasReadReceiptEnable: true

# MongoDB offline message retention period in days
retainChatRecords: 365

# Schedule to clear expired messages(older than retainChatRecords days) in MongoDB every Wednesday at 2am
# This deletion is just for cleaning up disk usage according to previous configuration retainChatRecords, no notification will be sent
chatRecordsClearTime: "0 2 * * 3"

# Schedule to auto delete messages every day at 2am
# This deletion is for messages that have been retained for more than msg_destruct_time (seconds) in the conversation field
msgDestructTime: "0 2 * * *"

# Secret key
secret: openIM123

# Token policy
#
# Token expiration period in days
tokenPolicy:
  expire: 90

# Message verification policy
#
# Whether to verify friendship when sending messages
messageVerify:
  friendVerify: false

iosPush:
  pushSound: "xxx"
  badgeCount: true
  production: false

callback:
  url: "http://127.0.0.1:10008/callbackExample"
  beforeSendSingleMsg:
    enable: false
    timeout: 5
    failedContinue: true
  beforeUpdateUserInfoEx:
    enable:  false
    timeout: 5
    failedContinue: true
  afterUpdateUserInfoEx:
    enable:  false
    timeout: 5
    failedContinue: true
  afterSendSingleMsg:
    enable: true
    timeout: 5
    failedContinue: true
  beforeSendGroupMsg:
    enable: false
    timeout: 5
    failedContinue: true
  afterSendGroupMsg:
    enable: false
    timeout: 5
    failedContinue: true
  msgModify:
    enable: false
    timeout: 5
    failedContinue: true
  userOnline:
    enable: false
    timeout: 5
    failedContinue: true
  userOffline:
    enable: false
    timeout: 5
    failedContinue: true
  userKickOff:
    enable: false
    timeout: 5
    failedContinue: true
  offlinePush:
    enable: false
    timeout: 5
    failedContinue: true
  onlinePush:
    enable: false
    timeout: 5
    failedContinue: true
  superGroupOnlinePush:
    enable: false
    timeout: 5
    failedContinue: true
  beforeAddFriend:
    enable: false
    timeout: 5
    failedContinue: true
  beforeUpdateUserInfo:
    enable: false
    timeout: 5
    failedContinue: true
  beforeCreateGroup:
    enable: false
    timeout: 5
    failedContinue: true
  afterCreateGroup:
    enable: false
    timeout: 5
    failedContinue: true
  beforeMemberJoinGroup:
    enable: false
    timeout: 5
    failedContinue: true
  beforeSetGroupMemberInfo:
    enable: false
    timeout: 5
    failedContinue: true
  afterSetGroupMemberInfo:
    enable: false
    timeout: 5
    failedContinue: true
  setMessageReactionExtensions:
    enable: false
    timeout: 5
    failedContinue: true
  quitGroup:
    enable: false
    timeout: 5
    failedContinue: true
  killGroupMember:
    enable: false
    timeout: 5
    failedContinue: true
  dismissGroup:
    enable: false
    timeout: 5
    failedContinue: true
  joinGroup:
    enable: false
    timeout: 5
    failedContinue: true
  groupMsgRead:
    enable: false
    timeout: 5
    failedContinue: true
  singleMsgRead:
    enable: false
    timeout: 5
    failedContinue: true
  updateUserInfo:
    enable: false
    timeout: 5
    failedContinue: true
  beforeUserRegister:
    enable: false
    timeout: 5
    failedContinue: true
  afterUserRegister:
    enable: false
    timeout: 5
    failedContinue: true
  transferGroupOwner:
    enable: false
    timeout: 5
    failedContinue: true
  beforeSetFriendRemark:
    enable: false
    timeout: 5
    failedContinue: true
  afterSetFriendRemark:
    enable: false
    timeout: 5
    failedContinue: true
  afterGroupMsgRead:
    enable: false
    timeout: 5
    failedContinue: true
  afterGroupMsgRevoke:
    enable: false
    timeout: 5
    failedContinue: true
  afterJoinGroup:
    enable: false
    timeout: 5
    failedContinue: true
  beforeInviteUserToGroup:
    enable: false
    timeout: 5
    failedContinue: true
  joinGroupAfter:
    enable: false
    timeout: 5
    failedContinue: true
  setGroupInfoAfter:
    enable: false
    timeout: 5
    failedContinue: true
  setGroupInfoBefore:
    enable: false
    timeout: 5
    failedContinue: true
  revokeMsgAfter:
    enable: false
    timeout: 5
    failedContinue: true
  addBlackBefore:
    enable: false
    timeout: 5
    failedContinue: true
  addFriendAfter:
    enable: false
    timeout: 5
    failedContinue: true
  addFriendAgreeBefore:
    enable: false
    timeout: 5
    failedContinue: true
  deleteFriendAfter:
    enable: false
    timeout: 5
    failedContinue: true
  importFriendsBefore:
    enable: false
    timeout: 5
    failedContinue: true
  importFriendsAfter:
    enable: false
    timeout: 5
    failedContinue: true
  removeBlackAfter:
    enable: false
    timeout: 5
    failedContinue: true

prometheus:
  enable: true
  grafanaUrl: http://192.168.31.182:13000/
  apiPrometheusPort: [20100]
  userPrometheusPort: [ 20110 ]
  friendPrometheusPort: [ 20120 ]
  messagePrometheusPort: [ 20130 ]
  messageGatewayPrometheusPort: [ 20140 ]
  groupPrometheusPort: [ 20150 ]
  authPrometheusPort: [ 20160 ]
  pushPrometheusPort: [ 20170 ]
  conversationPrometheusPort: [ 20230 ]
  rtcPrometheusPort: [ 21300 ]
  thirdPrometheusPort: [ 21301 ]
  messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] # List of ports

@cubxxw

hywan9 avatar Jan 26 '24 02:01 hywan9

Solved with #1879

hywan9 avatar Mar 03 '24 10:03 hywan9