Ubuntu 19.04 proxy dev fail, "read-only filesystem"

I have a PC running Ubuntu 19.04 with lxd/lxc installed as a snap-package, version 3.0. I’ve tried to set up a proxy-device for a container just like every guide I found told me to, but it’s a no-go. The log-file for a test-container says:

Error: remove localhost:80: read-only file system
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5a3398]

goroutine 1 [running]:
os.(*File).Name(...)
        /snap/go/4098/src/os/file.go:50
net.FileListener(0x0, 0x0, 0x0, 0x0, 0x0)
        /snap/go/4098/src/net/file.go:36 +0x88
main.(*cmdForkproxy).Run(0xc000150248, 0xc0002e9b80, 0xc000143860, 0x6, 0x6, 0x0, 0x0)
        /build/lxd/parts/lxd/go/src/github.com/lxc/lxd/lxd/main_forkproxy.go:352 +0x2de
github.com/spf13/cobra.(*Command).execute(0xc0002e9b80, 0xc000143740, 0x6, 0x6, 0xc0002e9b80, 0xc000143740)
        /build/lxd/parts/lxd/go/src/github.com/spf13/cobra/command.go:826 +0x465
github.com/spf13/cobra.(*Command).ExecuteC(0xc00026ef00, 0xc000265f60, 0x1, 0x1)
        /build/lxd/parts/lxd/go/src/github.com/spf13/cobra/command.go:914 +0x2fc
github.com/spf13/cobra.(*Command).Execute(...)
        /build/lxd/parts/lxd/go/src/github.com/spf13/cobra/command.go:864
main.main()
        /build/lxd/parts/lxd/go/src/github.com/lxc/lxd/lxd/main.go:164 +0xd32

Is this yet another case of snap breaking things or what could be wrong?

What exactly did you add to the container? One thing you should do in all cases is use 127.0.0.1 rather than localhost. In fact recent versions of LXD specifically ban the use of names as that was causing a lot of resolution issues in some scenarios.

This still looks like a bug and something we’ve almost certainly fixed with recent work around the proxy device, which hopefully 3.0.5 will include.

I did actually test with “localhost”, 127.0.0.1 and 0.0.0.0 – none of them changed anything, the result was exactly the same. Also, I did originally try to add a proxy to a container running some software, but this log is with a completely fresh container without any modifications to it at all, other than the proxy-device.

@WereCatf can you post your proxy setup config here please.

Steps to reproduce:

  1. lxc launch ubuntu:19.04 test

  2. install apache inside the container and use port 8010 for it (I already have port 80 in use)

  3. lxc config device add test proxy proxy listen=tcp:127.0.0.1:8010 connect=tcp:127.0.0.1:8010

  4. ???

  5. no worky

    architecture: x86_64
    config:
    image.architecture: amd64
    image.description: ubuntu 19.04 amd64 (release) (20190801)
    image.label: release
    image.os: ubuntu
    image.release: disco
    image.serial: “20190801”
    image.version: “19.04”
    volatile.base_image: 4b6301a6704253ff5e1a12c8521b55d8dcafad30f218b65edcb78ee3e110bf74
    volatile.eth0.host_name: vethB13IGY
    volatile.eth0.hwaddr: 00:16:3e:68:09:54
    volatile.idmap.base: “0”
    volatile.idmap.current: ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000},{“Isuid”:false,“Isgid”:true,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000}]’
    volatile.idmap.next: ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000},{“Isuid”:false,“Isgid”:true,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000}]’
    volatile.last_state.idmap: ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000},{“Isuid”:false,“Isgid”:true,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000}]’
    volatile.last_state.power: RUNNING
    devices:
    proxy:
    connect: tcp:127.0.0.1:8010
    listen: tcp:127.0.0.1:8010
    type: proxy
    ephemeral: false
    profiles:

    • default
      stateful: false
      description: “”

Can you show snap list?