requarks / wiki-v1

Legacy version (1.x) of Wiki.js
https://wiki.js.org
GNU Affero General Public License v3.0
101 stars 75 forks source link

No logs being generated on wiki js 1.0 #216

Open itsCodyBo opened 5 years ago

itsCodyBo commented 5 years ago

Describe the bug

Running the latest wiki.js 1.x stable release using node server fails to produce any logs whatsoever.

I am currently trying to debug an ldap issue and when I navigate to ./wikijs/logs/ the directory is empty. I have looked under ./wikijs/server/ as well and see nothing.

Running the following also produces no logs:

pm2 logs wiki --lines 100

To Reproduce Steps to reproduce the behavior:

  1. Download wiki.js 1.x latest stable release
  2. Run node server
  3. Error logging into LDAP (unrelated to this specific issue)
  4. See error in <location>/wikijs/logs

Expected behavior

Logs to be produced for debugging purposes. In this specific scenario, the error log of the LDAP failed authentication.

Host Info (please complete the following information):

Additional Info:

I have walked through the following related issues:

https://github.com/Requarks/wiki/issues/254

100

But they don't seem to help. I'm hoping that some one could help me fix this issue (which I'm sure is my fault) because without logs I'm dead in the water :(

Love your work!

NGPixel commented 5 years ago

No logs are being written to <location>/wikijs/logs from that command. Not sure where you found that path...

So in your case, you'd need to look at the output of your console.

itsCodyBo commented 5 years ago

Sorry @NGPixel I should have clarified that better...

The <location>/wikijs/ directory mentioned above is just the generic location of where I downloaded wiki.js. Sorry for any confusion that caused.

When I run using node server as described above, the only console output I see is a repeat of the following message:

2019-06-13T12:30:09.711Z - info: [AGENT] All jobs completed successfully! Going to sleep for now.
2019-06-13T12:35:00.863Z - info: [AGENT] Running all jobs...
2019-06-13T12:35:00.863Z - info: [AGENT] Performing pull from remote Git repository...
2019-06-13T12:35:06.059Z - info: [AGENT] Git Pull completed.
2019-06-13T12:35:06.064Z - info: [AGENT] Git Push skipped. Repository is already in sync.
2019-06-13T12:35:06.070Z - info: [AGENT] All jobs completed successfully! Going to sleep for now.
2019-06-13T12:40:00.868Z - info: [AGENT] Running all jobs...
2019-06-13T12:40:00.868Z - info: [AGENT] Performing pull from remote Git repository...

It doesn't seem to give any output (much less error statements) as I fail to login to LDAP, move through the site, etc.

I should note that the wiki boot utility has also not been working for me, and node server is the only way for me to start my wiki currently. I tried following the directions for the similar issue that was opened at the following: (https://github.com/Requarks/wiki-v1/issues/100) - but to no avail. Perhaps these two issues could be related?

itsCodyBo commented 5 years ago

As a follow up to this, I was able to get the wiki running using node wiki start but still no logs are being generated. However, I can see logs when I run the following command:

pm2 logs wiki --lines 200

The output matches that from my previous comment. If the situation is simply that authentication failures are not logged here is there another place I can go to try and debug the problem I'm having with LDAP? Again the only thing I see in my logs is:

2019-06-13T12:30:09.711Z - info: [AGENT] All jobs completed successfully! Going to sleep for now.
2019-06-13T12:35:00.863Z - info: [AGENT] Running all jobs...
2019-06-13T12:35:00.863Z - info: [AGENT] Performing pull from remote Git repository...
2019-06-13T12:35:06.059Z - info: [AGENT] Git Pull completed.
2019-06-13T12:35:06.064Z - info: [AGENT] Git Push skipped. Repository is already in sync.
2019-06-13T12:35:06.070Z - info: [AGENT] All jobs completed successfully! Going to sleep for now.
2019-06-13T12:40:00.868Z - info: [AGENT] Running all jobs...
2019-06-13T12:40:00.868Z - info: [AGENT] Performing pull from remote Git repository...

Which is not very useful for debugging purposes.

NGPixel commented 5 years ago

LDAP errors won't be output to the logs. You need to make the modifications described in https://github.com/Requarks/wiki/issues/360#issuecomment-353826447

itsCodyBo commented 5 years ago

Sorry @NGPixel but I'm still seeing two separate issues apart from my LDAP thing:

1) Even when I run the wiki via node wiki start no logs are produced, LDAP or otherwise

2) https://gist.github.com/NGPixel/ae1a6057931f361b6633c74d01d31837 <- The issue you linked me to was somewhat helpful, but it advises me to replace my auth.js file with the one here. The problem is that this links to two separate files and I'm not sure how to translate server_controllers_auth.js and server_libs_auth.js into replacing auth.js in my ./server/controllers/auth.js folder.

I appreciate the responsiveness thus far.