Code Monkey home page Code Monkey logo

moinmoin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

moinmoin's Issues

"unvalid user name or password" at page LanguageSetup

Hello dperson,
Thank you very much for the useful Docker package and good documentation.

I have used moinmoin for several years, but now I want to use a Synology NAS for easier data security.
The installlation was easy.

But when I start with moinmoin page LanguageSetup and want to login,
I got the message "unvalid user name or password" (translation from German).
I had already set a username "mmAdmin" and a password.

When I look into the /usr/local/share/moin# cat data/event-log
I found no understandable information:
1674249071278306 VIEWPAGE pagename=FindPage&HTTP_USER_AGENT=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%3B+rv%3A109.0%29+Gecko%2F20100101+Firefox%2F109.0&HTTP_REFERER=https%3A%2F%2F192.168.17.74%3A4433%2FHelpContents&REMOTE_ADDR=172.17.0.1
1674249085295489 VIEWPAGE pagename=FrontPage&HTTP_USER_AGENT=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%3B+rv%3A109.0%29+Gecko%2F20100101+Firefox%2F109.0&HTTP_REFERER=https%3A%2F%2F192.168.17.74%3A4433%2FFindPage&REMOTE_ADDR=172.17.0.1
1674249115307809 VIEWPAGE pagename=ActiveRFProbeBF998&HTTP_USER_AGENT=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%3B+rv%3A109.0%29+Gecko%2F20100101+Firefox%2F109.0&HTTP_REFERER=https%3A%2F%2F192.168.17.74%3A4433%2FFrontPage&REMOTE_ADDR=172.17.0.1
1674274969108808 VIEWPAGE pagename=FrontPage&HTTP_USER_AGENT=Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10.14%3B+rv%3A109.0%29+Gecko%2F20100101+Firefox%2F109.0&HTTP_REFERER=https%3A%2F%2F192.168.17.74%3A4433%2FHelpContents&REMOTE_ADDR=172.17.0.1
1674281750169906 VIEWPAGE pagename=LanguageSetup&HTTP_USER_AGENT=Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10.14%3B+rv%3A109.0%29+Gecko%2F20100101+Firefox%2F109.0&HTTP_REFERER=https%3A%2F%2F192.168.17.74%3A4433%2FFrontPage&REMOTE_ADDR=172.17.0.1

How can I debug that?
Greetings, rudi

invalid request block size with nginx docker

I'm using the official nginx docker for a reverse proxy

on first run I get this log:

*** Starting uWSGI 2.0.17 (64bit) on [Wed Jun 20 21:54:12 2018] ***
compiled with version: 6.4.0 on 27 March 2018 12:43:27
os: Linux-4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07)
nodename: 8c99210468a4
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /
writing pidfile to /tmp/uwsgi-moinmoin.pid
detected binary path: /usr/sbin/uwsgi
setuid() to 100
chdir() to /usr/local/share/moin
your memory page size is 4096 bytes
 *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** 
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: enabled
uwsgi socket 0 bound to UNIX address /tmp/uwsgi.sock fd 3
uwsgi socket 1 bound to TCP address 0.0.0.0:3031 fd 4
Python version: 2.7.14 (default, Dec 14 2017, 15:51:29)  [GCC 6.4.0]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x7f90e77b33a0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 364600 bytes (356 KB) for 4 cores
*** Operational MODE: preforking ***
added /usr/local/lib/python2.7/site-packages/ to pythonpath.
added /usr/local/share/moin/ to pythonpath.
2018-06-20 21:54:12,472 INFO MoinMoin.log:151 using logging configuration read from built-in fallback in MoinMoin.log module
2018-06-20 21:54:12,472 INFO MoinMoin.log:157 Running MoinMoin 1.9.9 release code from /usr/local/lib/python2.7/site-packages/MoinMoin
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x7f90e77b33a0 pid: 7 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 7)
spawned uWSGI worker 1 (pid: 13, cores: 1)
spawned uWSGI worker 2 (pid: 14, cores: 1)
spawned uWSGI worker 3 (pid: 15, cores: 1)
spawned uWSGI worker 4 (pid: 16, cores: 1)
invalid request block size: 21573 (max 4096)...skip
invalid request block size: 21573 (max 4096)...skip

Not really sure what's goingon, but I note that the max request block size (last lines) is 4096, which happens to be the same as the memory page size mentioned earlier. Is this to do with the warning about harakiri?

werkzeug BrokenFilesystemWarning

I see errors about BrokenFilesystemWarning. It turns out it's related to the locale not being setup. Python defaults to saying the filesystem is ASCII and Werkzeug takes issue with that an insists its UTF-8. See http://werkzeug.pocoo.org/docs/0.11/unicode/#filesystem-encoding.

The solution is to setup the locale, I have just set environment vars:

environment:
  LANG: C.UTF-8
  LC_ALL: C_UTF-8

That has fixed the error, everything seems happy.

You can probably put some default ENVs in the Dockerfile or document that they should be set when running the image, e.g. in docker-compose.yml or docker run command.

Alternatively you can apt-get install locales and possibly locales-all and use locale-gen etc. but I think that's too much. Then again this is using Debian and not Alpine... so it's not like it's minimal.

Problem when prefix=/

When setting PREFIX=/, the wiki not work probably. It was caused by the wrong url_prefix_static settings。

# If you run your wiki script at the root of your site (/), just do NOT
# use this setting and it will automatically work.

In Dockerfile:

   sed -e '/logo_string/ { s/moinmoin/docker/; s/MoinMoin // }' \
                -e '/url_prefix_static/ {s/#\(url_prefix_static\)/\1/; s/my//}'\
.....

1.9.9 patch not being applied properly

David,

I'm building a alpine based image for moinmoin and lovingly stealing the moinmoin install from your Dockerfile. I've found that you're not applying the patch properly, as it was hanging on me in my interactive testing. I grabbed your latest image to confirm, and the patch is definitely not getting applied in your image.

% docker run -it dperson/moinmoin:latest /bin/bash
root@fa096eb7ed8a:/# cd /usr/local/lib/python2.7/dist-packages/MoinMoin/
root@fa096eb7ed8a:/usr/local/lib/python2.7/dist-packages/MoinMoin# grep digestmod user.py
root@fa096eb7ed8a:/usr/local/lib/python2.7/dist-packages/MoinMoin# grep hashlib user.py
import hashlib
        hash = hashlib.new('sha1', pwd)
                        hash = hashlib.new('sha1', password.encode('utf-8'))
                            hashlib.new('sha1', password.encode('utf-8')).digest()).rstrip()
root@fa096eb7ed8a:/usr/local/lib/python2.7/dist-packages/MoinMoin# grep hmac.new user.py
        h = hmac.new(key, msg).hexdigest()
        h = hmac.new(str(self.recoverpass_key), str(stamp)).hexdigest()

Also, looking at your docker build logs, I don't see the patches getting applied there.

You need to replace:

patch -p0 ../raw

in your Dockerfile with:

patch -p1 < ../raw

Docker 1.13.1 does not like -u "wiki:3031;/wiki"

Hello D,
First, thank you for publishing this container! It is a great time saver.
I am running the std docker.io/nginx, configured and linked to your wiki container.
I am using Docker 1.13.1 and it does not accept -u "wiki:3031;/wiki"
When I run nginx without, it seems to work, /wiki pulls up moinmoin,
but I have not gone any further than just pulling up the initial empty page.
Do you think it's needed? Is there an alternate way to specify this to docker?
--John

Can't change the prefix to '/'

I get '403 Forbidden' when i try to change the prefix to '/'

docker run -e PREFIX=/ --name wiki -d -v /srv/moinmoin:/usr/local/share/moin/data dperson/moinmoin                                                                           
docker run --name web --link wiki:wiki -p 80:80 -p 443:443 -d dperson/nginx -u "wiki:3031;/"

Latest nginx breaks dperson/moinmoin, requires larger buffer specified on uwsgi command line

Hi David!

First, thank you so much for this great contribution! It saved me a lot of time, and I know it has helped other MoinMoin lovers make that big leap to Docker.

I run the generic Docker nginx with dperson/moinmoin and it works great. But we are always under pressure to take nginx updates for security. In a recent nginx pull, it broke dperson/moinmoin due to the buffer size nginx passes to uwsgi. The fix is quite simple, to specify a larger buffer on the uwsgi command line in /usr/bin/moin.sh (below).

--- moin.sh.orig        2020-08-20 09:35:27.237983173 -0700
+++ moin.sh     2020-08-20 09:35:12.727715514 -0700
@@ -86,6 +86,7 @@
     [[ "${LANG:-""}" ]] || export LANG=en_US.UTF-8
     exec uwsgi --uid uwsgi \
                 -s /tmp/uwsgi.sock \
+                -b 32768 \
                 --uwsgi-socket 0.0.0.0:3031 \
                 --plugins python \
                 --pidfile /tmp/uwsgi-moinmoin.pid \

Backups

How data can be preserved and how to make backups?

how to persist the data?

I am trying to persist the data of my wiki.
I run the follwing commands:

  1. docker create -v /usr/local/share/moin/data --name moinmoindata debian
  2. docker run --name wiki -d --volumes-from moinmoindata dperson/moinmoin
  3. docker run --name web --link wiki:wiki -p 80:80 -p 443:443 -d dperson/nginx -u "wiki:3031;/wiki"

when I go to https://foo.my-laptop.com/wiki i see:
"ConfigurationError data_dir "/usr/local/share/moin/data" does not exist, or has incorrect ownership or permissions. Make sure the directory and the subdirectory "pages" are owned by the web server and are readable, writable and executable by the web server user and group."
ls -l /usr/local/share/moin => drwxr-xr-x 2 www-data www-data 4.0K Apr 24 01:37 data

any clues?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.