【问题标题】:Unable to run Grafana server on local system无法在本地系统上运行 Grafana 服务器
【发布时间】:2020-01-27 12:45:48
【问题描述】:

我必须为 Grafana 创建一个插件。为此,我从 Github 克隆了代码并关注了this。我已经设法构建了 grafana,但在运行服务器时遇到了问题。我收到错误

Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath

我确实在issue 发现了这个问题。我已经复制了“sample.ini”并将其重命名为“custom.ini”,并在构建 grafana 后创建的 bin 文件夹中使用了以下命令

.\grafana-server.exe --config D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini

.\grafana-server.exe D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini

.\grafana-server.exe -config D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini

.\grafana-server.exe -config "D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini"

.\grafana-server.exe --config "D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini"

.\grafana-server.exe "D:\Go-UpdatedWorkSpace\grafana\conf\custom.ini"

但他们都没有工作。我仍然收到错误

Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath

我做错了什么?我是 Grafana 开发的新手,任何帮助将不胜感激。

【问题讨论】:

    标签: grafana


    【解决方案1】:

    我已经设法解决了这个问题。我使用以下命令在本地运行 Grafana

     ./grafana-server.exe -config "D:\Go-UpdatedWorkSpace\grafana\conf\defaults.ini" -homepath "D:\Go-UpdatedWorkSpace\grafana".
    

    我在使用 GoLang 构建 grafana 后创建的“bin”文件夹上执行了此命令。 (homepath 目录中还有一个 bin 文件夹,我认为我们可以使用任何“bin”文件夹)。问题是我没有在命令中提供“homepath”。 “homepath”是grafana代码被克隆的目录。

    【讨论】:

      【解决方案2】:

      如果有人在寻找 Mac,下面的工作。我尝试使用 grafana 版本 8.x 。对于默认安装,不需要给 -config 因为 -homepath 应该小心。这可以从任何位置运行。

      /grafana-install-path/bin/grafana-server -homepath /grafana-install-path web 
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-11-30
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-08-25
        • 2015-06-03
        相关资源
        最近更新 更多