0

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.

Kennedy Ho
  • 73
  • 1
  • 2
  • 6
  • Looking at the install directions, that package may not build as expected in all circumstances because symlinks in the GOPATH are not supported (It only seems to do this in order to have short import paths internally, which is kind of silly). Regardless, DialWithDialer has been in the stdlib tls package for a while, so you probably have something wrong with your Go install. Make sure you don't have GOROOT set if you've used the standard install method. – JimB Jan 19 '17 at 14:09
  • @JimB Thank you for your comment. I'm using the standard installation method and my GOROOT is unset, but it still provide me with the same error. – Kennedy Ho Jan 19 '17 at 14:57
  • I'm not sure what else is different in your system. Try it with a completely new GOPATH, and make sure you don't have any `vendor/` directories involved here. (you can't `go get -u` because of this package's broken install method) – JimB Jan 19 '17 at 16:28

1 Answers1

3

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)

nima moradi
  • 2,300
  • 21
  • 34