maubot / gitlab

A GitLab client and webhook receiver for maubot.
GNU Affero General Public License v3.0
95 stars 30 forks source link

Cannot run docker #24

Closed ifi-milan closed 5 years ago

ifi-milan commented 5 years ago

I've tried to follow the readme and issues/chat and cannot seem to start docker:

''' # matrix at chat.mySecondLevelDomain.com in /opt/gitlab on git:master ● [16:32:59] → ls -la total 120 drwxr-xr-x 4 root root 4096 Oct 23 14:49 . drwxr-xr-x 3 root root 4096 Oct 23 09:52 .. -rw-r--r-- 1 root root 1344 Oct 23 09:52 command-handler.go -rw-r--r-- 1 root root 12336 Oct 23 09:52 commands.go -rw-r--r-- 1 root root 1723 Oct 23 09:52 config.go -rw-r--r-- 1 root root 315 Oct 23 09:55 config.json -rw-r--r-- 1 root root 636 Oct 23 09:52 Dockerfile -rw-r--r-- 1 root root 274 Oct 23 09:52 example-config.json drwxr-xr-x 8 root root 4096 Oct 23 09:52 .git -rw-r--r-- 1 root root 24 Oct 23 09:52 .gitignore -rw-r--r-- 1 root root 2089 Oct 23 09:52 gitlab-auth.go -rw-r--r-- 1 root root 8185 Oct 23 09:52 gitlab-webhook.go -rw-r--r-- 1 root root 3062 Oct 23 09:52 Gopkg.lock -rw-r--r-- 1 root root 952 Oct 23 09:52 Gopkg.toml -rw-r--r-- 1 root root 32472 Oct 23 09:52 LICENSE -rw-r--r-- 1 root root 2479 Oct 23 09:52 matrix.go -rw-r--r-- 1 root root 1731 Oct 23 09:52 maulabbot.go -rw-r--r-- 1 root root 2039 Oct 23 09:52 README.md drwxr-xr-x 7 root root 4096 Oct 23 09:52 vendor

# matrix at chat.mySecondLevelDomain.com in /opt/gitlab on git:master ● [16:33:05] → cat config.json { "webhook": { "listen": ":29313", "path": "/webhooks", "secret": "" }, "gitlab": { "domain": "https://gitlab.org" }, "matrix": { "homeserver": "https://matrix.mySecondLevelDomain.com", "username": "", "password": "" }, "options": { "irc-compatibility": false } }

# matrix at chat.mySecondLevelDomain.com in /opt/gitlab on git:master ● [16:33:13] → sudo docker pull docker.io/maubot/gitlab:latest latest: Pulling from maubot/gitlab Digest: sha256:8b9de2a26819f30888e15e760f67f7f92e4e1b2d2ecf42f4941b4680666a0ec3 Status: Image is up to date for maubot/gitlab:latest

# matrix at chat.mySecondLevelDomain.com in /opt/gitlab on git:master ● [16:33:25] → sudo docker run --restart unless-stopped --name=gitlab --expose 29313 -v pwd:/etc/maulabbot:z docker.io/maubot/gitlab:latest panic: Missing parameter: password

goroutine 1 [running]: main.startMatrix(0x7ffe804dcf4d) /go/src/maubot.xyz/gitlab/matrix.go:34 +0x6aa main.main() /go/src/maubot.xyz/gitlab/maulabbot.go:52 +0x1ba

# matrix at chat..com in /opt/gitlab on git:master ● [16:33:39] → ''' On the same server I have matrix running, riot and dimension (dimension is in a docker). The gitlabbot container seem to be in a constant restart state:

''' # matrix at chat.mySecondLevelDomain.com in /opt/gitlab on git:master ● [16:40:17] → sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1937f32bfc7e maubot/gitlab:latest "/usr/bin/maulabbot …" 6 minutes ago Restarting (2) 56 seconds ago gitlab f516f3d6f5ee turt2live/matrix-dimension "/bin/bash" 9 days ago Up 4 days 127.0.0.1:8184->8184/tcp dimension

# matrix at chat.mySecondLevelDomain.com in /opt/gitlab on git:master ● [16:40:26] → netstat -plntu (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:8008 0.0.0.0: LISTEN -
tcp 0 0 127.0.0.1:44841 0.0.0.0:
LISTEN -
tcp 0 0 0.0.0.0:80 0.0.0.0: LISTEN -
tcp 0 0 127.0.0.53:53 0.0.0.0:
LISTEN -
tcp 0 0 127.0.0.1:8184 0.0.0.0: LISTEN -
tcp 0 0 127.0.0.1:5432 0.0.0.0:
LISTEN -
tcp 0 0 0.0.0.0:443 0.0.0.0: LISTEN -
tcp 0 0 0.0.0.0:2209 0.0.0.0:
LISTEN -
tcp6 0 0 :::80 ::: LISTEN -
tcp6 0 0 :::8090 :::
LISTEN -
tcp6 0 0 :::443 ::: LISTEN -
tcp6 0 0 :::2209 :::
LISTEN -
udp 0 0 127.0.0.53:53 0.0.0.0:* -

# matrix at chat.mySecondLevelDomain.com in /opt/gitlab on git:master ● [16:40:44] → '''

Did I do something wrong here? Do I miss anything?

ifi-milan commented 5 years ago

So, I've managed to run my docker instance, but now getting the following response on Gitlab when I create a test push event:

Hook execution failed: SSL_connect returned=1 errno=0 state=error: wrong version number

SSL verification is turned off (although, I have valid certificates on my server).

tulir commented 5 years ago

That looks like you're trying to connect with https to a plain http port. Setup mistakes are easier to debug in chat than github issues.

Anyway, the bot has been rewritten to be a maubot plugin. The room for maubot is #maubot:maunium.net