Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcp #3

Open
morgoved opened this issue Oct 16, 2018 · 0 comments
Open

tcp #3

morgoved opened this issue Oct 16, 2018 · 0 comments

Comments

@morgoved
Copy link

i can't send to tcp, i have graylog in cluster and I can't balance udp connection.
I get the following error.

8d5kprk@efp-swr-nd-s1.efp | # routes :
logspout_logspout.0.xjj868d5kprk@efp-swr-nd-s1.efp | # ADAPTER ADDRESS CONTAINERS SOURCES OPTIONS
logspout_logspout.0.xjj868d5kprk@efp-swr-nd-s1.efp | # multiline+gelf 172.17.70.150:12201 map[]
logspout_logspout.0.xjj868d5kprk@efp-swr-nd-s1.efp | 2018/10/16 12:05:59 Graylog: write udp 172.19.0.3:34834->172.17.70.150:12201: write: connection refused
logspout_logspout.0.xjj868d5kprk@efp-swr-nd-s1.efp | 2018/10/16 12:05:59 Graylog: write udp 172.19.0.3:34834->172.17.70.150:12201: write: connection refused

I tried it change udp to tcp in gelf.go, but it did not bring results.

Could you tell me how to solve my problem?

docker-compose.yml

version: '3'
services:
logspout:
build: ./
image: reg.efp:5000/logspout:gelf
volumes:
- /etc/hostname:/etc/host_hostname:ro
- /var/run/docker.sock:/var/run/docker.sock
environment:
- LOGSPOUT_MULTILINE=true
ports:
- "17000:80"
command: multiline+gelf://172.17.70.150:12201
restart: unless-stopped
deploy:
mode: global

Dockerfile

WORKDIR /go/src/github.com/gliderlabs/logspout
FROM golang:alpine as build
MAINTAINER timo.taskinen@vincit.fi
LABEL maintainer "timo.taskinen@vincit.fi"
ENV LOGSPOUT_VERSION=3.2.5
ENV LOGSPOUT_DOWNLOAD_SHA256=22a8f1fbce7298c16b6ab7401216d8bf4c3b7dc710889371d434a123d5d4d0a2
RUN mkdir -p /go/src
WORKDIR /go/src
VOLUME /mnt/routes
EXPOSE 80

RUN apk --no-cache add curl git gcc musl-dev
RUN curl -fSL -o logspout.tar.gz "https://github.com/gliderlabs/logspout/archive/v${LOGSPOUT_VERSION}.tar.gz"
&& echo "$LOGSPOUT_DOWNLOAD_SHA256 *logspout.tar.gz" | sha256sum -c -
&& tar -zxvf logspout.tar.gz
&& rm logspout.tar.gz
&& mkdir -p /go/src/github.com/gliderlabs/
&& mv logspout-${LOGSPOUT_VERSION} /go/src/github.com/gliderlabs/logspout

WORKDIR /go/src/github.com/gliderlabs/logspout
RUN echo 'import ( _ "github.com/morgoved/logspout-gelf-tcp-fork" )' >> /go/src/github.com/gliderlabs/logspout/modules.go
RUN go get -d -v ./...
RUN go build -v -ldflags "-X main.Version=$(cat VERSION)" -o ./bin/logspout

FROM alpine:latest
COPY --from=build /go/src/github.com/gliderlabs/logspout/bin/logspout /go/bin/logspout
ENTRYPOINT ["/go/bin/logspout"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant