Hi Chris,
thanks again for your help! I really appreciate it.
On 1/13/2014 10:19 PM, Chris Steipp wrote:
This often happens when Memcached can't be reached
/ used. CentralAuth
requires memcache caching, so make sure that's working.
Hm, weird. I just re-checked and memcached seems to be running:
# ps ax | grep memcached
12345 ?? Ss 0:48.20 /usr/local/bin/memcached -d -u _memcached -P
/var/run/memcached.pid
I started memcached a while ago like this:
sudo -u www memcached -d -l 127.0.0.1 -p 11211 -m 64
My memcached settings in LocalSettings.php look like this:
$wgMainCacheType = CACHE_MEMCACHED;
$wgParserCacheType = CACHE_MEMCACHED; # optional
$wgMessageCacheType = CACHE_MEMCACHED; # optional
$wgMemCachedServers = array( "127.0.0.1:11211" );
$wgSessionsInMemcached = true; # optional
However, I didn't install PECL memcache for PHP as recommended on the
Extension:Memcached page. I installed PECL memcache now and also
Extension:Memcached and on Special:Memcached it says:
127.0.0.1:11211 Memcached seems to be working fine!
After I installed PECL memcache I restarted Apache and I got the
following message (but I guess that's okay):
# apachectl start
Starting memcached
failed to listen on TCP port 11211: Address already in use
/usr/sbin/apachectl start: httpd started
This is expected on login, assuming you're
submitting the login form as a
logged out user (it does the user setup for all pages, including the login
page, before it starts handling the contents of the form itself. The
interesting stuff should be a few lines later.
Sorry, here is what debug-poolwiki.log looks like:
Start command line script /path/to/pool/w/maintenance/runJobs.php
CACHES: MemcachedPhpBagOStuff[main] MemcachedPhpBagOStuff[message]
MemcachedPhpBagOStuff[parser]
LocalisationCache: using store LCStore_DB
CentralAuthHooks::onUserLoadFromSession: no token or session
Fully initialised
IP: 127.0.0.1
Connected to database 0 at 1.2.3.4
LoadBalancer::reuseConnection: this connection was not opened as a
foreign connection
And debug-dewiki.log has entries like these:
Start command line script /path/to/de/w/maintenance/runJobs.php
CACHES: MemcachedPhpBagOStuff[main] MemcachedPhpBagOStuff[message]
MemcachedPhpBagOStuff[parser]
Class LanguageDe not found; skipped loading
LocalisationCache: using store LCStore_DB
Connecting to 1.2.3.4 dewiki...
Connected to 1.2.3.4 dewiki.
Connected to database 0 at 1.2.3.4
Dependency triggered: /path/to/de/w/languages/messages/MessagesDe.php
deleted.
LocalisationCache::isExpired(de): cache for de expired due to FileDependency
LocalisationCache::recache: got localisation for de from source
DatabaseBase::query: Writes done: DELETE FROM `l10n_cache` WHERE lc_lang
= 'de'
Unstubbing $wgParser on call of $wgParser::setFunctionHook from
SimpleSecurity::setup
Parser: using preprocessor: Preprocessor_DOM
Fully initialised
LoadBalancer::reuseConnection: this connection was not opened as a
foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a
foreign connection
LoadBalancer::reuseConnection: this connection was not opened as a
foreign connection
While debug-enwiki.log looks like this:
Start command line script /path/to/en/w/maintenance/runJobs.php
CACHES: MemcachedPhpBagOStuff[main] MemcachedPhpBagOStuff[message]
MemcachedPhpBagOStuff[parser]
LocalisationCache: using store LCStore_DB
Unstubbing $wgParser on call of $wgParser::setFunctionHook from
SimpleSecurity::setup
Parser: using preprocessor: Preprocessor_DOM
Connecting to 1.2.3.4 enwiki...
Connected to 1.2.3.4 enwiki.
Connected to database 0 at 1.2.3.4
Dependency triggered: /path/to/en/w/languages/messages/MessagesEn.php
deleted.
LocalisationCache::isExpired(en): cache for en expired due to FileDependency
LocalisationCache::recache: got localisation for en from source
DatabaseBase::query: Writes done: DELETE FROM `l10n_cache` WHERE lc_lang
= 'en'
Fully initialised
LoadBalancer::reuseConnection: this connection was not opened as a
foreign connection
If they're all in the same top level domain, this
is probably the better
way to do it.
Yes, they're just different subdomains, but they're all something like
xx.example.com. So I've set $wgCentralAuthCookieDomain = '.example.com';.
This should only happen if you have wgSecureLogin
enabled for a wiki, or
you have https in wgServer. You'll want to get that fixed before you can
get much further in setting up CentralAuth.
It seems to be a Firefox specific problem. I don't get this error with
other browsers. I deleted cookies and cache in Firefox and now it works.
Now I don't have to log in manually on each domain anymore, cool! :)
Thanks and cheers,
Till