无人机日志存储在哪里?

huangapple go评论84阅读模式
英文:

Where are the drone logs stored?

问题

我正在尝试在我的服务器上安装和配置drone.io,按照Digital Ocean上的一些教程进行操作。然而,当我尝试授权我的帐户(xxx.xxx.:8080/login)时,我得到一个空白的网页,返回的是400状态码。我被重定向到的最终URL看起来像这样:xxx.xxx.xxx.xxx:8080/api/auth/github.com?code=28c9ea949a200523edasdaae&state=V5dsadaKLDQC4MASSMFUH2MLF5ZVSNCWNOIDEQ7JSVR4HLAW7EMGX4NJA%3D%3D%3D%3D

我该如何调试这个失败的问题?我已经成功登录了drone,但我不知道日志存储在哪里。我已经检查了/var/log,但没有找到与drone相关的内容。

通过查看代码,我发现了一些令人难以置信的东西。所有的错误都被忽略了吗?

英文:

I'm trying install and configure drone.io on my server following some tutorials from digital ocean . However when I try to authorize my account (xxx.xxx.:8080/login ) I get a blank webpage which throws with http 400 status code, The final url that I'm redirected to looks like this: xxx.xxx.xxx.xxx:8080/api/auth/github.com?code=28c9ea949a200523edasdaae&state=V5dsadaKLDQC4MASSMFUH2MLF5ZVSNCWNOIDEQ7JSVR4HLAW7EMGX4NJA%3D%3D%3D%3D.

How can I debug why this is failing? I've successfully logged into the drone but I don't know where the logs are stored. I've checked /var/log but couldn't find anything related to drone.

Digging though the code I've found something I can't believe. Are the all errors just ignored?

答案1

得分: 6

你可以按照以下步骤查看容器的日志:

  1. 进入运行drone.io的服务器,并查看容器的ID:

    docker ps -a

  2. 使用以下命令查看容器的日志:

    docker logs -f CONTAINER-ID

如果需要更多信息,请参考Docker文档:
https://docs.docker.com/engine/reference/commandline/logs/

英文:

You can see the log of your container as follow:

Go to the server where drone.io is running, and view the id of the container

docker ps -a

To view the log of your container.

docker logs -f CONTAINER-ID

see the docker documentation for more info.
https://docs.docker.com/engine/reference/commandline/logs/

答案2

得分: 0

我遇到了类似的问题,最后发现是我的 GitHub 应用授权 URL 不正确,或者我使用了错误的 API URL。对于最后一个错误,请确保使用的是 API 文档中的 URL,而不是教程中的 URL(当时教程中的 URL 是错误的)。

英文:

I had a similar issue and in the end it was that my github app authorization url was not the same or that I was using the wrong api url. For that last error make sure you are using the one in the api docs and not the one in the tutorial (it was wrong at the time).

huangapple
  • 本文由 发表于 2015年1月26日 20:24:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/28150077.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定