Caddy: v2: Http_ntlm option resulting in runtime error

Created on 5 Mar 2020  路  1Comment  路  Source: caddyserver/caddy

  1. My Caddy version (caddy version):
    20200304.7

  2. How I run Caddy:
    a. System environment:
    Debian as an LXC container under Proxmox, also tested with a VM under proxmox

d. My complete Caddyfile or JSON config:

starrsfamily.com {

reverse_proxy 10.99.99.181:443 {

header_up Host {http.reverse_proxy.upstream.hostport}

transport http_ntlm {
tls_insecure_skip_verify
}

}

}
  1. The problem I鈥檓 having:
    Caddy is failing to start, it throws an error message

  2. Error messages and/or full log output:

> 2020/03/05 02:18:52.595 INFO    using adjacent Caddyfile
> panic: runtime error: invalid memory address or nil pointer dereference
> [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb38666]
> 
> goroutine 1 [running]:
> github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.(*HTTPTransport).UnmarshalCaddyfile(0x0, 0xc000085dd0, 0x0, 0x0)
>         /Users/matt/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/reverseproxy/caddyfile.go:616 +0xf06
> github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.(*Handler).UnmarshalCaddyfile(0xc0000b8a00, 0xc000085d70, 0x3, 0x193f2ca)
>         /Users/matt/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/reverseproxy/caddyfile.go:496 +0xde1
> github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.parseCaddyfile(0xc000085d70, 0xc000085b90, 0xc00009a380, 0xc000085d40, 0xc00067fd90, 0x1, 0x1, 0xc00009a340, 0x1, 0x1, ...)
>         /Users/matt/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/reverseproxy/caddyfile.go:41 +0x4e
> github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.RegisterHandlerDirective.func1(0xc000085d70, 0xc000085b90, 0xc00009a380, 0xc000085d40, 0xc00067fd90, 0x1, 0x1, 0xc00009a340, 0x1, 0x1, ...)
>         /Users/matt/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/caddyconfig/httpcaddyfile/directives.go:104 +0x22b
> github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.ServerType.Setup(0xc00006d500, 0x2, 0x2, 0xc000085b90, 0xc00009a360, 0x1, 0x1, 0x0, 0x0, 0x0)
>         /Users/matt/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/caddyconfig/httpcaddyfile/httptype.go:136 +0x3bf0
> github.com/caddyserver/caddy/v2/caddyconfig/caddyfile.Adapter.Adapt(0x1234b80, 0x1a33d08, 0xc00067c380, 0x14c, 0x34c, 0xc000085b90, 0xc0003366c0, 0x6400000000fec480, 0xc00073f828, 0x643c68b7ef615a72, ...)
>         /Users/matt/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/caddyconfig/caddyfile/adapter.go:49 +0x139
> github.com/caddyserver/caddy/v2/cmd.loadConfig(0x1045f77, 0x9, 0x0, 0x0, 0xc00010c7f8, 0xc0003ce820, 0xd0, 0xd0, 0xf9a020, 0x30)
>         /Users/matt/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/cmd/main.go:160 +0x27f
> github.com/caddyserver/caddy/v2/cmd.cmdRun(0xc00006c7e0, 0x0, 0x0, 0x0)
>         /Users/matt/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/cmd/commandfuncs.go:174 +0x8f1
> github.com/caddyserver/caddy/v2/cmd.Main()
>         /Users/matt/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/cmd/main.go:72 +0x23e
> main.main()
>         /Users/matt/Downloads/Downloads/caddytest/main.go:37 +0x20
> start: caddy process exited with error: exit status 2
bug

Most helpful comment

I believe I've fixed it in PR #3120. Can you test with one of the pre-built binaries from Azure?

https://dev.azure.com/mholt-dev/Caddy/_build/results?buildId=916&view=artifacts&type=publishedArtifacts

>All comments

I believe I've fixed it in PR #3120. Can you test with one of the pre-built binaries from Azure?

https://dev.azure.com/mholt-dev/Caddy/_build/results?buildId=916&view=artifacts&type=publishedArtifacts

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xfzka picture xfzka  路  3Comments

muhammadmuzzammil1998 picture muhammadmuzzammil1998  路  3Comments

mschneider82 picture mschneider82  路  3Comments

kilpatty picture kilpatty  路  3Comments

lorddaedra picture lorddaedra  路  3Comments