Postgres config references for new wikijs install #3426
Replies: 39 comments
-
can you please post the error messages? |
Beta Was this translation helpful? Give feedback.
-
Oops! facepalm Good catch @jianbin-wei original post updated! |
Beta Was this translation helpful? Give feedback.
-
Hmm... what node.js version you installed? |
Beta Was this translation helpful? Give feedback.
-
$ node --version |
Beta Was this translation helpful? Give feedback.
-
As far as I can tell that's a valid version of nodejs? |
Beta Was this translation helpful? Give feedback.
-
This is what I use and it works. Maybe you want to try a clean setup?
node version
|
Beta Was this translation helpful? Give feedback.
-
@jianbin-wei That is very close to what I'm using, except I have Postgres running on a different machine so I'm using the IP of that machine instead of localhost. How did you setup postgres? What about the wikijs user & table in postgres? |
Beta Was this translation helpful? Give feedback.
-
This is how I run Also you may want to try the docker+vs code https://docs.requarks.io/dev if everything else does not work. |
Beta Was this translation helpful? Give feedback.
-
I'll have to compare commands, but that's probably how mine is running (I'm using systemctl to run postgres, but it's probably just doing the same thing behind the scenes). Also, I'm running these in headless Linux VMs. I have not figured out a way to get VSCode to run in such an environment. If you happen to know a way to do headless VSCode remotely, I would be greatly appreciative :) as I have been fighting this issue for a while. (Currently looking at VSCodespaces, but I digress) I'm just shooting in the dark. But I feel like it MUST be a postgres issue if switching to a different database (Mariadb) on the same wiki.js install works, right? |
Beta Was this translation helpful? Give feedback.
-
What about the commands used in Postgres to create the permissions for the user & table? Maybe that's the problem? How did you create the user/table & how did you give that user permission to modify the table as needed? |
Beta Was this translation helpful? Give feedback.
-
I set it as the owner for my wiki database. |
Beta Was this translation helpful? Give feedback.
-
nod That's what I intended to do, but I'm wondering if it took or if I did it right? Would you mind sharing the commands that you used? (I've got some experience with mariadb/mysql but this is my first use with postgres) |
Beta Was this translation helpful? Give feedback.
-
I used pgadmin for that 😀 |
Beta Was this translation helpful? Give feedback.
-
Ohh, this seems way nicer than CLI & it has a web server!! I like it :) Will definitely give it a try! Thanks @jianbin-wei |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, this is proving more difficult to get a browser over there than I expected....so for the time being I am sticking with the CLI approach to postgres >_> This is where my permissions stand. Please let me know if there are any problems. I set this up with these commands:
Note: I modified spacing on table to make it work (less worse) on github, any errors in whitespace are probably mine. Everything else was copied from terminal.
|
Beta Was this translation helpful? Give feedback.
-
So I'll be curious as to why this is such a weird state of things. This is basically a fresh install of wikijs & a fresh install of postgres, just on different machines! And we know wikijs sees postgres. |
Beta Was this translation helpful? Give feedback.
-
Update: The system hosting my postgres died & I was unable to recover an uncorrupted version of postgres. Therefore, I have created a new postgres from scratch & am attempting to set it up from scratch. Commands in postgres (after install)
Also modified I am still getting the following error whne I run 'node server' on the wikijs machine.
|
Beta Was this translation helpful? Give feedback.
-
So looking at the setup.js code, the last of my output seems to correspond to the last few lines of code (as far as I can tell, I'm far from an expert). So it may not be setup but whatever is run next---what would that be & how would I tell? trying to see if @Smankusors is correct in the assumption that this is NOT postgres related, which means it must be node/js related, right? |
Beta Was this translation helpful? Give feedback.
-
hmm it could be... well it seems like the error happens when https://github.com/Requarks/wiki/blob/9e08718ee904046f8b2294ef6ac79e8a75a451e3/server/setup.js#L384 |
Beta Was this translation helpful? Give feedback.
-
The install page https://docs.requarks.io/install/requirements does not list acceptable Linux versions. I'm using Ubuntu Server 20.04 could that be an issue in some way, given that we know my version of NodeJS is good? |
Beta Was this translation helpful? Give feedback.
-
hmm IMO it's recommended to install nodejs from the instructions provided by official website here. With this you can choose which version do you want. Or, maybe skip the package manager and just download the binary only. |
Beta Was this translation helpful? Give feedback.
-
Whelp, I'm running v14.7.0 of NodeJS. Can't remember if it came with or if I installed manually. Either way, that's the version on the OS (which I believe is fine). I was wondering if there was anything else that was being called that could be problematic. Like some bash function or OS call? |
Beta Was this translation helpful? Give feedback.
-
Hmm idk really. Currently I just use Docker to avoid potential issues like you describe. 😉 |
Beta Was this translation helpful? Give feedback.
-
Hahaha, I always run into weird issues with Docker so I've learned to avoid it myself >_> |
Beta Was this translation helpful? Give feedback.
-
Huh weird issues? |
Beta Was this translation helpful? Give feedback.
-
In general yeah. Frankly stuff like this :p Haven't tried with wikijs specifically though.... But I'm still stuck on the fact that changing databases seems to work >_> |
Beta Was this translation helpful? Give feedback.
-
I meet the same issue when using the example of a Docker Compose from https://docs.requarks.io/install/docker version: "3"
services:
db:
image: postgres:11-alpine
environment:
POSTGRES_DB: wiki
POSTGRES_PASSWORD: wikijsrocks
POSTGRES_USER: wikijs
logging:
driver: "none"
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql/data
wiki:
image: requarks/wiki:2
depends_on:
- db
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: wikijs
DB_PASS: wikijsrocks
DB_NAME: wiki
restart: unless-stopped
ports:
- "80:3000"
volumes:
db-data: But have no idea how to solve it. |
Beta Was this translation helpful? Give feedback.
-
Also wanted to bump. I just made a clean VM yesterday & followed the instructions on https://docs.requarks.io/install/ubuntu (which include docker, so I used docker). I still get the same error when I try & run the container >_< update: For clarification, this is using a brand new database on the same VM. Not the previous database I configured. |
Beta Was this translation helpful? Give feedback.
-
I have the same issue... Nevermind: It turned up because SSL_ACTIVE was set to true, even though I run the container through traefik. |
Beta Was this translation helpful? Give feedback.
-
I also have created 2 instances. The SQL database maintains the logo and login page images. The postgres database will black out both images on reboot. Like SQL the Postgres database in freshly installed, what am I doing wrong?. |
Beta Was this translation helpful? Give feedback.
-
Question
I am trying to setup a new install of wikijs with postgres. However I am not having luck setting up postgres. Are there any walkthroughs or other references for setting up a new postgres database for wikijs?
I saw a list of migration tools on the wiki, but I am talking of a fresh install. Something like the "systemctl" on the initial install page would be perfect!
** More Background**
I have an old version of wikijs (still v2.something) that ran on mariadb, but never used it for more than testing. I also had some weird configs in there as a result of some bad/stupid tests I ran, so I'd prefer to start fresh over migrate.
To be clear, postgres is installed fine (on a separate machine) and I am able to connect with the postgres client. I am also able to run the new instance from the mariadb database but when I put in the postgres configs, it seems to connect ok & then immediately fail after the message to go to port 3000 appears.
As I was able to do this in mariadb but find myself unsuccessful in postgres; I think all I need is some reference showing me a "simple" config for postgres. Since wikijs seems to be strongly migrating towards postgres over mariadb or mysql, it seems likely to me that others will need such a reference in the future.
Host Info:
OS: Ubuntu 18.04
Wiki.js version: 2.4.107
Database engine: postgres (hopefully)
Actual error
please note that
/home/server/wiki
is a softlink to/home/server/wiki-v001
Also not that this error repeats verbatum roughly once a second indefinitely.
Beta Was this translation helpful? Give feedback.
All reactions