• rocketmq安装与踩坑


    rocketmq安装与踩坑

    本体下载与启动

    • 下载地址:https://rocketmq.apache.org/release_notes/release-notes-4.4.0/

    • 启动
      1.配置环境变量 ROCKETMQ_HOME = C:\code\tool\rocketmq\ins\rocketmq-all-4.4.0-bin-release(下载下来的目录)
      2.启动管理员cmd,在bin目录下, 输入start mqnamesrv
      3.同样操作,输入start mqbroker -n localhost:9876

    管理界面下载与启动

    • 下载地址
      github搜索RocketMQ-DashBoard

    • 运行
      在解压目录 cmd执行

    mvn spring-boot:run
    
    • 1

    或者

    mvn clean package -Dmaven.test.skip=true
    java -jar target/rocketmq-dashboard-1.0.1-SNAPSHOT.jar
    
    • 1
    • 2
    • 如果报下面这个错
    [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.3:install-node-and-yarn (install node and yarn) on project rocketmq-dashboard: Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v1.22.10/yarn-v1.22.10.tar.gz: Connect to github.com:443 [github.com/20.205.243.166] failed: Connection timed out: connect -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    在浏览器/下载器上,访问https://github.com/yarnpkg/yarn/releases/download/v1.22.10/yarn-v1.22.10.tar.gz,手动下载,
    然后放到该目录下:C:\Program Files (x86)\apache-maven-3.8.2-bin\repository\com\github\eirslett\yarn\1.22.10

    • 如果报这个错
    Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.3:yarn (yarn install) on project rocketmq-dashboard: Failed to run task: ‘yarn install’ failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
    
    
    • 1
    • 2

    把pom.xml中的frontend-maven-plugin和maven-antrun-plugin注释掉,就是下面这个样子

    
    
    
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    
        <parent>
            <groupId>org.apachegroupId>
            <artifactId>apacheartifactId>
            <version>18version>
        parent>
    
        <modelVersion>4.0.0modelVersion>
        <groupId>org.apache.rocketmqgroupId>
        <artifactId>rocketmq-dashboardartifactId>
        <packaging>jarpackaging>
        <version>1.0.1-SNAPSHOTversion>
        <name>rocketmq-dashboardname>
    
        <scm>
            <url>git@github.com:apache/rocketmq-dashboard.giturl>
            <connection>scm:git:git@github.com:apache/rocketmq-dashboard.gitconnection>
            <developerConnection>scm:git:git@github.com:apache/rocketmq-dashboard.gitdeveloperConnection>
            <tag>1.0.0tag>
        scm>
    
        <mailingLists>
            <mailingList>
                <name>Development Listname>
                <subscribe>dev-subscribe@rocketmq.apache.orgsubscribe>
                <unsubscribe>dev-unsubscribe@rocketmq.apache.orgunsubscribe>
                <post>dev@rocketmq.apache.orgpost>
            mailingList>
            <mailingList>
                <name>User Listname>
                <subscribe>users-subscribe@rocketmq.apache.orgsubscribe>
                <unsubscribe>users-unsubscribe@rocketmq.apache.orgunsubscribe>
                <post>users@rocketmq.apache.orgpost>
            mailingList>
            <mailingList>
                <name>Commits Listname>
                <subscribe>commits-subscribe@rocketmq.apache.orgsubscribe>
                <unsubscribe>commits-unsubscribe@rocketmq.apache.orgunsubscribe>
                <post>commits@rocketmq.apache.orgpost>
            mailingList>
        mailingLists>
    
        <developers>
            <developer>
                <id>Apache RocketMQid>
                <name>Apache RocketMQ of ASFname>
                <url>https://rocketmq.apache.org/url>
            developer>
        developers>
    
        <organization>
            <name>Apache Software Foundationname>
            <url>http://www.apache.orgurl>
        organization>
    
        <licenses>
            <license>
                <name>Apache License, Version 2.0name>
                <url>http://www.apache.org/licenses/LICENSE-2.0url>
                <distribution>repodistribution>
            license>
        licenses>
    
        <properties>
            <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
            <maven.compiler.source>1.8maven.compiler.source>
            <maven.compiler.target>1.8maven.compiler.target>
    
            <guava.version>29.0-jreguava.version>
            <commons-digester.version>2.1commons-digester.version>
            <commons-lang.version>2.6commons-lang.version>
            <commons-io.version>2.4commons-io.version>
            <commons-cli.version>1.2commons-cli.version>
            <commons-collections.version>3.2.2commons-collections.version>
            <rocketmq.version>4.9.3rocketmq.version>
            <surefire.version>2.19.1surefire.version>
            <aspectj.version>1.9.6aspectj.version>
            <lombok.version>1.18.12lombok.version>
            <main.basedir>${basedir}/../..main.basedir>
            <docker.image.prefix>apacherocketmqdocker.image.prefix>
            <spring.boot.version>2.6.0spring.boot.version>
            <mockito-inline.version>3.3.3mockito-inline.version>
            <jaxb-api.version>2.3.1jaxb-api.version>
            <commons-pool2.version>2.4.3commons-pool2.version>
            <easyexcel.version>2.2.10easyexcel.version>
            <asm.version>4.2asm.version>
            <junit.version>4.12junit.version>
            <snakeyaml.version>1.30snakeyaml.version>
            <cglib.version>2.2.2cglib.version>
            <joor.version>0.9.6joor.version>
            <bcpkix-jdk15on.version>1.68bcpkix-jdk15on.version>
        properties>
    
        <dependencies>
            <dependency>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-starter-webartifactId>
                <version>${spring.boot.version}version>
            dependency>
            <dependency>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-starter-actuatorartifactId>
                <version>${spring.boot.version}version>
            dependency>
            <dependency>
                <groupId>org.springframework.datagroupId>
                <artifactId>spring-data-commonsartifactId>
                <version>${spring.boot.version}version>
            dependency>
            <dependency>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-starter-testartifactId>
                <version>${spring.boot.version}version>
                <scope>testscope>
                <exclusions>
                    <exclusion>
                        <groupId>org.mockitogroupId>
                        <artifactId>mockito-coreartifactId>
                    exclusion>
                exclusions>
            dependency>
            <dependency>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-starter-validationartifactId>
                <version>${spring.boot.version}version>
            dependency>
            <dependency>
                <groupId>commons-collectionsgroupId>
                <artifactId>commons-collectionsartifactId>
                <version>${commons-collections.version}version>
            dependency>
            <dependency>
                <groupId>org.apache.rocketmqgroupId>
                <artifactId>rocketmq-toolsartifactId>
                <version>${rocketmq.version}version>
                <exclusions>
                    <exclusion>
                        <groupId>ch.qos.logbackgroupId>
                        <artifactId>logback-classicartifactId>
                    exclusion>
                    <exclusion>
                        <groupId>ch.qos.logbackgroupId>
                        <artifactId>logback-coreartifactId>
                    exclusion>
                exclusions>
            dependency>
            <dependency>
                <groupId>org.apache.rocketmqgroupId>
                <artifactId>rocketmq-namesrvartifactId>
                <version>${rocketmq.version}version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4jgroupId>
                        <artifactId>slf4j-apiartifactId>
                    exclusion>
                    <exclusion>
                        <groupId>ch.qos.logbackgroupId>
                        <artifactId>logback-classicartifactId>
                    exclusion>
                    <exclusion>
                        <groupId>ch.qos.logbackgroupId>
                        <artifactId>logback-coreartifactId>
                    exclusion>
                exclusions>
            dependency>
            <dependency>
                <groupId>org.apache.rocketmqgroupId>
                <artifactId>rocketmq-brokerartifactId>
                <version>${rocketmq.version}version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4jgroupId>
                        <artifactId>slf4j-apiartifactId>
                    exclusion>
                    <exclusion>
                        <groupId>ch.qos.logbackgroupId>
                        <artifactId>logback-classicartifactId>
                    exclusion>
                    <exclusion>
                        <groupId>ch.qos.logbackgroupId>
                        <artifactId>logback-coreartifactId>
                    exclusion>
                exclusions>
            dependency>
            <dependency>
                <groupId>com.google.guavagroupId>
                <artifactId>guavaartifactId>
                <version>${guava.version}version>
            dependency>
            <dependency>
                <groupId>org.aspectjgroupId>
                <artifactId>aspectjrtartifactId>
                <version>${aspectj.version}version>
            dependency>
            <dependency>
                <groupId>org.aspectjgroupId>
                <artifactId>aspectjweaverartifactId>
                <version>${aspectj.version}version>
            dependency>
            
            <dependency>
                <groupId>cglibgroupId>
                <artifactId>cglibartifactId>
                <version>${cglib.version}version>
            dependency>
            <dependency>
                <groupId>org.jooqgroupId>
                <artifactId>joorartifactId>
                <version>${joor.version}version>
            dependency>
            <dependency>
                <groupId>org.bouncycastlegroupId>
                <artifactId>bcpkix-jdk15onartifactId>
                <version>${bcpkix-jdk15on.version}version>
            dependency>
            <dependency>
                <groupId>javax.xml.bindgroupId>
                <artifactId>jaxb-apiartifactId>
                <version>${jaxb-api.version}version>
            dependency>
            <dependency>
                <groupId>org.projectlombokgroupId>
                <artifactId>lombokartifactId>
                <version>${lombok.version}version>
            dependency>
            <dependency>
                <groupId>org.mockitogroupId>
                <artifactId>mockito-inlineartifactId>
                <version>${mockito-inline.version}version>
                <scope>testscope>
            dependency>
            <dependency>
                <groupId>org.apache.commonsgroupId>
                <artifactId>commons-pool2artifactId>
                <version>${commons-pool2.version}version>
            dependency>
            <dependency>
                <groupId>com.alibabagroupId>
                <artifactId>easyexcelartifactId>
                <version>${easyexcel.version}version>
            dependency>
            <dependency>
                <groupId>org.ow2.asmgroupId>
                <artifactId>asmartifactId>
                <version>${asm.version}version>
            dependency>
            <dependency>
                <groupId>junitgroupId>
                <artifactId>junitartifactId>
                <version>${junit.version}version>
                <scope>testscope>
            dependency>
            <dependency>
                <groupId>org.yamlgroupId>
                <artifactId>snakeyamlartifactId>
                <version>${snakeyaml.version}version>
            dependency>
    
        dependencies>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-pluginartifactId>
                    <version>3.5.1version>
                    <configuration>
                        <source>${maven.compiler.source}source>
                        <target>${maven.compiler.target}target>
                        <compilerVersion>${maven.compiler.source}compilerVersion>
                        <showDeprecation>trueshowDeprecation>
                        <showWarnings>trueshowWarnings>
                        <annotationProcessorPaths>
                            <path>
                                <groupId>org.projectlombokgroupId>
                                <artifactId>lombokartifactId>
                                <version>${lombok.version}version>
                            path>
                        annotationProcessorPaths>
                    configuration>
                plugin>
                <plugin>
                    <groupId>org.springframework.bootgroupId>
                    <artifactId>spring-boot-maven-pluginartifactId>
                    <version>${spring.boot.version}version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackagegoal>
                            goals>
                        execution>
                    executions>
                plugin>
                
                <plugin>
                    <groupId>com.spotifygroupId>
                    <artifactId>docker-maven-pluginartifactId>
                    <version>0.4.11version>
                    <dependencies>
                        <dependency>
                            <groupId>javax.activationgroupId>
                            <artifactId>javax.activation-apiartifactId>
                            <version>1.2.0version>
                            <scope>compilescope>
                        dependency>
                    dependencies>
                    <configuration>
                        <imageName>${docker.image.prefix}/${project.artifactId}imageName>
                        <dockerDirectory>src/main/dockerdockerDirectory>
                        <resources>
                            <resource>
                                <targetPath>/targetPath>
                                <directory>${project.build.directory}directory>
                                <include>${project.build.finalName}.jarinclude>
                            resource>
                        resources>
                        <imageTags>
                            <imageTag>${project.version}imageTag>
                            <imageTag>latestimageTag>
                        imageTags>
                    configuration>
                plugin>
                <plugin>
                    <groupId>org.apache.maven.pluginsgroupId>
                    <artifactId>maven-checkstyle-pluginartifactId>
                    <version>2.17version>
                    <executions>
                        <execution>
                            <id>validateid>
                            <phase>validatephase>
                            <configuration>
                                <excludes>src/main/resourcesexcludes>
                                <configLocation>style/rmq_checkstyle.xmlconfigLocation>
                                <encoding>UTF-8encoding>
                                <consoleOutput>trueconsoleOutput>
                                <failsOnError>truefailsOnError>
                            configuration>
                            <goals>
                                <goal>checkgoal>
                            goals>
                        execution>
                    executions>
                plugin>
                <plugin>
                    <groupId>org.codehaus.mojogroupId>
                    <artifactId>findbugs-maven-pluginartifactId>
                    <version>3.0.4version>
                plugin>
                <plugin>
                    <groupId>org.jacocogroupId>
                    <artifactId>jacoco-maven-pluginartifactId>
                    <version>0.8.7version>
                    <executions>
                        <execution>
                            <id>prepare-agentid>
                            <goals>
                                <goal>prepare-agentgoal>
                            goals>
                        execution>
                    executions>
                plugin>
                <plugin>
                    <groupId>org.eluder.coverallsgroupId>
                    <artifactId>coveralls-maven-pluginartifactId>
                    <version>4.3.0version>
                    <dependencies>
                        <dependency>
                            <groupId>javax.xml.bindgroupId>
                            <artifactId>jaxb-apiartifactId>
                            <version>${jaxb-api.version}version>
                        dependency>
                    dependencies>
                plugin>
                <plugin>
                    <groupId>org.apache.ratgroupId>
                    <artifactId>apache-rat-pluginartifactId>
                    <version>0.12version>
                    <configuration>
                        <excludes>
                            <exclude>.gitignoreexclude>
                            <exclude>.travis.ymlexclude>
                            <exclude>.asf.yamlexclude>
                            <exclude>README.mdexclude>
                            <exclude>.github/**exclude>
                            <exclude>docs/**exclude>
                            <exclude>src/main/resources/static/vendor/**exclude>
                            <exclude>src/main/resources/static/src/data/**exclude>
                            <exclude>frontend/node_modules/**exclude>
                            <exclude>frontend/build/**exclude>
                            <exclude>frontend/**.jsonexclude>
                            <exclude>frontend/**.lockexclude>
                            <exclude>frontend/public/manifest.jsonexclude>
                            <exclude>package-lock.jsonexclude>
                        excludes>
                    configuration>
                plugin>
                   
    	   plugins>
        build>
    project>
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
    • 284
    • 285
    • 286
    • 287
    • 288
    • 289
    • 290
    • 291
    • 292
    • 293
    • 294
    • 295
    • 296
    • 297
    • 298
    • 299
    • 300
    • 301
    • 302
    • 303
    • 304
    • 305
    • 306
    • 307
    • 308
    • 309
    • 310
    • 311
    • 312
    • 313
    • 314
    • 315
    • 316
    • 317
    • 318
    • 319
    • 320
    • 321
    • 322
    • 323
    • 324
    • 325
    • 326
    • 327
    • 328
    • 329
    • 330
    • 331
    • 332
    • 333
    • 334
    • 335
    • 336
    • 337
    • 338
    • 339
    • 340
    • 341
    • 342
    • 343
    • 344
    • 345
    • 346
    • 347
    • 348
    • 349
    • 350
    • 351
    • 352
    • 353
    • 354
    • 355
    • 356
    • 357
    • 358
    • 359
    • 360
    • 361
    • 362
    • 363
    • 364
    • 365
    • 366
    • 367
    • 368
    • 369
    • 370
    • 371
    • 372
    • 373
    • 374
    • 375
    • 376
    • 377
    • 378
    • 379
    • 380
    • 381
    • 382
    • 383
    • 384
    • 385
    • 386
    • 387
    • 388
    • 389
    • 390
    • 391
    • 392
    • 393
    • 394
    • 395
    • 396
    • 397
    • 398
    • 399
    • 400
    • 401
    • 402
    • 403
    • 404
    • 405
    • 406
    • 407
    • 408
    • 409
    • 410
    • 411
    • 412
    • 413
    • 414
    • 415
    • 416
    • 417
    • 418
    • 419
    • 420
    • 421
    • 422
    • 423
    • 424
    • 425
    • 426
    • 427
    • 428
    • 429
    • 430
    • 431
    • 432
    • 433
    • 434
    • 435
    • 436
    • 437
    • 438
    • 439
    • 440
    • 441
    • 442
    • 443
    • 444
    • 445
    • 446
    • 447
    • 448
    • 449
    • 450
    • 451
    • 452
    • 453
    • 454
    • 455
    • 456
    • 457
    • 458
    • 459
    • 460
    • 461
    • 462
    • 463
    • 464
    • 465
    • 466
    • 467
    • 468
    • 469
    • 470
    • 471
    • 472
    • 473
    • 474
    • 475
    • 476
    • 477
    • 478
    • 访问
      最后访问http://127.0.0.1:8080/测试
  • 相关阅读:
    java文件压缩加密,使用流的方式
    flurl监听报错返回的信息
    【OpenPLC学习】RK3568上运行OpenPLC
    Hive 数据模型切换后的数据验证方案
    Android仿QQ消息拖拽效果(二)
    Xilinx MicroBlaze定时器中断无法返回主函数问题解决
    基于Java+SpringBoot+Thymeleaf+Mysql旅游景区景点售票购票系统系统设计与实现
    用计算人体基础代谢率BMR来对比C与C++输入输出的区别
    22.1 正则表达式-定义正则表达式、正则语法
    一种影像比对快速提取建筑物要素变化的方法
  • 原文地址:https://blog.csdn.net/qq_50665031/article/details/126305080