#StackBounty: #domain-name-system #linux-networking #java #alpine #dns-over-tcp How to enable DNS over TCP for resolving names on linux

Bounty: 50

How do I configure linux in general to allow dns over tcp?

We discovered today that several different linux servers we use are not able to resolve DNS names with many ip addresses in the response. These response packets would be over 512 bytes, so the server sends back a UDP packet with the truncated bit set. The various processes on the server (in this case, Java, and the nslookup command) simply stop resolving the name at this point. They don’t follow up by making the same request over TCP, is I hear they should.

This part is specific to alpinelinux:
On alpine linux, I can enable dns lookups over TCP by installing the bind-utils package. that makes other programs on the system start properly handling truncated responses by switching to TCP. I don’t know what that particular package is doing to configure this, and I so i’m left with this quesiton:

Bonus question, can this be enabled for just java without changing anything else?

We are seeing this on more than just alpine, though we stumbled upon a package that has this effect on alpine.


Get this bounty!!!

#StackBounty: #go #circleci #alpine #bitbucket-cli CircleCI vs Bitbucket Go Build Issue

Bounty: 50

I’m running a go build command on a golang:1.11-alpine on two separate CI tools. As you can see the commands are exactly the same and the docker image is exactly the same.

For some reason, when I run the compiled executable on an alpine:3.9 docker image, only the bitbucket runs.

For the Circle CI build, I get the following error:

standard_init_linux.go:207: exec user process caused “exec format error”

I was reading online that it might be an architecture issue so I did a file <file> in the terminal and it appears both were compiled the same way. Here is the response I received for both files (identical):

cloud: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped

Circle CI

docker:
  - image: golang:1.11-alpine

steps:
  - checkout
  - run:
      name: Build Go Server
      command: |
        apk add --no-cache git build-base
        export GOPATH="$HOME/go"
        export PATH="$PATH:$GOPATH/bin"
        go get -u github.com/golang/lint/golint@v0.0.0-20190227174305-8f45f776aaf1
        go mod vendor
        golint -set_exit_status $(go list ./... | grep -v /vendor/)
        go test -short $(go list ./... | grep -v /vendor/)
        go build -ldflags="-s -w"

Bitbucket CI

steps:
    - step: &step-test-and-build-go
            name: Test and Build Go Server
            image: golang:1.11-alpine
            script:
                - apk add --no-cache git build-base
                - export GOPATH="$HOME/go"
                - export PATH="$PATH:$GOPATH/bin"
                - go get -u github.com/golang/lint/golint@v0.0.0-20190227174305-8f45f776aaf1
                - go mod vendor
                - golint -set_exit_status $(go list ./... | grep -v /vendor/)
                - go test -short $(go list ./... | grep -v /vendor/)
                - go build -ldflags="-s -w"

Circle CI go env

GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/root/project/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build122963699=/tmp/go-build -gno-record-gcc-switches"

Bitbucket CI go env

GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/opt/atlassian/pipelines/agent/build/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build179086021=/tmp/go-build -gno-record-gcc-switches"

I have cross-posted this question to the CircleCI forum.


Get this bounty!!!

#StackBounty: #linux #linux-networking #vlan #alpine Arbitrary vlan interface name – undocumented configuration?

Bounty: 50

Today i was playing around with ethernet adapters and vlans in Alpine Linux. I tried to give the interfaces arbitrary names.

After looking at the source i had the following example working

Ethernet adapter named lan01 configured as DHCP client and a VLAN on this adapter named lan-test on VLAN ID 100

My /etc/network/interfaces:

auto lo
iface lo inet loopback

auto lan01
iface lan01 inet dhcp
        hostname alpine

auto lan-test
iface lan-test inet static
        vlan-id 100
        vlan-raw-device lan01
        address 10.10.0.1
        netmask 255.255.255.0

ifup and ifdown in Alpine Linux uses busybox.

Nowhere in any documentation i found the option vlan-id. However the vlan-raw-device is found in most documentation/man pages.
So this brings me to the question: Why is this option not documented anywhere?

Some of my guesses:

  • It is old and deprecated thus should not be used anymore
  • It is new and untested.
  • It never got documented properly
  • I just overlooked it many many times in the documentation


Get this bounty!!!