Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] ExportConfigsCommand NPE #7398

Closed
3 tasks done
shirenchuang opened this issue Sep 26, 2023 · 7 comments · Fixed by #7399
Closed
3 tasks done

[Bug] ExportConfigsCommand NPE #7398

shirenchuang opened this issue Sep 26, 2023 · 7 comments · Fixed by #7399

Comments

@shirenchuang
Copy link
Contributor

shirenchuang commented Sep 26, 2023

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

MacOS 12.6

RocketMQ version

release-5.1.3

JDK Version

jdk11

Describe the Bug

image

image

image

Steps to Reproduce

run ExportConfigsCommand

What Did You Expect to See?

don't throw NPE

What Did You See Instead?

.

Additional Context

No response

@joeCarf
Copy link
Contributor

joeCarf commented Sep 26, 2023

maybe you can assign this to me, I'd like to fix it.

@joeCarf
Copy link
Contributor

joeCarf commented Sep 26, 2023

BTW, may I ask how you execute terminal commands like ExportConfigsCommand when debugging RocketMQ in Idea? Thanks a lot~

@shirenchuang
Copy link
Contributor Author

BTW, may I ask how you execute terminal commands like ExportConfigsCommand when debugging RocketMQ in Idea? Thanks a lot~

直接跑源码debug 或者 执行sh脚本的时候开启远程端口然后再IDEA调试都可以的

@shirenchuang
Copy link
Contributor Author

BTW,请问ExportConfigsCommand在Idea中调试RocketMQ时如何执行终端命令?非常感谢~

你可以在 MQAdminStartup的main方法中添加一些参数

    public static void main(String[] args) {
        String namesrv = "-n=127.0.0.1:9876";
        String clusterName = "-c=szz_cluster_a";

        //导出Broker配置文件
        args = new String[]{"exportConfigs",namesrv,clusterName};
        main0(args, null);

    }

@lizhimins
Copy link
Member

put null 是因为哪个参数没了?

@joeCarf
Copy link
Contributor

joeCarf commented Sep 26, 2023

put null 是因为哪个参数没了?

filterServerNums

@joeCarf
Copy link
Contributor

joeCarf commented Sep 26, 2023

BTW,请问ExportConfigsCommand在Idea中调试RocketMQ时如何执行终端命令?非常感谢~

你可以在 MQAdminStartup的main方法中添加一些参数

    public static void main(String[] args) {
        String namesrv = "-n=127.0.0.1:9876";
        String clusterName = "-c=szz_cluster_a";

        //导出Broker配置文件
        args = new String[]{"exportConfigs",namesrv,clusterName};
        main0(args, null);

    }

感谢

lizhimins pushed a commit that referenced this issue Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants