Skip to content

go-openssl errors #315

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

Closed
vhar opened this issue Jul 14, 2023 · 1 comment
Closed

go-openssl errors #315

vhar opened this issue Jul 14, 2023 · 1 comment

Comments

@vhar
Copy link

vhar commented Jul 14, 2023

Hi all.
I am running tarantool in docker-compose and getting this errors:

test-app     | go: downloading github.com/tarantool/go-openssl v0.0.8-0.20230307065445-720eeb389195
test-app     | go: downloading github.com/tarantool/go-iproto v0.1.0
test-app     | go: downloading github.com/vmihailenco/msgpack/v5 v5.3.5
test-app     | go: downloading github.com/vmihailenco/tagparser/v2 v2.0.0
test-app     | # github.com/tarantool/go-openssl
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:25:7: undefined: Ctx
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:44:43: undefined: Ctx
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:52:41: undefined: Ctx
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:80:38: undefined: Ctx
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:80:62: undefined: Conn
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:90:68: undefined: Ctx
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:91:21: undefined: Conn
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:109:45: undefined: Ctx
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:110:20: undefined: Conn
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:115:59: undefined: Ctx
test-app     | /go/pkg/mod/github.com/tarantool/[email protected]/net.go:115:59: too many errors
test-app exited with code 1

What is wrong?

docker-compose.yaml

version: "3.9"

services:
  tarantool:
    image: tarantool/tarantool:latest
    container_name: test-tarantool
    hostname: tarantool
    environment:
      TARANTOOL_USER_NAME: admin
      TARANTOOL_USER_PASSWORD: pass
    ports:
      - "${TARANTOOL_PORT}:3301"
    volumes:
      - ./tarantool:/var/lib/tarantool
    networks:
      - tarantool

  app:
    container_name: test-app
    image: golang:1.20-alpine
    working_dir: /usr/src/tarantool
    command: go run ./main.go
    volumes:
      - ./${GO_APP_HOMEDIR}:/usr/src/tarantool
    networks:
      - tarantool

networks:
  tarantool:
    driver: bridge

main.go

package main

import (
	"log"
	"github.com/tarantool/go-tarantool/v2"
)

func main() {
    conn, err := tarantool.Connect("tarantool:3301", tarantool.Opts{
            User: "admin",
            Pass: "pass",
    })
    if err != nil {
            log.Fatalf("Connection refused")
    }
    defer conn.Close()
    log.Println("Connection siccessful")
}

@oleg-jukovec
Copy link
Collaborator

oleg-jukovec commented Jul 14, 2023

Hello. You need to install OpenSSL (library + headers) into the docker image first or use build tag go_tarantool_ssl_disable to build/run an application without OpenSSL/TLS support:

go run ./main.go -tags go_tarantool_ssl_disable

Please reopen the issue if that doesn't help.

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

2 participants