Installation problems

Following the installation instructions outlined here: https://gitlab.coko.foundation/editoria/editoria-vanilla I have run in to some problems and have some questions.

I am uncertain what to put in config/local-development.json. Documentation says to “enter your database secret”. This implies that I should already have a database up and running?

After running yarn start:services the documentation says:
Create a database and enter credentials for an admin user account (a postgres db should already be up and running)

Again the documentation implies that I already should have a postgres db up and running.

After this the documentation says to do yarn resetdb and “Follow the prompts to enter user credentials and complete the database setup”.

However in my case I get these errors running yarn start:services:
Not setting up database access, dbDriver is not configured
Missing arguments for LanguageTool API

I think my problems are related to the postgres database not set upp correctly but not sure how to check this and move forward.

Any pointers appreciated.
/Fredrik

Hey @fbjarman I am here to help, could you please give me some details for your setup ? e.g. OS, node version, yarn version
Also sorry for the inconvenience but the readme of editoria-vanilla is a bit outdated

Mac OS High Sierra 10.13.6
Yarn 1.22.0
Node 12.8.0

This is what happens:

emp-235-228:editoria-vanilla frebj199$ yarn start:services
yarn run v1.22.0
$ docker-compose up job-xsweet language-tool job-epubcheck job-pandoc job-pdf
Starting job-pdf … done
Starting editoria-vanilla_language-tool_1 … done
Starting job-epubcheck … done
Starting job-xsweet … done
Starting job-pandoc … done
Attaching to job-epubcheck, editoria-vanilla_language-tool_1, job-xsweet, job-pdf, job-pandoc
job-epubcheck | + exec ./src/wait-for-it.sh postgres:5432 --strict --timeout=300 – node ./src/epubcheck.js
job-pdf | + exec ./src/wait-for-it.sh postgres:5432 --strict --timeout=300 – node ./src/pdf.js
job-epubcheck | wait-for-it.sh: waiting 300 seconds for postgres:5432
job-pdf | wait-for-it.sh: waiting 300 seconds for postgres:5432
job-xsweet | + npx wait-for-it postgres:5432 --strict --timeout=300 – node ./src/xsweet.js
job-pandoc | + exec ./src/wait-for-it.sh postgres:5432 --strict --timeout=300 – node ./src/pandoc.js
job-pandoc | wait-for-it.sh: waiting 300 seconds for postgres:5432
job-xsweet | wait-for-it: waiting 300 seconds for postgres:5432
language-tool_1 | 2020-03-05 11:26:34 +0000 Not setting up database access, dbDriver is not configured
language-tool_1 | 2020-03-05 11:26:34 +0000 ****************************************************************************************************
language-tool_1 | 2020-03-05 11:26:34 +0000 *** WARNING: this process is running as root - please do not run it as root for security reasons ***
language-tool_1 | 2020-03-05 11:26:34 +0000 ****************************************************************************************************
language-tool_1 | 2020-03-05 11:26:34 +0000 WARNING: running in HTTP mode, consider using org.languagetool.server.HTTPSServer for encrypted connections
language-tool_1 | 2020-03-05 11:26:34 +0000 WARNING: running in public mode, LanguageTool API can be accessed without restrictions!
language-tool_1 | 2020-03-05 11:26:36 +0000 Setting up thread pool with 10 threads
language-tool_1 | 2020-03-05 11:26:36 +0000 Starting LanguageTool 4.7 (build date: 2019-09-28 10:09, 64f87c1) server on http://localhost:8010
language-tool_1 | 2020-03-05 11:26:36 +0000 Server started

Accessing localhost:8010 refuses connections :frowning:

localhost:3000 shows login screent etc but cannot login using the database user. Is there a default admin account/where to create it?

Error when trying to log in: secretOrPrivateKey must have a value

ok thanks for the feedback! Could you follow the steps below?
Steps:
In the root of the cloned app

  1. docker-compose down
  2. rm -rf node_modules
  3. rm -rf database
  4. Under the ./config create a file with name development.env
  5. dm me in mattermorst to send you the content of that file
  6. run source ./config/development.env
  7. yarn
  8. yarn start:postgres
  9. in a new terminal tab repeat step 6
  10. yarn setupdb
  11. follow the cli and create the admin user
  12. yarn server
  13. in a third terminal tab repeat step 6
  14. wait for the yarn server to start in tab 2
  15. in tab 3 run yarn start:services

Your are good to go from there

1 Like

Step 8 gives this error:

emp-235-228:editoria-vanilla frebj199$ yarn start:postgres

yarn run v1.22.0

$ docker-compose up postgres

Creating network “editoria-vanilla_default” with the default driver

Pulling postgres (postgres:10-alpine)…

10-alpine: Pulling from library/postgres

c9b1b535fdd9: Pull complete

d8f3047c2e42: Pull complete

f2e53fddf183: Pull complete

9c8282d512e5: Pull complete

65cbae707289: Pull complete

bafd14c3c0dc: Pull complete

ea597e72d12f: Pull complete

3fc257549592: Pull complete

0bd4d7958341: Pull complete

Digest: sha256:c82ed22ac2c571d1cb17f1773018527921a977745684b786619b7bd2e11c4960

Status: Downloaded newer image for postgres:10-alpine

Creating postgres … error

ERROR: for postgres Cannot start service postgres: driver failed programming external connectivity on endpoint postgres (68f722ea35de995dde34af8eb165d175a56329f390b51114be80b810e491557b): Error starting userland proxy: listen tcp 0.0.0.0:5432: bind: address already in use

ERROR: for postgres Cannot start service postgres: driver failed programming external connectivity on endpoint postgres (68f722ea35de995dde34af8eb165d175a56329f390b51114be80b810e491557b): Error starting userland proxy: listen tcp 0.0.0.0:5432: bind: address already in use

ERROR: Encountered errors while bringing up the project.

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

what is the output of docker ps?

emp-235-228:editoria-vanilla frebj199$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
664f6d271e80 traefik:1.7.16 “/traefik -c /dev/nu…” 4 months ago Up 4 months 0.0.0.0:80->80/tcp systemseed_traefik_1
bbe307887369 wodby/node:8.11-0.3.0 “/docker-entrypoint.…” 4 months ago Up 4 months 3000/tcp systemseed_node_1
8beec433410b contenta_docker_nginx “container-entrypoin…” 4 months ago Up 4 months 0.0.0.0:443->443/tcp, 0.0.0.0:84->80/tcp contenta_docker_nginx_1
b4012a7abbbf contenta_docker_database “docker-entrypoint m…” 4 months ago Up 4 months 0.0.0.0:3306->3306/tcp contenta_docker_database_1
276de4288d6f contenta_docker_php “docker-entrypoint /…” 4 months ago Up 4 months 0.0.0.0:9000->9000/tcp contenta_docker_php_1

Error seems to be:
listen tcp 0.0.0.0:5432: bind: address already in use

do you happen to have any local postgres running? Also have you sourced the env file in all your open terminal tabs?

Also have you used the development.env that I’ve sent you?

Local postgres is shut down.
I have used the development.env from mattermost.
Will source it in all tabs/windows and try again.

yarn setupdb worked
yarn server worked
yarn server (last line says: Compiled successfully.)

repeated step 6 in third tab
yarn start:services exited with:

emp-235-228:editoria-vanilla frebj199$ yarn start:services
yarn run v1.22.0
$ docker-compose up job-xsweet language-tool job-epubcheck job-pandoc job-pdf
Creating job-xsweet … done
Creating job-epubcheck … done
Creating job-pandoc … done
Creating job-pdf … done
Creating editoria-vanilla_language-tool_1 … done
Attaching to job-pandoc, job-pdf, job-epubcheck, job-xsweet, editoria-vanilla_language-tool_1
job-pdf | + exec ./src/wait-for-it.sh postgres:5432 --strict --timeout=300 – node ./src/pdf.js
job-epubcheck | + exec ./src/wait-for-it.sh postgres:5432 --strict --timeout=300 – node ./src/epubcheck.js
job-epubcheck | wait-for-it.sh: waiting 300 seconds for postgres:5432
job-epubcheck | wait-for-it.sh: postgres:5432 is available after 0 seconds
job-pdf | wait-for-it.sh: waiting 300 seconds for postgres:5432
job-pdf | wait-for-it.sh: postgres:5432 is available after 0 seconds
job-pandoc | + exec ./src/wait-for-it.sh postgres:5432 --strict --timeout=300 – node ./src/pandoc.js
job-pandoc | wait-for-it.sh: waiting 300 seconds for postgres:5432
job-pandoc | wait-for-it.sh: postgres:5432 is available after 0 seconds
job-xsweet | + npx wait-for-it postgres:5432 --strict --timeout=300 – node ./src/xsweet.js
job-xsweet | wait-for-it: waiting 300 seconds for postgres:5432
job-xsweet | wait-for-it: postgres:5432 is available after 0 seconds
language-tool_1 | 2020-03-05 13:22:34 +0000 Not setting up database access, dbDriver is not configured
language-tool_1 | 2020-03-05 13:22:34 +0000 ****************************************************************************************************
language-tool_1 | 2020-03-05 13:22:34 +0000 *** WARNING: this process is running as root - please do not run it as root for security reasons ***
language-tool_1 | 2020-03-05 13:22:34 +0000 ****************************************************************************************************
language-tool_1 | 2020-03-05 13:22:34 +0000 WARNING: running in HTTP mode, consider using org.languagetool.server.HTTPSServer for encrypted connections
language-tool_1 | 2020-03-05 13:22:34 +0000 WARNING: running in public mode, LanguageTool API can be accessed without restrictions!
language-tool_1 | 2020-03-05 13:22:38 +0000 Setting up thread pool with 10 threads
language-tool_1 | 2020-03-05 13:22:38 +0000 Starting LanguageTool 4.7 (build date: 2019-09-28 10:09, 64f87c1) server on http://localhost:8010
language-tool_1 | 2020-03-05 13:22:38 +0000 Server started

everything seems fine to me

However, localhost:3050 seems to be working and I am able to log in.

Curious about: Not setting up database access, dbDriver is not configured

What does that mean?

don’t worry about the warnings. You’ve made it :slight_smile:

That’s an internal thing of a library called language tools that we are using in Editoria for spellchecking. Don’t worry about it as we are using this tool on runtime and we are not relying on its database. So you are good to go.

2 Likes