【问题标题】:Thingsboard Not building from SourceThingsboard 不是从源代码构建的
【发布时间】:2018-04-11 19:10:49
【问题描述】:

我有一个新的 ubuntu 16.04 虚拟机,我正在尝试使用此文档 Contribution Guide 安装 thingsboard,但没有任何成功:

这是在机器上做的:

  1. sudo apt-get install default-jre default-jdk
  2. 导出JAVA_HOME='/usr/lib/jvm/default-java'
  3. git clonehttps://github.com/thingsboard/thingsboard.git
  4. git checkout release-1.3
  5. cd ${TB_WORK_DIR}/application
  6. mvn clean install -DskipTests
  7. cd ${TB_WORK_DIR}/application/target/bin/install/install_dev_db.sh 修改为我的用户并执行脚本。
    我现在想使用 HSQLDB。
  8. cd ${TB_WORK_DIR}/application
  9. mvn clean install -DskipTests

结果:

NPM 服务器启动,但是当我登录 localhost:3000 并尝试使用 tenant@thingsboard.org / tenant 登录时,出现错误

[Error API proxy error: Error connect ECONNREFUSED 127.0.0.1:8080]

我已经三遍检查我没有错字。

我错过了一步吗?

我没有使用代理并收到与上述相同的错误:

npm config set proxy null npm config set https-proxy null npm config npm config set registry http://registry.npmjs.org/

猫~/.npmrc:

proxy=null https-proxy=null registry=http://registry.npmjs.org/ls

【问题讨论】:

    标签: maven npm thingsboard


    【解决方案1】:

    如您所述,这与thingsboard/thingsboard issue 336 相同... 唯一的提示是:

    我认为您需要运行后端才能登录。

    你要么是behind a proxy

    npm config set proxy http://myproxyblabla:myport
    npm config set https-proxy http://myproxyblabla:myport
    

    you are not,这意味着您的 localhost thingsboard 系统应该使用代理:

    npm config set proxy null
    npm config set https-proxy null
    

    在这两种情况下:

    npm config set registry http://registry.npmjs.org/
    

    然后再次尝试重新启动您的服务器并登录。

    【讨论】:

    • 不幸的是,这不起作用。我没有使用代理,我已登录虚拟机并点击localhost:3000
    • @risail 但是,您的 .nprmrc 必须包含代理引用。从.npmrc 中删除它,它应该可以工作。
    • @risail 或者你有任何涉及代理的环境变量吗? (http_proxy? ...)
    • 我在上面发布了我的.npmrc 并按照askubuntu.com/questions/526095/how-to-enable-disable-proxy 确认没有代理以及运行printenv 并确认代理条目没有潜入系统。
    • @risail 好的。奇怪的。就像服务器要求/要求代理一样:github.com/thingsboard/thingsboard/blob/…
    【解决方案2】:

    试试这个

    1- 确保你有 java 8(JDK 不是 JRE),

    2- 从根目录(不是应用程序目录)运行“mvn clean install -DskipTests”

    3- 命中 127.0.0.1:8080 而不是 :3000(如果您从 UI 文件夹构建,则为这个)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-06-29
      • 1970-01-01
      • 2013-06-01
      • 2012-12-11
      • 2015-08-20
      • 2011-09-05
      • 2020-06-19
      相关资源
      最近更新 更多