MiraiForum

    • 注册
    • 登录
    • 搜索
    • 热门
    • 最新
    • 未解决
    • 标签
    • 群组
    • 友情链接

    mcl启动报错

    使用交流
    2
    6
    607
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • M
      moeik 最后由 编辑

      配置文件:

      {
        "js_optimization_level": -1,
        "mirai_repo": "https://gitee.com/peratx/mirai-repo/raw/master",
        "maven_repo": [
          "https://maven.aliyun.com/repository/public"
        ],
        "packages": [
          {
            "id": "net.mamoe:mirai-console",
            "channel": "stable",
            "version": "2.7.0",
            "type": "libs",
            "versionLocked": false
          },
          {
            "id": "net.mamoe:mirai-console-terminal",
            "channel": "stable",
            "version": "2.7.0",
            "type": "libs",
            "versionLocked": false
          },
          {
            "id": "net.mamoe:mirai-core-all",
            "channel": "stable",
            "version": "2.7.0",
            "type": "libs",
            "versionLocked": false
          },
          {
            "id": "org.itxtech:mcl-addon",
            "channel": "c122",
            "version": "1.2.2",
            "type": "plugins",
            "versionLocked": false
          },
          {
            "id": "net.mamoe:mirai-api-http",
            "channel": "stable",
            "version": "2.3.3",
            "type": "plugins",
            "versionLocked": false
          },
          {
            "id": "net.mamoe:chat-command",
            "channel": "stable",
            "version": "0.5.1",
            "type": "plugins",
            "versionLocked": false
          }
        ],
        "disabled_scripts": [],
        "proxy": "",
        "log_level": 1,
        "script_props": {}
      }
      

      启动日志:

      root@ruvds-u8gjs:/home/qbot# ./mcl
        06:40:03 [INFO] iTXTech Mirai Console Loader version 1.2.2-60c67fb
        06:40:03 [INFO] https://github.com/iTXTech/mirai-console-loader
        06:40:03 [INFO] This program is licensed under GNU AGPL v3
        06:40:04 [INFO] Fetching Mirai Console Loader Announcement...
        06:40:06 [INFO] Mirai Console Loader Announcement:
      Mirai Console Loader 公告栏
      
      如果在图片上传的时候遇到问题请与我们联系 (需要提供图片文件源本)
      `- 如 Unsupported image type for ExternalResource *
      `  considering use gif/png/bmp/jpg format.
      `- Tracker: https://github.com/mamoe/mirai/issues/new/choose
      
      常用资源整合
      `- https://mirai.mamoe.net/topic/653
      
        06:40:06 [INFO] Verifying "net.mamoe:mirai-console" v2.7.0
        06:40:06 [WARN] Package "net.mamoe:mirai-console" has newer version "2.8.2"
        06:40:06 [INFO] Verifying "net.mamoe:mirai-console-terminal" v2.7.0
        06:40:07 [WARN] Package "net.mamoe:mirai-console-terminal" has newer version "2.8.2"
        06:40:07 [INFO] Verifying "net.mamoe:mirai-core-all" v2.7.0
        06:40:08 [WARN] Package "net.mamoe:mirai-core-all" has newer version "2.8.2"
        06:40:08 [INFO] Verifying "org.itxtech:mcl-addon" v1.2.2
        06:40:08 [INFO] Verifying "net.mamoe:mirai-api-http" v2.3.3
        06:40:08 [WARN] Package "net.mamoe:mirai-api-http" has newer version "1.10.0"
        06:40:08 [INFO] Verifying "net.mamoe:chat-command" v0.5.1
        06:40:09 [WARN] Run ./mcl -u to update packages.
        06:40:09 [WARN] Package "net.mamoe:chat-command" requires "net.mamoe:mirai-console" version 2.0-RC. Current version is 2.7.0
      2021-12-06 06:40:10 I/main: Starting mirai-console...
      2021-12-06 06:40:10 I/main: Backend: version 2.7.0, built on 2021-08-25 10:20:01.
      2021-12-06 06:40:10 I/main: Frontend Terminal: version 2.7.0, provided by Mamoe Technologies
      2021-12-06 06:40:10 I/main: Welcome to visit https://mirai.mamoe.net/
      2021-12-06 06:40:10 I/plugin: Successfully loaded plugin MCL Addon v1.2.2
      2021-12-06 06:40:10 I/plugin: Successfully loaded plugin net.mamoe.mirai-api-http v2.3.3
      2021-12-06 06:40:10 I/plugin: Successfully loaded plugin Chat Command v0.5.0
      2021-12-06 06:40:11 I/main: Prepared built-in commands: autoLogin, help, login, permission, status, stop
      2021-12-06 06:40:11 I/MCL Addon: iTXTech MCL Version: 1.2.2-60c67fb
      2021-12-06 06:40:11 E/net.mamoe.mirai-api-http: net.mamoe.yamlkt.YamlDecodingException: There must be a COLON between class key and value but found STRING for 'setting'
      adapters:
              ^ at line 4, column 10
      
      net.mamoe.yamlkt.YamlDecodingException: There must be a COLON between class key and value but found STRING for 'setting'
      adapters:
              ^ at line 4, column 10
      
              at net.mamoe.yamlkt.internal.YamlUtils__ContextualExceptionKt.contextualDecodingException(ContextualException.kt:154)
              at net.mamoe.yamlkt.internal.YamlUtils.contextualDecodingException(Unknown Source)
              at net.mamoe.yamlkt.internal.YamlUtils__ContextualExceptionKt.contextualDecodingException$default(ContextualException.kt:128)
              at net.mamoe.yamlkt.internal.YamlUtils.contextualDecodingException$default(Unknown Source)
              at net.mamoe.yamlkt.internal.YamlDecoder$BlockClassDecoder.decodeElementIndex(YamlDecoder.kt:285)
              at net.mamoe.mirai.console.internal.data.PluginDataImpl$updaterSerializer$1.deserialize(PluginDataImpl.kt:75)
              at net.mamoe.mirai.console.internal.data.PluginDataImpl$updaterSerializer$1.deserialize(PluginDataImpl.kt:47)
              at net.mamoe.yamlkt.Yaml.decodeFromString(Yaml.kt:162)
              at net.mamoe.mirai.console.internal.data.MultiFilePluginDataStorageImpl.load(MultiFilePluginDataStorageImpl.kt:39)
              at net.mamoe.mirai.console.plugin.jvm.AbstractJvmPlugin.reloadPluginConfig(AbstractJvmPlugin.kt:58)
              at net.mamoe.mirai.api.http.HttpApiPluginBase.onEnable(HttpApiPluginBase.kt:34)
              at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:113)
              at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:122)
              at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt)
              at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:36)
              at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:129)
              at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:172)
              at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:208)
              at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:276)
              at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:152)
              at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:151)
              at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:47)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.base/java.lang.reflect.Method.invoke(Unknown Source)
              at org.itxtech.mcl.Utility.bootMirai(Utility.java:83)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.base/java.lang.reflect.Method.invoke(Unknown Source)
              at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)
              at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:226)
              at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1692)
              at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1013)
              at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
              at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:412)
              at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3578)
              at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107)
              at org.mozilla.javascript.ArrowFunction.call(ArrowFunction.java:43)
              at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:155)
              at org.mozilla.javascript.InterfaceAdapter.lambda$invoke$0(InterfaceAdapter.java:105)
              at org.mozilla.javascript.Context.call(Context.java:554)
              at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:522)
              at org.mozilla.javascript.InterfaceAdapter.invoke(InterfaceAdapter.java:105)
              at org.mozilla.javascript.jdk18.VMBridge_jdk18$1.invoke(VMBridge_jdk18.java:126)
              at com.sun.proxy.$Proxy4.run(Unknown Source)
              at org.itxtech.mcl.script.ScriptManager.phaseBoot(ScriptManager.java:106)
              at org.itxtech.mcl.Loader.lambda$start$3(Loader.java:176)
              at org.itxtech.mcl.Loader.tryCatching(Loader.java:145)
              at org.itxtech.mcl.Loader.start(Loader.java:176)
              at org.itxtech.mcl.Loader.main(Loader.java:68)
      
      2021-12-06 06:40:11 I/main: 3 plugin(s) enabled.
      2021-12-06 06:40:11 I/main: mirai-console started successfully.
      >
      
      1 条回复 最后回复 回复 引用 0
      • H
        hundun000 ⭐2021⭐ 最后由 编辑

        看起来是config/MiraiApiHttp/setting.yml写得不对,贴这个文件内容出来看看

        M 2 条回复 最后回复 回复 引用 0
        • M
          moeik @hundun000 最后由 编辑

          @hundun000

          我用的官方的模板

          ## 配置文件中的值,全为默认值
          
          ## 启用的 adapter, 内置有 http, ws, reverse-ws, webhook
          adapters:
            - http
          
          ## 是否开启认证流程, 若为 true 则建立连接时需要验证 verifyKey
          ## 建议公网连接时开启
          enableVerify: true
          verifyKey: ******
          
          ## 开启一些调式信息
          debug: false
          
          ## 是否开启单 session 模式, 若为 true,则自动创建 session 绑定 console 中登录的 bot
          ## 开启后,接口中任何 sessionKey 不需要传递参数
          ## 若 console 中有多个 bot 登录,则行为未定义
          ## 确保 console 中只有一个 bot 登陆时启用
          singleMode: false
          
          ## 历史消息的缓存大小
          ## 同时,也是 http adapter 的消息队列容量
          cacheSize: 4096
          
          ## adapter 的单独配置,键名与 adapters 项配置相同
          adapterSettings:
            ## 详情看 http adapter 使用说明 配置
            http:
              host: 0.0.0.0
              port: 9999
              cors: [*]
            
            ## 详情看 websocket adapter 使用说明 配置
          #  ws:
           #   host: localhost
            #  port: 8080
             # reservedSyncId: -1
          
          1 条回复 最后回复 回复 引用 0
          • M
            moeik @hundun000 最后由 编辑

            @hundun000 兄弟 问题解决了 就是setting配置问题 现在新的问题是 http 端口只监测v6不监控v4是什么原因呢

            H 1 条回复 最后回复 回复 引用 0
            • H
              hundun000 ⭐2021⭐ @moeik 最后由 编辑

              @moeik 其他问题我就不懂了,等其他人解答吧。我自己也不是很熟悉这个插件的具体逻辑,只是第一个问题报错显示是关于配置文件格式的,我就提出来。

              M 1 条回复 最后回复 回复 引用 0
              • M
                moeik @hundun000 最后由 编辑

                @hundun000 感谢解疑 现在已正常运行

                1 条回复 最后回复 回复 引用 0
                • 1 / 1
                • First post
                  Last post
                Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact