Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSConfigAgent error: unexpected end of JSON input #448

Open
Kamui123 opened this issue Nov 9, 2022 · 2 comments
Open

OSConfigAgent error: unexpected end of JSON input #448

Kamui123 opened this issue Nov 9, 2022 · 2 comments

Comments

@Kamui123
Copy link

Kamui123 commented Nov 9, 2022

Hi,

Error from OSConfigAgent apears in gcp kubernetes cluster logs. It dosen't seem to have any consequances but i would like to know what it means and how to fix it.

{
  "insertId": "1trnnuben6xjv",
  "jsonPayload": {
    "localTimestamp": "2022-11-09T08:08:03.5535Z",
    "message": "unexpected end of JSON input",
    "omitempty": null
  },
  "resource": {
    "type": "gce_instance",
    "labels": {
      "instance_id": "1817953333370559090",
      "zone": "europe-west3-c",
      "project_id": "<project_id>"
    }
  },
  "timestamp": "2022-11-09T08:08:03.567235217Z",
  "severity": "ERROR",
  "labels": {
    "instance_name": "<instance_name>",
    "agent_version": "20210607.00"
  },
  "logName": "projects/<project_id>/logs/OSConfigAgent",
  "sourceLocation": {
    "file": "main.go",
    "line": "196",
    "function": "main.runTaskLoop"
  },
  "receiveTimestamp": "2022-11-09T08:08:04.913015193Z"
}
@khaledxmust
Copy link

I've the same error along with consequences, if you managed to solve it please contact me.

@arekkusu
Copy link

arekkusu commented Sep 8, 2023

OSConfigAgent periodically contacts the Metadata server. The error message "unexpected end of JSON input" indicates there was an error when contacting the Metadata server and/or it returned unexpected data. In most cases the agent will simply reply on cached data and this will have no impact.

If this error occurs only infrequently (e.g. less than once per 24h per instance) then it's very likely to be temporary failure and does not indicate an actual issue with the instance or the OS Config Agent.

If it does happen frequently then it could indicate a more general issue with the VM / OS Config Agent not being able to contact the Metadata server. In that case this should be investigated further. If you have a support package please feel free to contact GCP support for assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants