wiki
wiki copied to clipboard
"secret option required for sessions" on new install
Actual behavior
loading of website
Expected behavior
Error shown: "secret option required for sessions" and nothing works
Steps to reproduce the behavior
no specific steps. Installed from scratch
I just followed the guide to get up and running use docker-compose. I finally was able to run the container, but the website is not loading and is showing "secret option required for sessions".
config.yml
#######################################################################
# Wiki.js - CONFIGURATION #
#######################################################################
# Full documentation + examples:
# https://docs-beta.requarks.io/install
# ---------------------------------------------------------------------
# Port the server should listen to
# ---------------------------------------------------------------------
host: http://removed.com
port: 80
# ---------------------------------------------------------------------
# Database
# ---------------------------------------------------------------------
# Supported Database Engines:
# - postgres = PostgreSQL 9.5 or later
# - mysql = MySQL 8.0 or later (5.7.8 partially supported, refer to docs)
# - mariadb = MariaDB 10.2.7 or later
# - mssql = MS SQL Server 2012 or later
# - sqlite = SQLite 3.9 or later
db: mongodb://wikidb:27017/wiki
# type: postgres
# PostgreSQL / MySQL / MariaDB / MS SQL Server only:
# host: localhost
# port: 5432
# user: wikijs
# pass: wikijsrocks
# db: wiki
# ssl: false
# SQLite only:
# storage: path/to/database.sqlite
#######################################################################
# ADVANCED OPTIONS #
#######################################################################
# Do not change unless you know what you are doing!
# ---------------------------------------------------------------------
# Use X-Forwarded-For header
# ---------------------------------------------------------------------
# Enable only if Wiki.js is behind a reverse-proxy (nginx, apache, etc)
# or a cloud proxying services like Cloudflare.
trustProxy: false
# ---------------------------------------------------------------------
# SSL/TLS Settings
# ---------------------------------------------------------------------
# Consider using a reverse proxy (e.g. nginx) if you require more
# advanced options than those provided below.
ssl:
enabled: false
# Certificate format, either 'pem' or 'pfx':
format: pem
# Using PEM format:
key: path/to/key.pem
cert: path/to/cert.pem
# Using PFX format:
pfx: path/to/cert.pfx
# Passphrase when using encrypted PEM / PFX keys (default: null):
passphrase: null
# Diffie Hellman parameters, with key length being greater or equal
# to 1024 bits (default: null):
dhparam: null
# Listen on this HTTP port and redirect all requests to HTTPS.
# Set to false to disable (default: 80):
redirectNonSSLPort: 80
# ---------------------------------------------------------------------
# Database Pool Options
# ---------------------------------------------------------------------
# Refer to https://github.com/vincit/tarn.js for all possible options
pool:
# min: 2
# max: 10
# ---------------------------------------------------------------------
# IP address the server should listen to
# ---------------------------------------------------------------------
# Leave 0.0.0.0 for all interfaces
bindIP: 0.0.0.0
# ---------------------------------------------------------------------
# Log Level
# ---------------------------------------------------------------------
# Possible values: error, warn, info (default), verbose, debug, silly
logLevel: info
# ---------------------------------------------------------------------
# Upload Limits
# ---------------------------------------------------------------------
# If you're using a reverse-proxy in front of Wiki.js, you must also
# change your proxy upload limits!
uploads:
# Maximum upload size in bytes per file (default: 5242880 (5 MB))
maxFileSize: 5242880
# Maximum file uploads per request (default: 20)
maxFiles: 10
# ---------------------------------------------------------------------
# Offline Mode
# ---------------------------------------------------------------------
# If your server cannot access the internet. Set to true and manually
# download the offline files for sideloading.
offline: false
docker-compose.yml
version: '3'
services:
wikidb:
image: mongo:3
expose:
- '27017'
command: '--smallfiles --bind_ip ::,0.0.0.0'
environment:
- 'MONGO_LOG_DIR=/dev/null'
volumes:
- ./data/mongo:/data/db
wikijs:
image: 'requarks/wiki:latest'
links:
- wikidb
depends_on:
- wikidb
ports:
- '80:80'
environment:
WIKI_ADMIN_EMAIL: [email protected]
volumes:
- ./config.yml:/var/wiki/config.yml
wikijs log
wikijs_1 | 2019-09-10 19:31:34,335 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
wikijs_1 | 2019-09-10 19:31:34,344 INFO RPC interface 'supervisor' initialized
wikijs_1 | 2019-09-10 19:31:34,345 CRIT Server 'unix_http_server' running without any HTTP authentication checking
wikijs_1 | 2019-09-10 19:31:34,345 INFO supervisord started with pid 1
wikijs_1 | 2019-09-10 19:31:35,348 INFO spawned: 'wikijs' with pid 7
wikijs_1 | 2019-09-10 19:31:36,987 INFO success: wikijs entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
wikijs_1 | 2019-09-10 19:31:38,725 INFO reaped unknown pid 32
wikidb log
wikidb_1 | chown: cannot dereference '/proc/1/fd/1': Permission denied
wikidb_1 | chown: cannot dereference '/proc/1/fd/2': Permission denied
wikidb_1 | 2019-09-10T19:31:33.262+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=027c2912c3ae
wikidb_1 | 2019-09-10T19:31:33.263+0000 I CONTROL [initandlisten] db version v3.6.14
wikidb_1 | 2019-09-10T19:31:33.263+0000 I CONTROL [initandlisten] git version: cbef87692475857c7ee6e764c8f5104b39c342a1
wikidb_1 | 2019-09-10T19:31:33.263+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
wikidb_1 | 2019-09-10T19:31:33.263+0000 I CONTROL [initandlisten] allocator: tcmalloc
wikidb_1 | 2019-09-10T19:31:33.263+0000 I CONTROL [initandlisten] modules: none
wikidb_1 | 2019-09-10T19:31:33.263+0000 I CONTROL [initandlisten] build environment:
wikidb_1 | 2019-09-10T19:31:33.263+0000 I CONTROL [initandlisten] distmod: ubuntu1604
wikidb_1 | 2019-09-10T19:31:33.263+0000 I CONTROL [initandlisten] distarch: x86_64
wikidb_1 | 2019-09-10T19:31:33.263+0000 I CONTROL [initandlisten] target_arch: x86_64
wikidb_1 | 2019-09-10T19:31:33.263+0000 I CONTROL [initandlisten] options: { net: { bindIp: "::,0.0.0.0" }, storage: { mmapv1: { smallFiles: true } } }
wikidb_1 | 2019-09-10T19:31:33.263+0000 W - [initandlisten] Detected unclean shutdown - /data/db/mongod.lock is not empty.
wikidb_1 | 2019-09-10T19:31:33.263+0000 I NETWORK [initandlisten] getaddrinfo("::") failed: Address family for hostname not supported
wikidb_1 | 2019-09-10T19:31:33.263+0000 W NETWORK [initandlisten] Found no addresses for ::
wikidb_1 | 2019-09-10T19:31:33.268+0000 I - [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
wikidb_1 | 2019-09-10T19:31:33.268+0000 W STORAGE [initandlisten] Recovering data from the last clean checkpoint.
wikidb_1 | 2019-09-10T19:31:33.268+0000 I STORAGE [initandlisten]
wikidb_1 | 2019-09-10T19:31:33.268+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
wikidb_1 | 2019-09-10T19:31:33.268+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
wikidb_1 | 2019-09-10T19:31:33.268+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=484M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),compatibility=(release="3.0",require_max="3.0"),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
wikidb_1 | 2019-09-10T19:31:34.212+0000 I STORAGE [initandlisten] WiredTiger message [1568143894:212839][1:0x7ff92e601a40], txn-recover: Main recovery loop: starting at 8/256
wikidb_1 | 2019-09-10T19:31:34.221+0000 I STORAGE [initandlisten] WiredTiger message [1568143894:221954][1:0x7ff92e601a40], txn-recover: Recovering log 8 through 9
wikidb_1 | 2019-09-10T19:31:34.351+0000 I STORAGE [initandlisten] WiredTiger message [1568143894:351771][1:0x7ff92e601a40], file:index-3-7269498777406832629.wt, txn-recover: Recovering log 9 through 9
wikidb_1 | 2019-09-10T19:31:34.404+0000 I STORAGE [initandlisten] WiredTiger message [1568143894:404705][1:0x7ff92e601a40], file:index-3-7269498777406832629.wt, txn-recover: Set global recovery timestamp: 0
wikidb_1 | 2019-09-10T19:31:34.526+0000 W STORAGE [initandlisten] Detected configuration for non-active storage engine mmapv1 when current storage engine is wiredTiger
wikidb_1 | 2019-09-10T19:31:34.526+0000 I CONTROL [initandlisten]
wikidb_1 | 2019-09-10T19:31:34.526+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
wikidb_1 | 2019-09-10T19:31:34.526+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
wikidb_1 | 2019-09-10T19:31:34.527+0000 I CONTROL [initandlisten]
wikidb_1 | 2019-09-10T19:31:34.552+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
wikidb_1 | 2019-09-10T19:31:34.552+0000 I NETWORK [initandlisten] waiting for connections on port 27017
wikidb_1 | 2019-09-10T19:31:35.011+0000 I FTDC [ftdc] Unclean full-time diagnostic data capture shutdown detected, found interim file, some metrics may have been lost. OK
wikidb_1 | 2019-09-10T19:31:37.195+0000 I NETWORK [listener] connection accepted from 172.21.0.3:49146 #1 (1 connection now open)
wikidb_1 | 2019-09-10T19:31:37.239+0000 I NETWORK [conn1] received client metadata from 172.21.0.3:49146 conn1: { driver: { name: "nodejs", version: "2.2.31" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.15.0-62-generic" }, platform: "Node.js v8.15.0, LE, mongodb-core: 2.1.15" }
wikidb_1 | 2019-09-10T19:31:37.273+0000 I NETWORK [listener] connection accepted from 172.21.0.3:49148 #2 (2 connections now open)
wikidb_1 | 2019-09-10T19:31:37.283+0000 I NETWORK [listener] connection accepted from 172.21.0.3:49150 #3 (3 connections now open)
wikidb_1 | 2019-09-10T19:31:37.284+0000 I NETWORK [listener] connection accepted from 172.21.0.3:49152 #4 (4 connections now open)
wikidb_1 | 2019-09-10T19:31:38.607+0000 I NETWORK [listener] connection accepted from 172.21.0.3:49154 #5 (5 connections now open)
wikidb_1 | 2019-09-10T19:31:38.687+0000 I NETWORK [conn5] received client metadata from 172.21.0.3:49154 conn5: { driver: { name: "nodejs", version: "2.2.31" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.15.0-62-generic" }, platform: "Node.js v8.15.0, LE, mongodb-core: 2.1.15" }
wikidb_1 | 2019-09-10T19:31:38.709+0000 I NETWORK [listener] connection accepted from 172.21.0.3:49156 #6 (6 connections now open)
wikidb_1 | 2019-09-10T19:31:38.714+0000 I NETWORK [listener] connection accepted from 172.21.0.3:49158 #7 (7 connections now open)
That's not a valid configuration file. You're using a very outdated v2 beta configuration file format with a v1 docker image, which doesn't make any sense.
This is the configuration format you should be using: https://github.com/Requarks/wiki-v1/blob/master/config.sample.yml