thingsboard常见编译报错解决

一:Failed to execute goal org.thingsboard:gradle-maven-plugin:1.0.12:invoke

Maven构建失败,主要原因是无法从网络下载Gradle 7.3.3压缩包,国内网络连接问题访问异常。
1. 详细原因分析
Gradle下载失败:Maven插件无法从https://services.gradle.org/distributions/gradle-7.3.3-bin.zip下载Gradle压缩包

2.手动下载,把下载下来的文件放入这个C:\Users\Administrator\.gradle\wrapper\dists\gradle-7.3.3-bin文件夹下

二:前端构建失败,pkg工具执行出错 Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:yarn (yarn pkg) on project web-ui: Failed to run task: 'yarn run pkg' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2

  • 原因:本地缓存缺少fetched-vv22.17.1-linux-x64和fetched-v1v22.17.1-win-x64这两个文件
  • 解决方法:前往github下载对应文件并重命名,下载地址:https://github.com/zeit/pkg-fetch/releases

这个链接选择对应版本进行下载Releases · yao-pkg/pkg-fetch

下载之后放入这个位置,重命名为fetched-v22.17.1-linux-x64和fetched-v22.17.1-win-x64然后重新编译

注:如果不行就选择对应的版本从对应的地址下载

注:https://github.com/yao-pkg/pkg-fetch/releases/download/v3.5/node-v22.17.1-win-x64

三、license问题 

Failed to execute goal com.mycila:license-maven-plugin:3.0:check (default) on project cache: Some files do not have the expected license header
  • 原因:添加的本地文件缺少头部license
  • 解决方法:在你新增的文件里面的头部增加默认的license
/**
 * Copyright © 2016-2025 The Thingsboard Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

四:Error creating bean with name 'MqttTransportService': Invocation of init method failed  Address already in use: bind

  • 原因:这是因为thingsBoard默认的mqtt端口1883已经被占用
  • 解决方法:打开thingsboard.yml配置文件,搜索1883,把1883替换成1884(如果1884也被占用就继续换成其它端口)

重新启动

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值