Windows 10 machine - Installing Speckle Server

Hello,
in the process of trying Speckle, I already spend one day trying to install Speckle Server using Docker.

Quick question, from your experience this will be easy or hard to setup for a windows 10 operating system? Because I start to think that your documentation assumes a Linux machine, not windows. And I also do not want to use DigitalOcean.

The simple reason is, if my company starts to use Speckle, we need to have Speckle running on our windows local machines.

I already read some of your documentation (eg Deploying a Server - manual setup | Speckle Docs) and also Speckle Community to find topics related to using Docker.

I am using 2 approaches, one is from your repository (GitHub - specklesystems/speckle-server: The Speckle Server, Frontend, 3D Viewer, & other JS utilities.) cloning it and then reusing your YML files with docker-compose. Another approach is to use your docker images in Docker Hub (Docker Hub).

The problem I am facing is that, the docker container’s does not talk to each other. For instance, one container contains redis and other container need to communicate to it. I also have read here something to use the parameter --net=host, I did not yet experiment that. I am not a docker expert :slight_smile:

This attached image shows the parameters for each container, if I use the approach of using your Docker Hub images. But then I need a way for the containers to communicate to each other or, to access some services in my host (in case I decide to have the dependencies running on my local machine).

Another attached image shows that the container for the front end is constantly restarting. And another attachment shows my currently YML file using with docker-compose to create the container’s.

docker-compose-alberto.yml (4.1 KB)

Some errors I am getting

Speckle Server

[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379

at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379

at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16

Speckle Webhook

Error executing task: error:

UPDATE webhooks_events

SET

"status" = 1,

"lastUpdate" = NOW()

FROM (

SELECT "id" FROM webhooks_events

WHERE "status" = 0

ORDER BY "lastUpdate" ASC

LIMIT 1

) as task

WHERE webhooks_events."id" = task."id"

RETURNING webhooks_events."id"

- relation "webhooks_events" does not exist

at Parser.parseErrorMessage (/speckle-server/node_modules/pg-protocol/dist/parser.js:287:98)

at Parser.handlePacket (/speckle-server/node_modules/pg-protocol/dist/parser.js:126:29)

at Parser.parse (/speckle-server/node_modules/pg-protocol/dist/parser.js:39:38)

at Socket.<anonymous> (/speckle-server/node_modules/pg-protocol/dist/index.js:11:42)

at Socket.emit (node:events:527:28)

at addChunk (node:internal/streams/readable:315:12)

at readableAddChunk (node:internal/streams/readable:289:9)

at Socket.Readable.push (node:internal/streams/readable:228:10)

at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {

Speckle fileimport service

Error executing task: error:

UPDATE file_uploads

SET

"convertedStatus" = 1,

"convertedLastUpdate" = NOW()

FROM (

SELECT "id" FROM file_uploads

WHERE "convertedStatus" = 0 AND "uploadComplete" = 't'

ORDER BY "convertedLastUpdate" ASC

LIMIT 1

) as task

WHERE file_uploads."id" = task."id"

RETURNING file_uploads."id"

- relation "file_uploads" does not exist

at Parser.parseErrorMessage (/speckle-server/node_modules/pg-protocol/dist/parser.js:287:98)

Regards,
Alberto

Hi Alberto,

One of our engineers will help you soon. In the meantime, if you just want to try Speckle, the easiest way of all is to use our free server: https://speckle.xyz/

Hey @BenHur

is there a specific reason why you choose the port 5060 to expose the Speckle frontend on?

That is most probably the cause of your error, since port 5060 and 5061 are reserved for SIP (VoIP) protocol. More on this.

With some minor modifications, i tested your docker-compose file and with any other port (lets say maybe 5066) your config works.

Side note, the first batch of errors go away if you restart the deployment, its caused by the server container not competing the required database migrations on time. A docker-compose down && docker-compose up should get rid of those.

Hope this helps,
Gergo

3 Likes

The connectors, that plug into desktop (windows) applications can run regardles where you run the Speckle server instance. As Matteo said, we really encourage to try our free forever server https://speckle.xyz and see how Speckle works for you. You can always set up your private server later down the line.

1 Like

Hello @gjedlicska,
Using docker-compose, I tried several port numbers (eg 8080, 5066) and I have the same issues. On which operating system you did the test?

I read how networking works on docker (Networking overview | Docker Documentation) and now I start to understand that using “localhost” cannot work.

For instance, looking to YML file, speckle-server service has these environment variables:
CANONICAL_URL: ‘http://127.0.0.1:5066
REDIS_URL: ‘redis://127.0.0.1:6379’

I think this cannot work, because “127.0.0.1” or “localhost” will be relative to the container. So this container cannot connect to redis service or the front end.

More on this: https://www.howtogeek.com/devops/how-to-connect-to-localhost-within-a-docker-container/

Docker documentation Networking overview | Docker Documentation tell me I will need to use a user defined bridge here, in order for the container’s to communicate to each other. I will give it a try.

Another thing I have noted. I deleted the frontend container. Then I started it with this command:

docker run -d --net=host speckle/speckle-frontend:local

The container starts and then exit. I have this error:

standard_init_linux.go:228: exec user process caused: no such file or directory

If I use a Docker Hub image from speckle repository, it seems to start:
docker run -d --net=host speckle/speckle-frontend:latest

The log:
Starting nginx environment template rendering with ${HOSTNAME} ${PWD} ${HOME} ${SHLVL} ${FILE_SIZE_LIMIT_MB} ${PATH} ${_}

Nginx conf rendered, starting server…

This means that I start to think, that, when I cloned your git repository, it will work on a Linux machine, not on a Windows machine.

Regards,
Alberto

Hey @BenHur

could you try with this configuration?
I’ve deleted your volume mounts because of folder names, but you can add them later if it works.

version: '2'
services:
# Actual Speckle Server dependencies

  postgres:
    image: 'postgres:13.1-alpine'
    restart: always
    environment:
      POSTGRES_DB: speckle
      POSTGRES_USER: speckle
      POSTGRES_PASSWORD: speckle

  redis:
    image: 'redis:6.0-alpine'
    restart: always

  minio:
    image: 'minio/minio'
    command: server /data --console-address ":9001"
    restart: always

  # Useful for debugging / exploring local databases

  speckle-frontend:
    build:
      context: .
      dockerfile: packages/frontend/Dockerfile
    image: speckle/speckle-frontend:local
    restart: always
    ports:
      - '127.0.0.1:5066:80'
    environment:
      FILE_SIZE_LIMIT_MB: 100

  ####
  # Speckle Server
  #######
  speckle-server:
    build:
      context: .
      dockerfile: packages/server/Dockerfile
    image: speckle/speckle-server:local
    restart: always
    environment:
      # TODO: Change this to the URL of the speckle server, as accessed from the network
      CANONICAL_URL: 'http://127.0.0.1:5066'

      # TODO: Change this to a unique secret for this server
      SESSION_SECRET: 'mySecret'

      STRATEGY_LOCAL: 'true'
      DEBUG: 'speckle:*'

      POSTGRES_URL: 'postgres'
      POSTGRES_USER: 'speckle'
      POSTGRES_PASSWORD: 'speckle'
      POSTGRES_DB: 'speckle'

      REDIS_URL: 'redis://redis'

      S3_ENDPOINT: 'http://minio:9000'
      S3_ACCESS_KEY: 'minioadmin'
      S3_SECRET_KEY: 'minioadmin'
      S3_BUCKET: 'speckle-server'
      S3_CREATE_BUCKET: 'true'
      FILE_SIZE_LIMIT_MB: 100

      WAIT_HOSTS: postgres:5432, redis:6379, minio:9000

  preview-service:
    build:
      context: .
      dockerfile: packages/preview-service/Dockerfile
    image: speckle/speckle-preview-service:local
    restart: always
    mem_limit: '3000m'
    memswap_limit: '3000m'
    environment:
      DEBUG: 'preview-service:*'
      PG_CONNECTION_STRING: 'postgres://speckle:speckle@postgres/speckle'
      WAIT_HOSTS: postgres:5432

  webhook-service:
    build:
      context: .
      dockerfile: packages/webhook-service/Dockerfile
    image: speckle/speckle-webhook-service:local
    restart: always
    environment:
      DEBUG: 'webhook-service:*'
      PG_CONNECTION_STRING: 'postgres://speckle:speckle@postgres/speckle'
      WAIT_HOSTS: postgres:5432

  fileimport-service:
    build:
      context: .
      dockerfile: packages/fileimport-service/Dockerfile
    image: speckle/speckle-fileimport-service:local
    restart: always
    environment:
      DEBUG: 'fileimport-service:*'
      PG_CONNECTION_STRING: 'postgres://speckle:speckle@postgres/speckle'
      WAIT_HOSTS: postgres:5432

      S3_ENDPOINT: 'http://127.0.0.1:9000'
      S3_ACCESS_KEY: 'minioadmin'
      S3_SECRET_KEY: 'minioadmin'
      S3_BUCKET: 'speckle-server'

      SPECKLE_SERVER_URL: 'http://127.0.0.1:5060'

Hello @gjedlicska,
well, I had to use your speckle-frontend in Docker Hub to make this work.

I registered but when I try to login, I get “Failed to fetch”.

Details:

  1. I have used your configuration but speckle-frontend does not start. Using docker run command throw this error:

standard_init_linux.go:228: exec user process caused: no such file or directory

Using Docker hub image, I succeeded.

  1. I did a register and then I tried to login. I get now an error, “Failed to fetch”. See previous images.

Using CANONICAL_URL: ‘http://127.0.0.1:5066’, I have this logging in Speckle Server.

I saw a topic here about this error (Speckle server issues). I edited CANONICAL_URL to:

CANONICAL_URL: ‘http://speckle-server’, where speckle-server is the container name for Speckle Server

Now the logging in Speckle Server is this one:

Additional Details:

  1. For some reason, the speckle frontend does not start, and I start to believe that if my machine was Linux, it will work, but in my windows 10 machine, there are here something specific to windows that prevent docker to create an image.

So I decided to use Docker Hub image for speckle frontend.

  1. I edited your YML configuration with this networks:

networks:
default:
name: speckle-network
driver: bridge

  1. Then I connected the Speckle Frontend (from Docker Hub) to this network:

docker network disconnect bridge speckle-frondend, where speckle-frondend is the container name
docker network connect speckle-network speckle-frondend

  1. Attached the YML file I am using now:
    docker-compose-alberto-v2.yml (3.4 KB)

Regards,
Alberto

Hello @gjedlicska,
I discovered the cause of the issue, “Failed to fetch”.

From my host (windows 10 machine) I was calling the front end with http://localhost:5066/ when CANONICAL_URL: ‘http://127.0.0.1:5066’.

When I tried with http://127.0.0.1:5066, it worked!

I will continue discovering Speckle.

Regards,
Alberto

2 Likes