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

oCIS server is not starting when IPV6 is enabled #2300

Closed
erwinpalma opened this issue Jul 14, 2021 · 9 comments · Fixed by #2698
Closed

oCIS server is not starting when IPV6 is enabled #2300

erwinpalma opened this issue Jul 14, 2021 · 9 comments · Fixed by #2698
Labels
Category:Defect Existing functionality is not working as expected Priority:p3-medium Normal priority Type:Bug

Comments

@erwinpalma
Copy link
Contributor

erwinpalma commented Jul 14, 2021

Describe the bug

The ocis server is not starting using environment the variables, PROXY_HTTP_ADDR=0.0.0.0:9200 OCIS_URL=https://odin:9200 ./ocis server

Steps to reproduce

Steps to reproduce the behavior:

  1. Download the file curl https://download.owncloud.com/ocis/ocis/1.9.0/ocis-1.9.0-darwin-amd64 --output ocis
  2. Run the ocis server with the following information PROXY_HTTP_ADDR=0.0.0.0:9200 OCIS_URL=https://odin:9200 ./ocis server

Note: replace "odin" for your servername

Expected behavior

The server must start

Actual behavior

After running the server I get the following errors:

I notice that there is one error "too many colons in address"

{"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9149","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"settings","transport":"http","addr":"0.0.0.0:9190","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"onlyoffice","time":"2021-07-14T10:42:01+02:00","message":"Continue without config"}
{"level":"info","service":"idp","transport":"http","addr":"0.0.0.0:9130","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"onlyoffice","transport":"http","addr":"0.0.0.0:9220","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"onlyoffice","transport":"debug","addr":"0.0.0.0:9224","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9179","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"ocs","transport":"http","addr":"0.0.0.0:9110","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"host info: Cesars-MacBook-Pro.local"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"running on 8 cpus"}
{"level":"info","service":"webdav","transport":"http","addr":"0.0.0.0:9115","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"webdav","transport":"debug","addr":"0.0.0.0:9119","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"host info: Cesars-MacBook-Pro.local"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"running on 8 cpus"}
{"level":"info","service":"ocs","transport":"debug","addr":"0.0.0.0:9114","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","pkg":"grace","time":"2021-07-14T10:42:01+02:00","message":"pidfile saved at: /var/folders/x_/_nhcq8vd7539qf3z3215s8jc0000gn/T/revad--fc29fe11-a5d8-4cd9-9cb4-c5e2ff5ae4b9.pid"}
{"level":"warn","service":"idp","time":"2021-07-14T10:42:01+02:00","message":"missing --encryption-secret parameter, using random encyption secret with 32 bytes"}
{"level":"info","service":"thumbnails","transport":"grpc","addr":"0.0.0.0:9185","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"warn","service":"idp","alg":"PS256","time":"2021-07-14T10:42:01+02:00","message":"missing --signing-private-key parameter, using random 2048 bit signing key"}
{"level":"info","service":"graph-explorer","time":"2021-07-14T10:42:01+02:00","message":"Continue without config"}
{"level":"info","service":"storage","pkg":"rgrpc","time":"2021-07-14T10:42:01+02:00","message":"rgrpc: grpc service enabled: publicstorageprovider"}
{"level":"info","service":"storage","pkg":"rgrpc","time":"2021-07-14T10:42:01+02:00","message":"rgrpc: grpc service enabled: authprovider"}
{"level":"info","service":"storage","pkg":"rgrpc","time":"2021-07-14T10:42:01+02:00","message":"grpc server listening at tcp:0.0.0.0:9178"}
{"level":"info","service":"graph-explorer","transport":"http","addr":"0.0.0.0:9135","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"graph-explorer","transport":"debug","addr":"0.0.0.0:9136","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"thumbnails","transport":"debug","addr":"0.0.0.0:9189","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","pkg":"grace","time":"2021-07-14T10:42:01+02:00","message":"pidfile saved at: /var/folders/x_/_nhcq8vd7539qf3z3215s8jc0000gn/T/revad--820a2fb8-0a9d-4334-b5d9-cd093b98b9b8.pid"}
{"level":"info","service":"onlyoffice","server":"http","time":"2021-07-14T10:42:01+02:00","message":"Shutting down server"}
{"level":"info","service":"webdav","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Shutting down server"}
{"level":"info","service":"storage","pkg":"rgrpc","time":"2021-07-14T10:42:01+02:00","message":"rgrpc: grpc service enabled: authprovider"}
{"level":"info","service":"storage","pkg":"rgrpc","time":"2021-07-14T10:42:01+02:00","message":"grpc server listening at tcp:0.0.0.0:9148"}
{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc001105c20)}' (1.000000 failures of 5.000000), restarting: true, error: address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9220: too many colons in address","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc00104c280)}' (1.999998 failures of 5.000000), restarting: true, error: address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9115: too many colons in address","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"webdav","transport":"http","addr":"0.0.0.0:9115","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9217","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"ocs","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Shutting down server"}
{"level":"info","service":"webdav","transport":"debug","addr":"0.0.0.0:9119","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc00110b600)}' (2.999984 failures of 5.000000), restarting: true, error: address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9110: too many colons in address","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"registering external service com.owncloud.storage.metadata-1a1f14f6-8b07-45ec-9160-f045127757d1@0.0.0.0:9215"}
{"level":"info","service":"onlyoffice","time":"2021-07-14T10:42:01+02:00","message":"Continue without config"}
{"level":"info","service":"ocs","transport":"http","addr":"0.0.0.0:9110","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"graph","time":"2021-07-14T10:42:01+02:00","message":"Continue without config"}
{"level":"info","service":"ocs","transport":"debug","addr":"0.0.0.0:9114","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"ocs","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Shutting down server"}
{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc00110b600)}' (3.999940 failures of 5.000000), restarting: true, error: listen tcp 0.0.0.0:9110: bind: address already in use","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"ocs","transport":"http","addr":"0.0.0.0:9110","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"store","transport":"grpc","addr":"","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"ocs","transport":"debug","addr":"0.0.0.0:9114","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"onlyoffice","transport":"http","addr":"0.0.0.0:9220","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"onlyoffice","transport":"debug","addr":"0.0.0.0:9224","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"graph","transport":"http","addr":"0.0.0.0:9120","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"host info: Cesars-MacBook-Pro.local"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"running on 8 cpus"}
{"level":"info","service":"graph","transport":"debug","addr":"0.0.0.0:9124","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"web","transport":"http","addr":"0.0.0.0:9100","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"ocs","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Shutting down server"}
{"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9145","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc00110b600)}' (4.999621 failures of 5.000000), restarting: true, error: listen tcp 0.0.0.0:9110: bind: address already in use","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"ocs","transport":"http","addr":"0.0.0.0:9110","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"ocs","transport":"debug","addr":"0.0.0.0:9114","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"graph","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Shutting down server"}
{"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9156","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"ocis","event":"ocis: Entering the backoff state.","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc001035a40)}' (5.999523 failures of 5.000000), restarting: false, error: address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9120: too many colons in address","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"host info: Cesars-MacBook-Pro.local"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"running on 8 cpus"}
{"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9159","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9143","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"host info: Cesars-MacBook-Pro.local"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"registering external service com.owncloud.storage-58fa6fc1-d0d6-48a5-88d6-3984d72d24f9@0.0.0.0:9142"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"host info: Cesars-MacBook-Pro.local"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"running on 8 cpus"}
{"level":"info","service":"onlyoffice","server":"http","time":"2021-07-14T10:42:01+02:00","message":"Shutting down server"}
{"level":"info","service":"ocis","event":"ocis: Entering the backoff state.","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc001105c20)}' (6.999432 failures of 5.000000), restarting: false, error: address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9220: too many colons in address","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"webdav","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Shutting down server"}
{"level":"info","service":"ocis","event":"ocis: Entering the backoff state.","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc00104c280)}' (7.999416 failures of 5.000000), restarting: false, error: address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9115: too many colons in address","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"running on 8 cpus"}
{"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9161","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"host info: Cesars-MacBook-Pro.local"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"running on 8 cpus"}
{"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9147","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"host info: Cesars-MacBook-Pro.local"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"running on 8 cpus"}
{"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9141","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"host info: Cesars-MacBook-Pro.local"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"running on 8 cpus"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"host info: Cesars-MacBook-Pro.local"}
{"level":"info","service":"storage","time":"2021-07-14T10:42:01+02:00","message":"running on 8 cpus"}
{"level":"info","service":"web","transport":"debug","addr":"0.0.0.0:9104","time":"2021-07-14T10:42:01+02:00","message":"starting server"}
{"level":"error","service":"graph-explorer","error":"address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9135: too many colons in address","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Failed to start server"}
{"level":"info","service":"graph-explorer","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Shutting down server"}
{"level":"info","service":"ocis","event":"ocis: Entering the backoff state.","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc0010bcc80)}' (8.995594 failures of 5.000000), restarting: false, error: address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9135: too many colons in address","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"error","service":"web","error":"address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9100: too many colons in address","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Failed to start server"}
{"level":"info","service":"web","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Shutting down server"}
{"level":"info","service":"ocis","event":"ocis: Entering the backoff state.","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"storage","pkg":"grace","time":"2021-07-14T10:42:01+02:00","message":"pidfile saved at: /var/folders/x_/_nhcq8vd7539qf3z3215s8jc0000gn/T/revad--38f6d47e-8fdd-4777-9a3e-41b021c49f04.pid"}

Setup

  • macOsc BigSur
  • ocis-1.9.0-darwin-amd64

Additional context

Add any other context about the problem here.

@erwinpalma erwinpalma added this to the 2021_July milestone Jul 14, 2021
@butonic
Copy link
Member

butonic commented Jul 17, 2021

@refs hmm suture service: too many colons in address seems to about an ipv6 address:
suture?

{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc001105c20)}' (1.000000 failures of 5.000000), restarting: true, error: address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9220: too many colons in address","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}
{"level":"info","service":"ocis","event":"ocis: Failed service 'command.SutureService{cfg:(*config.Config)(0xc00104c280)}' (1.999998 failures of 5.000000), restarting: true, error: address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9115: too many colons in address","time":"2021-07-14T10:42:01+02:00","message":"supervisor: ocis"}

graph explorer

{"level":"error","service":"graph-explorer","error":"address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9135: too many colons in address","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Failed to start server"}

web

{"level":"error","service":"web","error":"address fde2:8acd:e9d3:0:64:a23d:3006:dcbe:9100: too many colons in address","transport":"http","time":"2021-07-14T10:42:01+02:00","message":"Failed to start server"}

@refs
Copy link
Member

refs commented Jul 17, 2021

Yeah, known, disable ipv6 :/

@butonic
Copy link
Member

butonic commented Jul 17, 2021

@refs Do we have an issue or is this now the official ipv6 is not supported issue?

@refs
Copy link
Member

refs commented Jul 17, 2021

It was there since day 0, just not reported. I'll dig into it, it might be go micro

@jvillafanez
Copy link
Member

This should be fixed with the go-micro update to 3.6.0 I think. Maybe @erwinpalma can retry with a newer ocis release to confirm.

@wkloucek
Copy link
Contributor

Is still the case with the latest oCIS from master :-/

@wkloucek
Copy link
Contributor

   sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
   sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
   sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

works as a workaround

@wkloucek wkloucek added Category:Defect Existing functionality is not working as expected Priority:p3-medium Normal priority labels Sep 25, 2021
@wkloucek wkloucek changed the title The ocis server is not starting using environment variables oCIS server is not starting when IPV6 is enabled Sep 27, 2021
@wkloucek
Copy link
Contributor

IPV6 is actually working pretty well.

One can run oCIS with #2612 or later on a machine with IPv6 by setting following environment variables:

OCIS_URL=https://[2a01:4f8:c0c:c1cb::1]:9200 // your IPv6 address or hostname
PROXY_HTTP_ADDR=[2a01:4f8:c0c:c1cb::1]:9200 // your IPv6 address

and then run oCIS ./ocis server.
You can now access oCIS on https://[2a01:4f8:c0c:c1cb::1]:9200 (your IPv6 or hostname).

But the problem of binding to all interfaces is still broken in go-micro:

package main

import (
	"fmt"
	"net/http"

	httpServer "github.com/asim/go-micro/plugins/server/http/v3"
	"github.com/asim/go-micro/v3"
	"github.com/asim/go-micro/v3/server"
)

func main() {
	srv := httpServer.NewServer(
		server.Name("helloworld"),
	)

	mux := http.NewServeMux()
	mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		w.Write([]byte(`hello world`))
	})

	hd := srv.NewHandler(mux)

	srv.Handle(hd)

	service := micro.NewService(
		micro.Server(srv),
		micro.Address("[::]:65432"),
	)
	service.Init()
	err := service.Run()
	if err != nil {
		fmt.Println(err.Error())
		return
	}

}

It gives me:

2021-10-13 16:24:02  file=v3@v3.6.1-0.20210924081004-8c39b1e1204d/service.go:206 level=info Starting [service] helloworld
2021-10-13 16:24:02  file=v3@v3.0.0-20210812172626-c7195aae9817/http.go:255 level=info Listening on [::]:65432
2021-10-13 16:24:02  file=v3@v3.0.0-20210812172626-c7195aae9817/http.go:169 level=info Registering node: helloworld-240d051d-a0cb-49fa-8cf5-4fc19bf19512
address ::1:65432: too many colons in address

@wkloucek
Copy link
Contributor

I created a demo project https://github.com/wkloucek/go-micro-test and created an issue go-micro/go-micro#2308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Defect Existing functionality is not working as expected Priority:p3-medium Normal priority Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants