[1.0.0-rc.1] agent gets invalid character error

Hi all,

I try to test the new 1.0.0-RC1 version, following the docs.

The logs of agent container shows these lines :

{"arch":"arm","error":"invalid character '\u003c' looking for beginning of value","level":"warning","machine":"adaed92f2c43","msg":"runner: cannot get queue item","os":"linux","time":"2018-11-14T23:00:00Z"}
{"arch":"arm","level":"debug","machine":"adaed92f2c43","msg":"runner: polling queue","os":"linux","time":"2018-11-14T23:00:00Z"}

Here are my toughts at this point :

  • I think that invalid character ( ‘<’ in unicode format) is the first character of the response of the request made by the agent : https://drone.myserver.com/rpc/v1/request.
  • I tested with Postman to simulate this POST request, I get this result (HTML response and not expected JSON) :
<html lang=en>
    <head>
        <meta charset=utf-8>
        <meta http-equiv=X-UA-Compatible content="IE=edge">
        <meta name=viewport content="width=device-width,initial-scale=1">
        <link rel=icon href=/favicon.png>
        <title>Drone | Continuous Integration</title>
        <link href=/css/app.184ddb0c.css rel=preload as=style>
        <link href=/js/app.cc3f9a0d.js rel=preload as=script>
        <link href=/js/chunk-vendors.53043314.js rel=preload as=script>
        <link href=/css/app.184ddb0c.css rel=stylesheet>
    </head>
    <body>
        <noscript>
            <strong>We're sorry but Drone does not work properly without JavaScript enabled. Please enable it to continue.</strong>
        </noscript>
        <div id=app></div>
        <script src=/js/chunk-vendors.53043314.js></script>
        <script src=/js/app.cc3f9a0d.js></script>
    </body>
</html>
  • As I reverse-proxy the requests with apache2, I found that the HTTP/2 can be the cause of the error : RPC seems to use HTTP/2 that my apache2 cannot deal. After changing my config, disabling the proxy and access directly to the server container, the error is still there.

What am I missing ?

Thanks for the help !

The most likely root cause for this is that you are running the server in single-machine mode (with DRONE_RUNNER_CAPACITY set). If you are running the server in single-machine mode, it will not accept any connections from the agent. Unset DRONE_RUNNER_CAPACITY in your server configuration.

1 Like

Thanks !

I do not get the error anymore :slight_smile:

I still don’t figure out why nothing happen after the drone server get hooked by github, but at least I’m closer to the end !

b

the pending indicates no agent has picked up your job. I can see you are running an arm agent. maybe you forget to specify the arm architecture in your yaml? you can also pass DRONE_RPC_DEBUG=true to the agent which will surface more errors if it is having connectivity issues.

1 Like

Exactly !

Adding this in .drone.yml worked :

platform:
    os: linux
    arch: arm

Thanks @bradrydzewski !

great, glad it helped!