23-May-2012

Wiki taken offline
The number of “users” that create an account on the VMS wiki to post spam content, chnages from day to day, but there is hardly a day that there aren’t any. It’s no big deal to spend 15 minutes a day – or twice a day – to disable these accounts and remove spam. But no day should be forgotten, or the data is captured by search engines – with all consequences. And I use the latest version of MoinMoin….
Wordpress – even the older version that I still have to use (no time to update) – offers the ability to disable creation of accounts, and if enabled, the email address needs to be valid. Anyway, each new user can only post comments – if enabled – and that is scanned for abusive content, deleting it when that is found; and there is also me to accept the comment – or refuse it…
Alas, MoinMoin – even this latest version – lacks such facilities, and my knowledge of Python is nill…
There is a way to prevent users to post messages: but that requires an HTTPS connection and setting things up in the configuration; I’ve tried it, but the documentation on the MoinMoin site isn’t conclusive and I ended upo with a wiki that didn;t start at all…

And with the holidayes approacjing, I thought it better to disable the wiki completely, until I have implemented a workable solution. For instance: generate a password and send it by email, to be changed manually on first access 🙂

Any help is appreciated!

The maintenance job has been changed to remove these disabled users automaticly – so that’s one more job I don’t have to bother about. But it’s better to prevent abusive accounts.

28-Mar-2012

Minor glitches on startup
There were still a few gltches in accessing the vmswiki, but it was fairly easy so find the cause: A wrong logical diskname for the LD-device holding Python and moinmoin (the wiki software) and a typo in defining moin_static – that I define as a searchlist, so I don’t have to move around with files when installing a new moinmoin version….
After that was settled and repaired, the wiki works like before – a slow starter but once started, pretty fast.
Blogs more responsive
The blogs are more responsive as well, and suffer less partial crashes – so far. More important: I have less trouble logging in into the admin pages. I must have cleaned up quite some things in the attempt of updating and reversing the whole activity.
But now I got the answers on what the heck had happened, I coud give it a try once more. In which case I may decide to upgrade WP as well. That normally is easy, no trouble at all, though I’ll have to prepare a thing or two. But every update went nice and smoothly. But I’ll take Mark’s suggestion: have a look first what changed between 5.2 (supplied by HP and ported by Mark Berryman – which is the current version I’m using curently) and 5.3 (as ported by Mark Berryman). Anyway I’ll have to use the version op PHPWASD that comes with this kit…

02-Feb-2012

Wiki repair
After questioning the issue on the WASD mailing list, it was obvious that Jean-François Piéronne would give the hint:

Hello Willem,

This is a MoinMoin known problem :

http://moinmo.in/MoinMoinBugs/ExceptionRaisedAtPageLoading

Describe as “Not a bug, just a little inconvenience”…

The provided workaround is “Run moin … maint cleancache.”

Jean-François

Following the link, it shows exactly the same errorm that I ran into, and the solution. But what does it mean?
The page also leads to the moin command, and to the subcommands, but the style is something to get used to. It has taken a few rounds of trial and deduction of the error.
First, the documentation states:The moin command is installed when you used setup.py. If invoking from the shell prompt does not find the moin command, you can also customize and use wiki/server/moin. Look into that script, there are some pathes to configure.. But there is no setup.py – it’s not located in the python environment, nor under moin_root.
But there is a moin.py, and that rings a bell:

$ python ≔= $python_root:[bin]python
$ python moin.py

would actually mean “RUN moin”
Next was to find out what command should be given:

$ python moin.py moin ... maint cleancache ...
as mentioned in the documenataion clearly wasn’t the right command. As it turned out:

$ python moin.py aint cleancache

was, but only after defining both moin_root and moin_wiki_root – the first being defined /SYSTEM/EXEC on system startup:

$ sho log moin*/full
...
(LNM$SYSTEM_TABLE) [kernel] [shareable,system]
[Protection=(RWC,RWC,R,R)] [Owner=[SYSTEM]]

"MOIN_ROOT" [exec] = "$1$LDA11:[MOIN193.]" [concealed,terminal]
...

but moin_wiki_root is a process-logical setup when Python is started, it refers to the root of the wiki, as a process logical, so I set it manually:
$ define moin_wiki_root WEB_DISK2:[WIKI.wikivms.]/trans=concealed

and the configuration file is located in moin_wiki_root:[mywiki], and referencing the configfile is in fact mandatory, the command to use is:

$ python moin.py --config-dir=/WEB_DISK2/WIKI/wikivms/mywiki maint cleancache

povided your current default is the directroy where moin.py resides; typically MOIN_ROOT:[MoinMoin.script]

So the whole sequence to clear the wiki after a Python update is:

* be sure MOIN_ROOT is defined
* be sure MOIN_WIKI_ROOT is defined

In my case:

$ sho log moin*/full

(LNM$PROCESS_TABLE) [kernel]
[no protection information]

"MOIN_WIKI_ROOT" [super] = "WEB_DISK2:[WIKI.wikivms.]" [concealed]

(This refers to the wiki you need to work on)

(LNM$SYSTEM_TABLE) [kernel] [shareable,system]
[Protection=(RWC,RWC,R,R)] [Owner=[SYSTEM]]

"MOIN_ROOT" [exec] = "$1$LDA11:[MOIN193.]" [concealed,terminal]

This refers to the location of the MoinMoin code

"MOIN_STATIC" [super] = "$1$LDA11:[MOIN193.share.moin.htdocs.]" [concealed,terminal]
= "WEB_DISK2:[WIKI.wikivms.mywiki.]" [concealed]

This is local: all fixed data (not related to the MoinMoin version) – for instance, the logo on the wiki

(LNM$SYSCLUSTER_TABLE) [kernel] [shareable,system]
[Protection=(RWC,RWC,R,R)] [Owner=[SYSTEM]]

(DECW$LOGICAL_NAMES) [exec] [shareable]
[Protection=(RWCD,RWCD,R,R)] [Owner=[SYSTEM]]

* Change directory to the location where moin.py is located:

$ set def MOIN_ROOT:[MoinMoin.script]
$ sho def
MOIN_ROOT:[MoinMoin.script]

* define python command:
$ python ≔= $python_root:[bin]python

* Keep in mind where the configuration file (wikiconfig.py) is located – typically it’s MOIN_WIKI_ROOT:[mywiki]. Now you can start the command:
$ python moin.py --config-dir=/WEB_DISK2/WIKI/wikivms/mywiki maint cleancache
This start working:

2012-02-02 20:26:02,719 WARNING MoinMoin.log:139 using logging configuration read from built-in fallback in MoinMoin.log module!
2012-02-02 20:26:08,294 INFO MoinMoin.config.multiconfig:127 using wiki config: /WEB_DISK2/WIKI/wikivms/mywiki/wikiconfig.pyc

After this ends, the wiki starts again.

Advantage
Before there has been a new user created every four hours or so. But when the trouble stared, there seems to be have been just one attempt that failed (because the wiki didn’t respond normally?), and the sequence did not restart after the issue was solved. Up to now there have been no attempt to create bogus users… Hopefully, this stays that way (but I doubt it)

30-Jan-2012

More on the wiki
The main issue found yesterday was in a commandfile that is started by the server – it refers to an object or method that does no longer exist. So chances were there would be a new version with the new Pthon version.
And so there was: a template is supplied! So I copied the file to the location the wiki maps to and where the file is expected to reside.
Now it takes a while to show a next error:

ERROR 502 - External agent did not respond (or not acceptably)

Traceback (most recent call last):
File "/moin_root/MoinMoin/wsgiapp.py", line 284, in __call__
response = run(context)
File "/moin_root/MoinMoin/wsgiapp.py", line 88, in run
response = dispatch(request, context, action_name)
File "/moin_root/MoinMoin/wsgiapp.py", line 138, in dispatch
response = handle_action(context, pagename, action_name)
File "/moin_root/MoinMoin/wsgiapp.py", line 197, in handle_action
handler(context.page.page_name, context)
File "/moin_root/MoinMoin/action/__init__.py", line 268, in do_show
content_only=content_only,
File "/moin_root/MoinMoin/Page.py", line 1198, in send_page
start_line=pi['lines'])
File "/moin_root/MoinMoin/Page.py", line 1292, in send_page_content
self.execute(request, parser, code)
File "/moin_root/MoinMoin/Page.py", line 1323, in execute
exec code
File "StartingPage", line 2, in
TypeError: 'dict' object is not callable

This is something else – inside the wiki code, as it seems.

It could have been a matter of the RunTimeEnvironment – so I got the latest from the WASD site, built and installed it. But it doesn’t make a difference. And according the message there is something within the wiki code or one of the pages…..

For a change, the WATCH output is of little help, it just shows the right mapping and the error as shown. ime to ask the WASD list….

29-Jan-2012

Updates
Three updates to be done, without much of a problem. At least, that’s anticipated.
Mysql
I’m running the release by Jean-François Piéronne, currently version 5.1.23, which has been released quite some time ago. Latest version as today is 5.1.46; same level but probably enhanced. So I updated the database, following the recommendations of the wiki on his site. There is a small typo in this document, but if you know VMS, it’s not much of a problem.
After restart, you need to update a number of tables but the script runs into a number of “Column already exists” errors. I don’t think it matters much, since the database runs fine after that.
The first attempt to access the blogs using IE8 failed but that may have been caused by running PHP-processes that lost connection the database (obviously the database needed to be stopped…)
Anyway, MySQL is now up-to-date.
Python and related
Second there are the Python updates. These come as logical devices: containers conta8ng all files, to be mounted as disks: one containing the libraries, and one containing the running software – one of them being the MoinMoin wiki. That update requires logical disks to be redefined, and some more logicals to be redefined.
This has all been taken care of, but for some reason, something goes wrong in running the WASD-procedure that starts the wiki:

ERROR 502 - External agent did not respond (or not acceptably)

Traceback (most recent call last):
File "sys$input", line 12, in

ImportError: No module named server.server_wsgi

I found the cause in the startup-file:

$ proc = f$environment("PROCEDURE")
$ proc_dir = f$parse(proc,,,"DEVICE") + f$parse(proc,,,"DIRECTORY")
$ @'proc_dir'logicals
$ @python_vms:setup
$ define PYTHON_FILE_SHARING 1
$ mcr cgi_exe:pyrte sys$input

# Debug mode - show detailed error reports
import os
os.environ['MOIN_DEBUG'] = '1'

import sys
import wasd

sys.path.insert(0, '/moin_root/')
sys.path.insert(0,'/moin_wiki_root/mywiki/')

from MoinMoin.server.server_wsgi import moinmoinApp, WsgiConfig < ---- Line 12 class Config(WsgiConfig): logPath = '/moin_wiki_root/logs/moin.log' # adapt to your needs! #loglevel_file = logging.INFO # adapt if you don't like the default config = Config() # MUST create an instance to init logging if __name__ == '__main__': while wasd.cgiplus_begin(): wasd.wsgi_run(moinmoinApp) $ $

There must be something changed internally???
I remember there is something in the WASD mailing list on the matter, so I'll have to dig the archives. But after I have removed all bogus accounts (prior to the installation...) there is little chance they have the opportunity to retry 🙂

So for the time being, the VMS-wiki won't start when acessed. Sorry for that.