pitkley/dfw

dfw failing to start on a Docker Swarm node

Closed this issue · 3 comments

When starting dfw as a local container (i.e. through docker run) on a node that is joined to Docker Swarm, it fails with the following error:

Apr 16 19:12:27.273 ERRO Encountered error, backtrace: , error: Docker Error: invalid type: null, expected a map at line 1 column 364, module: dfw:561

Full log with trace logging enabled (empty config file):

Apr 16 19:37:56.822 DEBG Application starting, firewall_backend: None, started_at: 2021-04-16T19:37:56+0000, version: 1.2.1, module: dfw:547
Apr 16 19:37:56.825 DEBG Initial configuration loaded, config: DFW {
    global_defaults: GlobalDefaults {
        external_network_interfaces: None,
        default_docker_bridge_to_host_policy: Accept,
        custom_tables: None,
    },
    backend_defaults: None,
    initialization: None,
    container_to_container: None,
    container_to_wider_world: None,
    container_to_host: None,
    wider_world_to_container: None,
    container_dnat: None,
}, module: dfw:197
Apr 16 19:37:56.825 TRCE Pinging docker, module: dfw:205
Apr 16 19:37:56.825 TRCE Creating dummy channel, load_interval: 0, module: dfw:221
Apr 16 19:37:56.825 TRCE Monitoring events: true, monitor_events: true, module: dfw:239
Apr 16 19:37:56.825 TRCE Run once: false, run_once: false, module: dfw:243
Apr 16 19:37:56.825 TRCE Dry run: false, dry_run: false, module: dfw:247
Apr 16 19:37:56.825 TRCE Creating process closure according to load mode, load_mode: once, module: dfw:254
Apr 16 19:37:56.826 TRCE Load mode: Some("once"), module: dfw:287
Apr 16 19:37:56.826 INFO Application started, started_at: 2021-04-16T19:37:56+0000, version: 1.2.1, module: dfw:293
Apr 16 19:37:56.826 DEBG Start first processing, module: dfw:298
Apr 16 19:37:56.826 DEBG Got list of containers, containers: [], module: dfw::process:141
Apr 16 19:37:56.827 TRCE Got map of containers, container_map: {}, module: dfw::process:145
Apr 16 19:37:56.829 ERRO Encountered error, backtrace: , error: Docker Error: invalid type: null, expected a map at line 1 column 364, module: dfw:561

Hi @airman604, thank you for reaching out! I have debugged your issue and identified that this is in an incompatibility between the library DFW uses to communicate with Docker, shiplift, and the responses returned by Docker itself. I have opened an issue upstream, until that is fixed (and released) I fear that there is not a whole lot I can do.

Hey @pitkley - makes sense, thanks for a quick response.

It has been a long while, and I'm sorry for that, but this issue should finally be resolved. I just released v1.3.0, which has switched to a different library for interacting with Docker, which should not be affected by the issue you were seeing.

I know it might be a little late for whatever purpose you needed DFW for, I still wanted to let you know, though! 👍