How to start up local instance of Fence

Hi guys,

I am trying to run a local instance of Fence in my Ubuntu.

I managed to install "poetry".

How do I go about running an instance of Fence?

Thanks

Hey @Gek_Chuah_Kenneth_Go,

Thank you for your question!
Just making sure about the following before going into depth: did you follow all the steps -- after installing poetry -- that are listed on the Fence GitHub repository to set up the instance?

Best wishes

Hi Xritter2, I did.

I did the following:

  1. sudo docker build -t fence:latest .

  2. sudo docker run --rm -d -v /path/to/fence-config.yaml:/var/www/fence/fence-config.yaml --name=fence -p 22:22 -p 443:443 fence

I kept getting the following errors when I am trying to "telnet":
Trying 0.0.0.0...
Connected to 0.0.0.0.
Escape character is '^]'.
Connection closed by foreign host.

When I try the following:
curl -X GET "https://0.0.0.0:443/credentials" -H "accept: /"

I get this error:
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 0.0.0.0:443

Any steps I am missing out here?
Ports?

Hi @Gek_Chuah_Kenneth_Go,

thank you for your question.

Compose-Services uses the port 443 as host, but here are a few things to check:

  • Is the IP address 0.0.0.0 valid?
  • Try to accept self-signed certificates with curl and the flag -k : curl -k https://something:443/credentials

Please do not hesitate with further questions.
Best regards

I am using the default settings.

I am not able to connect to the local docker container.

I am still getting the following message:
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 0.0.0.0:443

I tried the following: curl -v https://0.0.0.0:443/credentials

  • Trying 0.0.0.0:443...
  • TCP_NODELAY set
  • Connected to 0.0.0.0 (127.0.0.1) port 443 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 0.0.0.0:443
  • Closing connection 0
    curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 0.0.0.0:443

Hi @Gek_Chuah_Kenneth_Go,

thank you for your question!

Looks like the flag k should be added, so this looks like -k : curl -k https://something:443/credentials

Also, you could try and use the localhost instead of 0.0.0.0 so something like: curl -v https://localhost:443/credentials

Best wishes