Kennedy Ho
Kennedy Ho

Reputation: 73

Error with golang.org/x/net/websocket when "go get collidermain" --- AppRTC deployment on Ubuntu 14.04 server

I have been trying to deploy the AppRTC onto my school’s Ubuntu server but to no avail. I have followed the instructions on the Collider part until the command “go get collidermain” which return me with error as follow:

# golang.org/x/net/websocket
goWorkspace/src/golang.org/x/net/websocket/dial.go:18:19: error: reference to undefined identifier ‘tls.DialWithDialer’
   conn, err = tls.DialWithDialer(dialer, "tcp", parseAuthority(config.Location), config.TlsConfig)

I have no idea what causes the error and even though I have reinstalled multiple versions of Go (1.7.4, 1.6.4, 1.6.3, 1.6.) but I still get the same error at “go get collidermain”.

Anyone of you face this problem in deploying AppRTC? I'm hoping any kind souls who know the answer to this can help me with my problem. Thank you very much.

Upvotes: 0

Views: 1696

Answers (1)

Androina Yang
Androina Yang

Reputation: 145

I have resolved this problem with reinstall go-lang use follow steps:

Thanks for @ssk's answer in question: How to deploy Apprtc's collider into Google App Engine?

Collider needs to be deployed in Google Compute Engine or equivalent services by Amazon. Here is the list of steps that I had go through:

  • 1) Install go from: https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz

  • 2) Set PATH variable: export PATH=$PATH:/usr/local/go/bin

  • 3) Set GOROOT export GOROOT=/usr/local/go

  • 4) Set GOPATH (must be different from GOROOT) export GOPATH=/usr/local/go-dependencies (have to create go-dependencies directory if not there)

  • 5) Checkout apprtc code: git clone https://github.com/webrtc/apprtc.git

  • 6) Copy collider files to $GOROOT/src:

    sudo cp -rf apprtc/src/collider/collider /usr/local/go/src/
    sudo cp -rf apprtc/src/collider/collidermain /usr/local/go/src/
    sudo cp -rf apprtc/src/collider/collidertest /usr/local/go/src/
    

  • 7) Install websocket: go get -v golang.org/x/net/websocket

  • 8) Install Dependencies: go get collidermain

  • 9) Install collidermain: go install collidermain

  • 10 Run collidermain: /usr/local/go/bin/collidermain -port=8089 -tls=false (need a certificate to run with tls enabled)

Upvotes: 3

Related Questions