Unable to start Retool self hosted on Mac M1

Hi, I was able to start Retool self-hosted once in the past. Then today I'm no longer able to do so.

Today I have tried:

  • Clean and purge the data of Docker
  • Run docker system prune
  • Re-install Retool Self-hosted as documented here: https://docs.retool.com/docs/running-retool-locally
  • Retool succesfully installed and started according to the log (see log at the bottom).
  • Then I go to browser, but Retool can't load. See screenshot below.

After I looked into Docker, I found the api-1 container actually exited on its own after Retool start. So I manually restarted it, Now it looks like this:

This is the error in the api-1 container logs when it existed:

2023-01-27 11:25:24 wait-for-it.sh: waiting 15 seconds for postgres:5432
2023-01-27 11:25:29 wait-for-it.sh: postgres:5432 is available after 5 seconds
2023-01-27 11:25:29 not untarring the bundle
2023-01-27 11:25:37 {"message":"[process service types] MAIN_BACKEND","level":"info","timestamp":"2023-01-27T19:25:36.999Z"}
2023-01-27 11:25:38 Failing checking database migrations
2023-01-27 11:25:38 node:internal/process/promises:279
2023-01-27 11:25:38             triggerUncaughtException(err, true /* fromPromise */);
2023-01-27 11:25:38             ^
2023-01-27 11:25:38 
2023-01-27 11:25:38 UniqueConstraintError [SequelizeUniqueConstraintError]: Validation error
2023-01-27 11:25:38     at Query.formatError (/snapshot/retool_development/node_modules/sequelize/lib/dialects/postgres/query.js:324:18)
2023-01-27 11:25:38     at /snapshot/retool_development/node_modules/sequelize/lib/dialects/postgres/query.js:72:18
2023-01-27 11:25:38     at /snapshot/retool_development/node_modules/dd-trace/packages/datadog-instrumentations/src/helpers/promise.js
2023-01-27 11:25:38     at AsyncResource.runInAsyncScope (node:async_hooks:201:9)
2023-01-27 11:25:38     at /snapshot/retool_development/node_modules/dd-trace/packages/datadog-instrumentations/src/helpers/promise.js
2023-01-27 11:25:38     at tryCatcher (/snapshot/retool_development/node_modules/bluebird/js/release/util.js:16:23)
2023-01-27 11:25:38     at Promise._settlePromiseFromHandler (/snapshot/retool_development/node_modules/bluebird/js/release/promise.js:547:31)
2023-01-27 11:25:38     at Promise._settlePromise (/snapshot/retool_development/node_modules/bluebird/js/release/promise.js:604:18)
2023-01-27 11:25:38     at Promise._settlePromise0 (/snapshot/retool_development/node_modules/bluebird/js/release/promise.js:649:10)
2023-01-27 11:25:38     at Promise._settlePromises (/snapshot/retool_development/node_modules/bluebird/js/release/promise.js:725:18)
2023-01-27 11:25:38     at _drainQueueStep (/snapshot/retool_development/node_modules/bluebird/js/release/async.js:93:12)
2023-01-27 11:25:38     at _drainQueue (/snapshot/retool_development/node_modules/bluebird/js/release/async.js:86:9)
2023-01-27 11:25:38     at Async._drainQueues (/snapshot/retool_development/node_modules/bluebird/js/release/async.js:102:5)
2023-01-27 11:25:38     at Immediate._onImmediate (/snapshot/retool_development/node_modules/bluebird/js/release/async.js:15:14)
2023-01-27 11:25:38     at processImmediate (node:internal/timers:466:21) {
2023-01-27 11:25:38   errors: [
2023-01-27 11:25:38     ValidationErrorItem {
2023-01-27 11:25:38       message: 'typname must be unique',
2023-01-27 11:25:38       type: 'unique violation',
2023-01-27 11:25:38       path: 'typname',
2023-01-27 11:25:38       value: 'SequelizeMeta',
2023-01-27 11:25:38       origin: 'DB',
2023-01-27 11:25:38       instance: null,
2023-01-27 11:25:38       validatorKey: 'not_unique',
2023-01-27 11:25:38       validatorName: null,
2023-01-27 11:25:38       validatorArgs: []
2023-01-27 11:25:38     },
2023-01-27 11:25:38     ValidationErrorItem {
2023-01-27 11:25:38       message: 'typnamespace must be unique',
2023-01-27 11:25:38       type: 'unique violation',
2023-01-27 11:25:38       path: 'typnamespace',
2023-01-27 11:25:38       value: '2200',
2023-01-27 11:25:38       origin: 'DB',
2023-01-27 11:25:38       instance: null,
2023-01-27 11:25:38       validatorKey: 'not_unique',
2023-01-27 11:25:38       validatorName: null,
2023-01-27 11:25:38       validatorArgs: []
2023-01-27 11:25:38     }
2023-01-27 11:25:38   ],
2023-01-27 11:25:38   fields: { typname: 'SequelizeMeta', typnamespace: '2200' },
2023-01-27 11:25:38   parent: error: duplicate key value violates unique constraint "pg_type_typname_nsp_index"
2023-01-27 11:25:38       at Parser.parseErrorMessage (/snapshot/retool_development/node_modules/pg-protocol/dist/parser.js:287:98)
2023-01-27 11:25:38       at Parser.handlePacket (/snapshot/retool_development/node_modules/pg-protocol/dist/parser.js:126:29)
2023-01-27 11:25:38       at Parser.parse (/snapshot/retool_development/node_modules/pg-protocol/dist/parser.js:39:38)
2023-01-27 11:25:38       at Socket.<anonymous> (/snapshot/retool_development/node_modules/pg-protocol/dist/index.js:11:42)
2023-01-27 11:25:38       at Socket.emit (node:events:526:28)
2023-01-27 11:25:38       at addChunk (node:internal/streams/readable:315:12)
2023-01-27 11:25:38       at readableAddChunk (node:internal/streams/readable:289:9)
2023-01-27 11:25:38       at Socket.Readable.push (node:internal/streams/readable:228:10)
2023-01-27 11:25:38       at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
2023-01-27 11:25:38     length: 253,
2023-01-27 11:25:38     severity: 'ERROR',
2023-01-27 11:25:38     code: '23505',
2023-01-27 11:25:38     detail: 'Key (typname, typnamespace)=(SequelizeMeta, 2200) already exists.',
2023-01-27 11:25:38     hint: undefined,
2023-01-27 11:25:38     position: undefined,
2023-01-27 11:25:38     internalPosition: undefined,
2023-01-27 11:25:38     internalQuery: undefined,
2023-01-27 11:25:38     where: undefined,
2023-01-27 11:25:38     schema: 'pg_catalog',
2023-01-27 11:25:38     table: 'pg_type',
2023-01-27 11:25:38     column: undefined,
2023-01-27 11:25:38     dataType: undefined,
2023-01-27 11:25:38     constraint: 'pg_type_typname_nsp_index',
2023-01-27 11:25:38     file: 'nbtinsert.c',
2023-01-27 11:25:38     line: '433',
2023-01-27 11:25:38     routine: '_bt_check_unique',
2023-01-27 11:25:38     sql: 'CREATE TABLE IF NOT EXISTS "SequelizeMeta" ("name" VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY ("name"));',
2023-01-27 11:25:38     parameters: undefined
2023-01-27 11:25:38   },
2023-01-27 11:25:38   original: error: duplicate key value violates unique constraint "pg_type_typname_nsp_index"
2023-01-27 11:25:38       at Parser.parseErrorMessage (/snapshot/retool_development/node_modules/pg-protocol/dist/parser.js:287:98)
2023-01-27 11:25:38       at Parser.handlePacket (/snapshot/retool_development/node_modules/pg-protocol/dist/parser.js:126:29)
2023-01-27 11:25:38       at Parser.parse (/snapshot/retool_development/node_modules/pg-protocol/dist/parser.js:39:38)
2023-01-27 11:25:38       at Socket.<anonymous> (/snapshot/retool_development/node_modules/pg-protocol/dist/index.js:11:42)
2023-01-27 11:25:38       at Socket.emit (node:events:526:28)
2023-01-27 11:25:38       at addChunk (node:internal/streams/readable:315:12)
2023-01-27 11:25:38       at readableAddChunk (node:internal/streams/readable:289:9)
2023-01-27 11:25:38       at Socket.Readable.push (node:internal/streams/readable:228:10)
2023-01-27 11:25:38       at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
2023-01-27 11:25:38     length: 253,
2023-01-27 11:25:38     severity: 'ERROR',
2023-01-27 11:25:38     code: '23505',
2023-01-27 11:25:38     detail: 'Key (typname, typnamespace)=(SequelizeMeta, 2200) already exists.',
2023-01-27 11:25:38     hint: undefined,
2023-01-27 11:25:38     position: undefined,
2023-01-27 11:25:38     internalPosition: undefined,
2023-01-27 11:25:38     internalQuery: undefined,
2023-01-27 11:25:38     where: undefined,
2023-01-27 11:25:38     schema: 'pg_catalog',
2023-01-27 11:25:38     table: 'pg_type',
2023-01-27 11:25:38     column: undefined,
2023-01-27 11:25:38     dataType: undefined,
2023-01-27 11:25:38     constraint: 'pg_type_typname_nsp_index',
2023-01-27 11:25:38     file: 'nbtinsert.c',
2023-01-27 11:25:38     line: '433',
2023-01-27 11:25:38     routine: '_bt_check_unique',
2023-01-27 11:25:38     sql: 'CREATE TABLE IF NOT EXISTS "SequelizeMeta" ("name" VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY ("name"));',
2023-01-27 11:25:38     parameters: undefined
2023-01-27 11:25:38   },
2023-01-27 11:25:38   sql: 'CREATE TABLE IF NOT EXISTS "SequelizeMeta" ("name" VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY ("name"));'
2023-01-27 11:25:38 }

Also, there is an error in retool-onpremise container:

1969-12-31 16:00:00 unknown flag: --ansi
1969-12-31 16:00:00 See 'docker --help'.
1969-12-31 16:00:00 Usage:  docker [OPTIONS] COMMAND
1969-12-31 16:00:00 A self-sufficient runtime for containers
1969-12-31 16:00:00 Options:
1969-12-31 16:00:00       --config string      Location of client config files (default
1969-12-31 16:00:00                            "/Users/mattsun/.docker")
1969-12-31 16:00:00   -c, --context string     Name of the context to use to connect to the
1969-12-31 16:00:00                            daemon (overrides DOCKER_HOST env var and
1969-12-31 16:00:00                            default context set with "docker context use")
1969-12-31 16:00:00   -D, --debug              Enable debug mode
1969-12-31 16:00:00   -H, --host list          Daemon socket(s) to connect to
1969-12-31 16:00:00   -l, --log-level string   Set the logging level
1969-12-31 16:00:00                            ("debug"|"info"|"warn"|"error"|"fatal")
1969-12-31 16:00:00                            (default "info")
1969-12-31 16:00:00       --tls                Use TLS; implied by --tlsverify
1969-12-31 16:00:00       --tlscacert string   Trust certs signed only by this CA (default
1969-12-31 16:00:00                            "/Users/mattsun/.docker/ca.pem")
1969-12-31 16:00:00       --tlscert string     Path to TLS certificate file (default
1969-12-31 16:00:00                            "/Users/mattsun/.docker/cert.pem")
1969-12-31 16:00:00       --tlskey string      Path to TLS key file (default
1969-12-31 16:00:00                            "/Users/mattsun/.docker/key.pem")
1969-12-31 16:00:00       --tlsverify          Use TLS and verify the remote
1969-12-31 16:00:00   -v, --version            Print version information and quit
1969-12-31 16:00:00 Management Commands:
1969-12-31 16:00:00   builder     Manage builds
1969-12-31 16:00:00   buildx*     Docker Buildx (Docker Inc., v0.9.1)
1969-12-31 16:00:00   config      Manage Docker configs
1969-12-31 16:00:00   container   Manage containers
1969-12-31 16:00:00   context     Manage contexts
1969-12-31 16:00:00   dev*        Docker Dev Environments (Docker Inc., v0.0.3)
1969-12-31 16:00:00   extension*  Manages Docker extensions (Docker Inc., v0.2.13)
1969-12-31 16:00:00   image       Manage images
1969-12-31 16:00:00   manifest    Manage Docker image manifests and manifest lists
1969-12-31 16:00:00   network     Manage networks
1969-12-31 16:00:00   node        Manage Swarm nodes
1969-12-31 16:00:00   plugin      Manage plugins
1969-12-31 16:00:00   sbom*       View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
1969-12-31 16:00:00   scan*       Docker Scan (Docker Inc., v0.21.0)
1969-12-31 16:00:00   secret      Manage Docker secrets
1969-12-31 16:00:00   service     Manage services
1969-12-31 16:00:00   stack       Manage Docker stacks
1969-12-31 16:00:00   swarm       Manage Swarm
1969-12-31 16:00:00   system      Manage Docker
1969-12-31 16:00:00   trust       Manage trust on Docker images
1969-12-31 16:00:00   volume      Manage volumes
1969-12-31 16:00:00 Commands:
1969-12-31 16:00:00   attach      Attach local standard input, output, and error streams to a running container
1969-12-31 16:00:00   build       Build an image from a Dockerfile
1969-12-31 16:00:00   commit      Create a new image from a container's changes
1969-12-31 16:00:00   cp          Copy files/folders between a container and the local filesystem
1969-12-31 16:00:00   create      Create a new container
1969-12-31 16:00:00   diff        Inspect changes to files or directories on a container's filesystem
1969-12-31 16:00:00   events      Get real time events from the server
1969-12-31 16:00:00   exec        Run a command in a running container
1969-12-31 16:00:00   export      Export a container's filesystem as a tar archive
1969-12-31 16:00:00   history     Show the history of an image
1969-12-31 16:00:00   images      List images
1969-12-31 16:00:00   import      Import the contents from a tarball to create a filesystem image
1969-12-31 16:00:00   info        Display system-wide information
1969-12-31 16:00:00   inspect     Return low-level information on Docker objects
1969-12-31 16:00:00   kill        Kill one or more running containers
1969-12-31 16:00:00   load        Load an image from a tar archive or STDIN
1969-12-31 16:00:00   login       Log in to a Docker registry
1969-12-31 16:00:00   logout      Log out from a Docker registry
1969-12-31 16:00:00   logs        Fetch the logs of a container
1969-12-31 16:00:00   pause       Pause all processes within one or more containers
1969-12-31 16:00:00   port        List port mappings or a specific mapping for the container
1969-12-31 16:00:00   ps          List containers
1969-12-31 16:00:00   pull        Pull an image or a repository from a registry
1969-12-31 16:00:00   push        Push an image or a repository to a registry
1969-12-31 16:00:00   rename      Rename a container
1969-12-31 16:00:00   restart     Restart one or more containers
1969-12-31 16:00:00   rm          Remove one or more containers
1969-12-31 16:00:00   rmi         Remove one or more images
1969-12-31 16:00:00   run         Run a command in a new container
1969-12-31 16:00:00   save        Save one or more images to a tar archive (streamed to STDOUT by default)
1969-12-31 16:00:00   search      Search the Docker Hub for images
1969-12-31 16:00:00   start       Start one or more stopped containers
1969-12-31 16:00:00   stats       Display a live stream of container(s) resource usage statistics
1969-12-31 16:00:00   stop        Stop one or more running containers
1969-12-31 16:00:00   tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
1969-12-31 16:00:00   top         Display the running processes of a container
1969-12-31 16:00:00   unpause     Unpause all processes within one or more containers
1969-12-31 16:00:00   update      Update configuration of one or more containers
1969-12-31 16:00:00   version     Show the Docker version information
1969-12-31 16:00:00   wait        Block until one or more containers stop, then print their exit codes
1969-12-31 16:00:00 Invalid Plugins:
1969-12-31 16:00:00   compose     failed to fetch metadata: fork/exec /Users/mattsun/.docker/cli-plugins/docker-compose: exec format error
1969-12-31 16:00:00 Run 'docker COMMAND --help' for more information on a command.
1969-12-31 16:00:00 To get more help with docker, check out our guides at https://docs.docker.com/go/guides/

I have logs all available upon request, but this forum doesn't allow me to attach log files or zip files here.

Then I found these, I think they are related:

Hi mattsun,

Having similar issues here, except that I have never succeeded running Retool on-premise on my M1.

Interested if anyone figured out a solution or work-around...

Hey! Sorry about the late replies here. Would you mind sharing your container logs as well? If you have a larger zip file you're welcome to reach out to us directly via chat or email. The dev team is exploring having ARM64 Docker images and if they do release them I can let you know about it here.

It would also be helpful if you could share your exact method of deployment, are you using a one-line deploy script?

Also @mattsun based on this thread it looks like you were able to get things up and running, albeit with some issues, is that the case?