Error: trust: malformed cache: unexpected end of JSON input

After I have restarted my machine I get next error:

root@ubuntu:/storj2# docker exec -it storagenode2 /app/dashboard.sh
Error response from daemon: Container 3b539adecc10c3f34a9bbb3a2f4a7f5cd110bc75731c33672140452a3bd6a18 is restarting, wait until the container is running

The logs show me an error:
Error: trust: malformed cache: unexpected end of JSON input
What to do?

Does you trust-cache.json file look corrupted? Sounds like the error to my guess

trust-cache.json is empty. I also have another file trust-cache.json680442827 that has content.

I suppose empty might be the same as unexpected end…I’d try moving it, but maybe wait for someone who REALLY knows

Here’s mine

{
  "entries": {
    "https://tardigrade.io/trusted-satellites": [
      {
        "SatelliteURL": {
          "id": "12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S",
          "host": "us-central-1.tardigrade.io",
          "port": 7777
        },
        "authoritative": true
      },
      {
        "SatelliteURL": {
          "id": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs",
          "host": "europe-west-1.tardigrade.io",
          "port": 7777
        },
        "authoritative": true
      },
      {
        "SatelliteURL": {
          "id": "121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6",
          "host": "asia-east-1.tardigrade.io",
          "port": 7777
        },
        "authoritative": true
      },
      {
        "SatelliteURL": {
          "id": "118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW",
          "host": "satellite.stefan-benten.de",
          "port": 7777
        },
        "authoritative": false
      },
      {
        "SatelliteURL": {
          "id": "1wFTAgs9DP5RSnCqKV1eLf6N9wtk4EAtmN5DpSxcs8EjT69tGE",
          "host": "saltlake.tardigrade.io",
          "port": 7777
        },
        "authoritative": true
      },
      {
        "SatelliteURL": {
          "id": "12rfG3sh9NCWiX3ivPjq2HtdLmbqCrvHVEzJubnzFzosMuawymB",
          "host": "europe-north-1.tardigrade.io",
          "port": 7777
        },
        "authoritative": true
      }
    ]
  }
}

Here is my:
root@ubuntu:/storj2# cat trust-cache.json680442827
{
“entries”: {
https://tardigrade.io/trusted-satellites”: [
{
“SatelliteURL”: {
“id”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”,
“host”: “us-central-1.tardigrade.io”,
“port”: 7777
},
“authoritative”: true
},
{
“SatelliteURL”: {
“id”: “12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs”,
“host”: “europe-west-1.tardigrade.io”,
“port”: 7777
},
“authoritative”: true
},
{
“SatelliteURL”: {
“id”: “121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6”,
“host”: “asia-east-1.tardigrade.io”,
“port”: 7777
},
“authoritative”: true
},
{
“SatelliteURL”: {
“id”: “118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW”,
“host”: “satellite.stefan-benten.de”,
“port”: 7777
},
“authoritative”: false
},
{
“SatelliteURL”: {
“id”: “1wFTAgs9DP5RSnCqKV1eLf6N9wtk4EAtmN5DpSxcs8EjT69tGE”,
“host”: “saltlake.tardigrade.io”,
“port”: 7777
},
“authoritative”: true
},
{
“SatelliteURL”: {
“id”: “12rfG3sh9NCWiX3ivPjq2HtdLmbqCrvHVEzJubnzFzosMuawymB”,
“host”: “europe-north-1.tardigrade.io”,
“port”: 7777
},
“authoritative”: true
}
]
}
}

Should I write this content in trust-cache.json?

Try just renaming the file. I’m pretty sure the node will recreate it.

root@raspberrypi3:/data2/data1# docker stop -t 300 storagenode1
storagenode1
root@raspberrypi3:/data2/data1# docker rm storagenode1
storagenode1
root@raspberrypi3:/data2/data1# mv trust-cache.json trust-cache.json1
root@raspberrypi3:/data2/data1# touch trust-cache.json
root@raspberrypi3:/data2/data1# ~/go1.sh
ac6c1e86d8a613a2f8b0324b3d9fcb7f35b8d996ff467c8ef562cedf02f681cc
root@raspberrypi3:/data2/data1# docker logs storagenode1
2020-07-14T16:20:09.923Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:09.994Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:09.995Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:12.515Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:12.519Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:12.519Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:15.033Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:15.056Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:15.056Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
root@raspberrypi3:/data2/data1#
root@raspberrypi3:/data2/data1# mv trust-cache.json1 trust-cache.json
root@raspberrypi3:/data2/data1# docker logs storagenode1
2020-07-14T16:20:09.923Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:09.994Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:09.995Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:12.515Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:12.519Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:12.519Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:15.033Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:15.056Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:15.056Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:17.611Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:17.615Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:17.615Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:20.055Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:20.059Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:20.059Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:23.230Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:23.234Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:23.234Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:28.099Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:28.103Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:28.104Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
root@raspberrypi3:/data2/data1# docker logs storagenode1
2020-07-14T16:20:09.923Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:09.994Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:09.995Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:12.515Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:12.519Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:12.519Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:15.033Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:15.056Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:15.056Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:17.611Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:17.615Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:17.615Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:20.055Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:20.059Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:20.059Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:23.230Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:23.234Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:23.234Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:28.099Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:28.103Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:28.104Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
Error: trust: malformed cache: unexpected end of JSON input
2020-07-14T16:20:36.294Z INFO Configuration loaded {“Location”: “/app/config/config.yaml”}
2020-07-14T16:20:36.298Z INFO Operator email {“Address”: “andrew2.hart@gmail.com”}
2020-07-14T16:20:36.298Z INFO Operator wallet {“Address”: “0x8aa7030dD43fB1E7CC58B4353a31d438365Ae11D”}
2020-07-14T16:20:37.239Z INFO Telemetry enabled
2020-07-14T16:20:37.372Z INFO db.migration Database Version {“version”: 42}
2020-07-14T16:20:37.969Z INFO preflight:localtime start checking local system clock with trusted satellites’ system clock.
2020-07-14T16:20:38.947Z INFO preflight:localtime local system clock is in sync with trusted satellites’ system clock.
2020-07-14T16:20:38.950Z INFO Node 12GWbAPykRbxy1AjpbQdUdVyHpsPFcfZs632AiEGBJFxznQLEvc started
2020-07-14T16:20:38.950Z INFO Public server started on [::]:28967
2020-07-14T16:20:38.950Z INFO Private server started on 127.0.0.1:7778
2020-07-14T16:20:38.948Z INFO bandwidth Performing bandwidth usage rollups
2020-07-14T16:20:38.958Z INFO trust Scheduling next refresh {“after”: “5h46m33.846765417s”}
root@raspberrypi3:/data2/data1#

Looks like it works to me.