BOSH DNS fails to start reporting error "missing unit in duration"
search cancel

BOSH DNS fails to start reporting error "missing unit in duration"

book

Article ID: 293522

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

Symptoms:
Deployment fails with error
Task 1322 | 20:40:51 | Error: 'nats/47b390c1-91c9-44d6-9b7f-b2939e43625d (0)' is not running after update. Review logs for failed jobs: bosh-dns

bosh-dns.stdout.log reports the following errors and restarts frequently 
[main] 2018/12/17 20:35:49 ERROR - time: missing unit in duration 8
[main] 2018/12/17 20:35:52 ERROR - time: missing unit in duration 8
[main] 2018/12/17 20:36:22 ERROR - time: missing unit in duration 8
[main] 2018/12/17 20:37:02 ERROR - time: missing unit in duration 8

Environment


Cause

A bad configuration in file "/var/vcap/jobs/bosh-dns/config/config.json" results in failure to parse "recursor_timeout" field.  In PAS 2.4 this setting is configurable but must have the correct format. In the example below a user entered "8" with an intent of setting the timeout value to 8 seconds. The correct syntax for this setting is "8s" given BOSH DNS is using https://golang.org/pkg/time/#ParseDuration to parse this configuration.


Resolution

In Operations Manager go to Director Tile -> DNS Config and configure "Recursor Timeout" using the correct format.  Refer to the fields tooltip for more suggestions. In this example a setting fo "8s" will resolve the BOSH DNS startup issue.