SERVER 无法启动问题

samat88 2019-12-6 1274

第一次报的是时区错误  r然后论坛翻了半天才找到原因修好了  d第二次又报了这个错误  c错误内容如下

D:\server>bin\wildfirechat.bat  Using JAVA_HOME:       "C:\java\jdk-12.0.1"  Using WILDFIRECHATHOME:   "D:\server"                                                                 ()| |  | | / |()       | |     | |  \ \ /\ / /| || | / ` || |_ | || '_|/ \  / || ' \  / ` || |   \ V  V / | || || (| ||  || || |  |  / | ( | | | || (| || |    _/_/  |||| _,|||  ||||   \|  _||| || _,| \

Exception in thread "main" java.lang.NullPointerException         at io.moquette.server.Server.startServer(Server.java:225)         at io.moquette.server.Server.startServer(Server.java:215)         at io.moquette.server.Server.startServer(Server.java:199)         at io.moquette.server.Server.start(Server.java:109)         at cn.wildfirechat.server.Server.main(Server.java:15) 

D:\server>

wildfirechat.conf文件内容如下

*****

Server configuration

*****

服务器的接入IP。给客户端提供是${server.ip}和${http_port}。

客户端会从${http_port}端口获取到长链接端口。这个地址一定要改成客户端可以访问到的IP地址

(如果您部署云服务器上或者具有独立公网出口的服务器上,请改为对应的公网IP;如果您部署在在内网环境下,在内网使用,这个地方改成内网地址)

server.ip 106.13.97.70

原生客户端长链接端口

port 1883

客户端短链接端口

http_port 80

WEB客户端长链接端口

websocket_port 8083

管理端口

http.admin.port 18080

节点ID,当集群部署时,一定不能有重复。

node_id 1

绑定IP,保持不变即可

host 106.13.97.70

本地绑定端口

local_port 80

是否使用内置DB。0使用mysql;1使用h2db;2使用mysql+mongodb。社区版只支持0和1,专业版支持2

embed.db 0

服务器管理接口密钥

http.admin.secret_key 123456

服务器API接口参数是否检查时间。当设置为false时,所有的请求会检查时间的有效性;当设置为true时,可以在http.admin.secret_key保持不变的情况下,使用固定的服务API签名

nonce = "76616", timestamp = "1558350862502", sign = "b98f9b0717f59febccf1440067a7f50d9b31bdde"

http.admin.no_check_time true

客户端协议栈密钥,需要与客户端协议栈文件libemqq.cc文件中的aes_key值保持一致,16进制byte用逗号分割。这个密钥对安全性帮助不大,客户不要修改

client.proto.secret_key 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F

用来生产im token的私钥,只在服务器使用,客户端不用。正式使用时为了安全一定要修改这个值,切记切记

token.key testim

首次登录,是否接收之前的历史消息。0 不接收;1接收。

message.roaming 1

是否开启拉取远程历史消息

message.remote_history_message 1

服务器为每个用户缓存的消息数量。这个值改得太大,拉取消息时间变长,另外会占用大量内存。

message.max_queue 1024

*****

hazelcase configuration

*****

hazelcast.configuration config/hazelcast.xml

*****

Media server configuration

*****

是否使用七牛云存储。1使用七牛;0使用内存文件服务器。

media.server.use_qiniu 0

媒体类型分类

Media_Type_GENERAL = 0,

Media_Type_IMAGE = 1,

Media_Type_VOICE = 2,

Media_Type_VIDEO = 3,

Media_Type_FILE = 4,

Media_Type_PORTRAIT = 5,

Media_Type_FAVORITE = 6

qiniu media server configuration

上传地址,不同的区域,上传地址也不同,请注意现在正确的地址

qiniu.server_url  http://up.qbox.me qiniu.access_key tU3vdBK5BL5j4N7jI5N5uZgq_HQDo170w5C9Amnn qiniu.secret_key YfQIJdgp5YGhwEw14vGpaD2HJZsuJldWtqens7i5

bucket名字及Domain

qiniu.bucket_general_name media qiniu.bucket_general_domain http://cdn.wildfirechat.cn qiniu.bucket_image_name media qiniu.bucket_image_domain http://cdn.wildfirechat.cn qiniu.bucket_voice_name media qiniu.bucket_voice_domain http://cdn.wildfirechat.cn qiniu.bucket_video_name media qiniu.bucket_video_domain http://cdn.wildfirechat.cn qiniu.bucket_file_name media qiniu.bucket_file_domain http://cdn.wildfirechat.cn qiniu.bucket_portrait_name storage qiniu.bucket_portrait_domain http://cdn2.wildfirechat.cn qiniu.bucket_favorite_name storage qiniu.bucket_favorite_domain http://cdn2.wildfirechat.cn

local media server configuration

本地媒体服务器配置。

local.media.storage.root ./media

是否支持多端登陆

server.multi_endpoint false

*****

Push server configuration

*****

安卓推送服务器地址

push.android.server.address http://localhost:8085/android/push

苹果推送服务器地址

push.ios.server.address http://localhost:8085/ios/push

*****

MongoDB configuration

*****

专业版支持,社区版请忽略

mongodb.client_uri mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]

mongodb.client_uri mongodb://host1:27017,host2:27017,host3:27017/wfchat?replicaSet=myReplicaSet

mongodb.client_uri mongodb://wfc:123456@localhost:27017/wfchat mongodb.database wfchat mongodb.data_expire_days 1096

*****

Netty Configuration

#

Linux systems can use epoll instead of nio. To get a performance

gain and reduced GC.

http://netty.io/wiki/native-transports.html for more information

*****

如果是linux系统,一定要打开下面这个参数,能大幅度提高性能

netty.epoll true

*****

Sensitive configuration

*****

文本敏感词过滤处理方法,0 发送失败;1 发送成功但消息被服务器直接丢弃;2 命中的敏感词被替换成***

sensitive.filter.type 0

*****

Message forward configuration

*****

消息转发地址

message.forward.url http://localhost:8087/message/forward

上传的附件:
最新回复 (0)
返回