Error while starting Daemon

when I run startdaeons.sh, I am getting error... what could be the reason? I have pcntl enabled with php.

/plugins/TwitterBridge/daemons/twitterstatusfetcher.php...PHP Fatal error: Call to undefined function posix_getpid() in /var/www/html/lib/daemon.php on line 90

Comments

  • @sarfaraz what version are you running? its posting to twitter working?
  • @aric I am using 0.9.0 and posting does not work.
  • @Sarfaraz okay first things first, we get posting to twitter working.

    you don't need startdaemons for just posting.

    can you paste your config.php and also tell me your setting for you twitter app (what you filled out to register your application to get the api keys at twitter/apps)

  • @Sarfaraz the daemons also use several functions from PHP's posix module. This is normally enabled by default, so it's a bit unusual for it not to be present on a Linux or other Unix-y system.

    Try installing a 'php5-posix' package if available, or recompile PHP configured without --disable-posix.

    http://us.php.net/manual/en/book.posix.php
  • Guys.. I know it is not a good practice at all, but I have removed the "posix_get()" line from the code and it started working. Now I can see the Twitter Posts.

    I will work over the weekend to find out what went wrong.
  • I put the posix_get() back... I was missing php posix process. But I see strange behavior when I run startdaeons.sh it keeps thrwoing error...
    1. Call to a member function blowNoticeCount() on a non-object in /var/www/html/classes/Notice.php on line 421
    2. Uncaught ServerException: [400]: [Notice] DB_DataObject error []: DB Error: already exists thrown in /var/www/html/classes/Memcached_DataObject.php on line 508

    If I close my SSH session... Twiiter updates stop showing up on my site...

    Please advise.
  • Anyone? Please help....
  • @Sarfaraz not sure about the errors on saving things, but for the backgrounding issue -- there are two handy ways to run things on the background on most unix-y servers:

    The traditional is the 'nohup' ('no hang-up') command, so you could run like this:

    nohup ./scripts/start_daemons.sh

    That'll disconnect the script from your terminal right at the start; any output it may generate should go to a 'nohup.out' file in the current directory.

    More fun if you have it available is the 'screen' command which lets you run multiple disconnectable login sessions in the background. It's a little confusing if you're not familiar with it, but there should be some good tutorials floating around the web. This is handy to start up the background process but be able to go back to it and work in the same terminal again (say to kill and restart it later, or whatever).
  • @brionv Thank a bunch... Any idea what are these errors?

    1. Call to a member function blowNoticeCount() on a non-object in /var/www/html/classes/Notice.php on line 421
    2. Uncaught ServerException: [400]: [Notice] DB_DataObject error []: DB Error: already exists thrown in /var/www/html/classes/Memcached_DataObject.php on line 508
  • @Sarfaraz is there some specific problem that these error messages are causing? Its possible that these errors are harmless.
  • @Aric there is some problem. Twitter post started working fine and I used to get only Memcached error...so I installed Memcached. Then I started getting blowNoticeCount() error and Twitter posts are still fine, but now it is not showing the users original avatar...and it is repeating the post several times
  • @Sarfaraz you have php5-memcache and memcached installed?

    anything in the logs about the avatars? is the twitter statusfetcher running as a user that has write permission in the /avatar folder?
  • @Safaraz Did you try restarting memcached?

    There were some issues with the TwitterStatusFetcher saving avatars and detecting notices that have been previously imported with 0.9.1. Can you try the latest version of the TwitterStatusFetcher from our git repository? http://gitorious.org/statusnet/mainline/blobs/master/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
  • This error occurs on my 0.9.1 system that does NOT use memcached (it's not enabled in the config.php).
  • I updated to the latest version, the error seems to have gone away. Thanks.
  • @zcopley You are awesome... replaced and the errors went away.. Thanks bunch all.
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