Problem with StatusNet 1.1.0-release and twitter daemons

edited July 2012 in Installation
I'm having trouble getting a new install of StatusNet 1.1.0-release to work with Twitter.

Currently:
Sign-in with Twitter works perfectly.
Local posts are pushed upstream correctly
Timeline and friend info downloads are not working

I'm using the following config.php:

------------- cut here -----------
<?php
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
$config['site']['name'] = 'Fruck Status';
$config['site']['server'] = 'status.fruck.org';
$config['site']['path'] = '';
$config['site']['fancy'] = true;
$config['site']['broughtby'] = 'Jacques Richer';
$config['site']['broughtbyurl'] = 'http://jacquesricher.com';
#$config['site']['profile'] = 'private';

$config['db']['database'] = 'mysqli://statusnet:badpassword@localhost/statusnet';
$config['db']['type'] = 'mysql';
$config['db']['schemacheck'] = 'script';

$config['queue']['enabled'] = true;
$config['queue']['subsystem'] = 'db';

$config['daemon']['user'] = 'www-data';
$config['daemon']['group'] = 'www-data';

addPlugin(
'TwitterBridge',
array(
'consumer_key' => 'mysecretconsumerkey',
'consumer_secret' => 'myreallysecretconsumersecret'
)
);
$config['twitterimport']['enabled'] = true;
$config['integration']['source'] = 'FruckStatus';
------------- cut here -----------

I'm running the db back-end to the queue system. The queue daemons are running from scripts/startdaemons.sh and seem to stay running. The twitter daemons show up as starting from the same script, but do not show up when I do 'ps ax | grep php'. I didn't see anything whatever from the twitter daemons in my syslog, or I'd have posted it.

Comments

  • @j_richer Did you add the T daemons to the getvaliddaemons script? If you don't they probably won't start.
  • Check of the listing below... From what I can tell, things are starting up, but not actually running. I can't figure out why.



    root@ishtar:/var/www/status.fruck.org/public_html# scripts/startdaemons.sh
    Starting /var/www/status.fruck.org/public_html/scripts/queuedaemon.php...DONE.
    Starting /var/www/status.fruck.org/public_html/scripts/imdaemon.php...DONE.
    Starting /var/www/status.fruck.org/public_html/plugins/TwitterBridge/daemons/synctwitterfriends.php...DONE.
    Starting /var/www/status.fruck.org/public_html/plugins/TwitterBridge/daemons/twitterstatusfetcher.php...DONE.
    root@ishtar:/var/www/status.fruck.org/public_html# ps ax | grep php
    1973 ? S 0:00 php /var/www/status.fruck.org/public_html/scripts/queuedaemon.php
    1974 ? S 0:12 php /var/www/status.fruck.org/public_html/scripts/queuedaemon.php
    1978 ? S 0:00 php /var/www/status.fruck.org/public_html/scripts/imdaemon.php
    1979 ? S 0:09 php /var/www/status.fruck.org/public_html/scripts/imdaemon.php
    1989 ? S 0:12 php /var/www/status.fruck.org/public_html/scripts/queuedaemon.php
    1990 ? S 0:12 php /var/www/status.fruck.org/public_html/scripts/queuedaemon.php
    1992 ? S 0:12 php /var/www/status.fruck.org/public_html/scripts/queuedaemon.php
    7508 pts/4 S+ 0:00 grep php
    root@ishtar:/var/www/status.fruck.org/public_html#



  • Hello,
    I guess HTML tag in you config file was inserted by forum...

    Please check & report your PHP version as well as extensions (native & pear).
    You can get pear extension list with: pear list

    Also exec /scripts/setconfig -a and check that all the config you mentionned is in here.
  • also,
    I checked your main/version page http://status.fruck.org/main/version

    You don't seem to have enabled OStatus module. Not sure it's a requirement but maybe that could help.
  • Checkconfig -a:
    http://pastebin.com/hxMHTtzd


    Pear List:

    Installed packages, channel pear.php.net:
    =========================================
    Package Version State
    Archive_Tar 1.3.7 stable
    Console_Getopt 1.2.3 stable
    PEAR 1.9.1 stable
    Structures_Graph 1.0.3 stable
    XML_Util 1.2.1 stable

    PHP Version:

    PHP 5.3.3-7+squeeze13 with Suhosin-Patch (cli) (built: Jun 10 2012 09:35:18)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

  • did you enabled OStatus plugin ?
  • Just did. Restarted. No discernible difference.
  • Thanks for feedback,
    Do you have any output in logs ?
    From you config details, I guess log could be in /var/log/debug
    Appname should be "statusnet" and script identifies itself as twitterstatusfetcher.php
  • oh, just forget one thing:
    please also run /scripts/checkschema.php

    TwitterBridge plugin require some specific DB stuff. It could explain why it does not start
  • Already ran checkschema. Nothing in var/log/debug from our dear friends the twitter daemons.
  • ok,
    Do you have anything in logs from statusnet ?
    If not, disable syslog and enable logfile. Just make sure it's writable by www-data
  • also,
    could you provide phpinfo from *php-cli* ?
    your daemons will use php-cli, not libapache2-mod-php5

    Make sure you have PCNTL support enabled
  • Interesting part:
    2012-07-13 09:29:33 LOG_ERR: [status.fruck.org:synctwitterfriends.php:27908] PEAR Error: DB Error: no database selected (SELECT *
    FROM foreign_link

    WHERE ( foreign_link.service = 1 )


    ORDER BY last_friendsync
    LIMIT 0, 25 [nativecode=2006 ** MySQL server has gone away])
    2012-07-13 09:29:33 LOG_ERR: [status.fruck.org:synctwitterfriends.php:27908] Lost DB connection; dying.


    Please check /etc/php5/conf.d/mysqli.ini to ensure you have (at least):
    extension=mysqli.so
    mysqli.reconnect = On

    And restart daemons
  • mysqli.ini already had the extension line.
    Added mysqli.reconnect line and restarted - same error in log file.
  • I used to have similar problems. Schemacheck set to script solved them. Running latest 1.1.0-release version, as well as the latest PHP-FPM version in Arch. This is definitely not a Statusnet bug.
  • edited July 2012
    The box is a clean install of Debian 6 with updates. With the exception of mailparse (built from source), PHP extensions are from repositories. There are several other PHP applications on the machine - none of which are having difficulty with MySql.

    Researching this particular PEAR error, I fount that the most common cause is using a DB handle after a disconnect. The working semantics of disconnect have changed recently, and I suspect that this might be a version mismatch problem, and that statusnet may well depend on the unsupported behavior of the prior version.

    If this isn't resolved by next weekend, I'll try setting up a new virtual machine with a backrev version of PEAR::MySqli to see if the problem goes away.
  • Another solution could be to use dotdeb repo.
    I'm currently using statusnet on an up-to-date Squeeze box with dotdeb (providing last versions of MySQL & PHP) without any issue.

    Could you try again starting dameons, with debug log enabled and post result ? It definitely looks like a configuration issue
  • According to http://lists.mysql.com/eventum-users/5212, this could be related to MySQL configuration.
    Since I don't see anything wrong with PHP & Statusnet, please provide your MySQL configuration ?
  • Nothing strange there...
    At this point, all I can tell you is to check this page:
    https://dev.mysql.com/doc/refman/5.0/en/gone-away.html

    and check/apply each possibility :-/

    Eventually try using socket instead of tcp connection for mysqli extension.
    So replace, in your config.php file:
    $config['db']['database']='mysqli://statusnet:badpassword@localhost/statusnet'
    with
    $config['db']['database']= 'mysqli://statusnet:badpassword@unix(/var/run/mysqld/mysqld.sock)/statusnet';
  • http://status.net/open-source/issues/3449#comment-35965
    Check your php.ini and make sure mysqli.reconnect is on
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID