Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Invalid DB Type Error when run docker-compse in ubuntu #252

Open
stanislous opened this issue Apr 8, 2020 · 8 comments
Open

Invalid DB Type Error when run docker-compse in ubuntu #252

stanislous opened this issue Apr 8, 2020 · 8 comments
Assignees

Comments

@stanislous
Copy link

Question
I tried to run wikijs and MongoDB services using docker-compose on ubuntu 18.04. I set up config.yml file

//Port the server should listen to
port: 80

db:
type: mongodb

// PostgreSQL / MySQL / MariaDB / MS SQL Server only:
host: localhost
port: 5432
user: wikijs
pass: wikijsrocks
db: wiki
ssl: false

Then I configured docker-compose.yml file with wikijs and MongoDB services.

version: '3'
services:
wikidb:
image: mongo:3
expose:
- '27017'
command: '--smallfiles --bind_ip ::,0.0.0.0'
environment:
- 'MONGO_LOG_DIR=/dev/null'
volumes:
- $HOME/volumes/mongo/db:/data/db
wikijs:
image: 'requarks/wiki:latest'
links:
- wikidb
depends_on:
- wikidb
ports:
- '80:80'
environment:
WIKI_ADMIN_EMAIL: [email protected]
volumes:
- $HOME/volumes/wiki/config.yml:/var/wiki/config.yml

I changed the database parameter in the config using these commands

SEARCH="mongodb://localhost:27017/wiki"
REPLACE="mongodb://wikidb:27017/wiki"
FILEPATH="$HOME/volumes/wiki/config.yml"
sed -i "s;$SEARCH;$REPLACE;" $FILEPATH

Finally i run the docker-compose up on the terminal.
It pulled both mongoDB and wikijs containers successfully but finally showed this error.

wikijs_1 | Loading configuration from /wiki/config.yml... OK
wikijs_1 | 2020-04-08T05:29:44.323Z [MASTER] info: ==============================
wikijs_1 | 2020-04-08T05:29:44.327Z [MASTER] info: = Wiki.js 2.2.51 ====================
wikijs_1 | 2020-04-08T05:29:44.328Z [MASTER] info: ==============================
wikijs_1 | 2020-04-08T05:29:44.328Z [MASTER] info: Initializing...
wiki_wikidb_1 exited with code 1
wikijs_1 | 2020-04-08T05:29:44.663Z [MASTER] error: Invalid DB Type
wiki_wikijs_1 exited with code 1

There is no spacing issues in both .yml files. Also I disabled git. Can someone help me to figure this out?

Host Info (please complete the following information):
OS: [e.g. Ubuntu 18.04, Docker]
Wiki.js version: [e.g. 2.2]
Database engine: [e.g. mongodb:3 ]

@Smankusors
Copy link

MongoDB is not supported on Wiki.js 2.x

@stanislous
Copy link
Author

@Smankusors what versions support MongoDB?

@Smankusors
Copy link

@Smankusors what versions support MongoDB?

1.x

@stanislous
Copy link
Author

thanks, @Smankusors let me try that

@stanislous
Copy link
Author

I changed the version of the wikijs from 2.2 to 1.0. Then it shows this error.

wikijs_1 | 2020-04-08 11:59:50,365 INFO spawned: 'wikijs' with pid 7
wikijs_1 | 2020-04-08 11:59:50,507 INFO exited: wikijs (exit status 1; not expected)
wikijs_1 | 2020-04-08 11:59:51,509 INFO spawned: 'wikijs' with pid 13
wikijs_1 | 2020-04-08 11:59:51,660 INFO exited: wikijs (exit status 1; not expected)
wikijs_1 | 2020-04-08 11:59:53,667 INFO spawned: 'wikijs' with pid 19
wikijs_1 | 2020-04-08 11:59:53,783 INFO exited: wikijs (exit status 1; not expected)
wikijs_1 | 2020-04-08 11:59:56,789 INFO spawned: 'wikijs' with pid 25
wikijs_1 | 2020-04-08 11:59:56,904 INFO exited: wikijs (exit status 1; not expected)
wikijs_1 | 2020-04-08 11:59:57,905 INFO gave up: wikijs entered FATAL state, too many start retries too quickly

I think config.yml is available and it's path is correct.

@NGPixel NGPixel transferred this issue from requarks/wiki Apr 8, 2020
@stanislous
Copy link
Author

@NGPixel any way to fix this?

@NGPixel
Copy link
Member

NGPixel commented Apr 9, 2020

Read the docs

You can't just replace the version number and expect it to work.

@stanislous
Copy link
Author

I set db connection string to: mongodb://wikidb:27017/wiki. WikiJs port is:- '8080:3000' and config.yml port set to 8080. And didn't change any other settings. But i'm getting the same error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants