SVN: vlogger crashing

Discussion in 'Developers' Forum' started by zabersoft, Sep 16, 2010.

  1. zabersoft

    zabersoft Member

    Hi,

    In reference to my earlier post:

    http://how2forge.net/forums/showthread.php?t=48646

    As soon as I got sites_web_domain_add working with the hack I mention at the bottom of the thread, a new problem cropped up - as soon as server.sh is run after I do the remoting it hangs on restartHttpd and in the apache log I see this:

    Code:
    panic: fold_constants JMPENV_PUSH returned 2 at /usr/local/ispconfig/server/scripts/vlogger line 540.
    On that line in vlogger I see this:

    Code:
     print "Unable to store vlogger data in database\n";
    What could cause the vlogger to suddenly be unable to store data in the DB? Adding clients/domains manually through ISPConf works fine - and I have made no changes except get the remoting stuff working - so there is something going wrong in that process which has this profound effect on vlogger.

    PS: This only happens the first time server.sh is run. If I kill the process and delete the lockfile, it runs fine the second time 'round
     
  2. zabersoft

    zabersoft Member

    Oh sorry ...

    Ok I tracked this problem to the way I was automatically running server.sh - seems like I didn't have all the rights I should have and that caused vlogger to fail. I will be posting another post regarding running server.sh as root from apache as I think I have found a solution to this age-old conundrum - as soon as this issue is resolved, that is.

    Thank you for your time.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    server.sh is always run by a root cronjob, it is not run by apache and you should not run the script manually. Also vlogger is never run by server.sh. It seems as you mix up the ispconfig architecture a bit here.
     
  4. zabersoft

    zabersoft Member

    Hi Till,

    Thanks for the feedback. You are correct vlogger is not run by server.sh - but when server.sh restarts apache, vlogger is run (for some reason) - and this is what is crashing for me.

    I know that you want server.sh to be run by the cron job, and if you need actions immediatly following its execution you create an extension.

    I am in the position however where I am thinking about two things:

    1) Our process is time sensitive - that is, we want directories, db, ftp etc. etc. to be created as quickly as possible after we have called the remoting functions

    2) We want our system to be as self-contained as possible for easier maintenance and migration. That is, we don't want to tweak ispconfig files too much as this adds to installation complexity of our system.

    Now, the thing is we have actually found a way to invoke server.sh as root from an apache web process - that works reliably. Something that a lot of people out there have been trying to do. In short, we take advantage of the fact that an executable is allowed to have its setuid and setgid bits set - which enables us to call our custom executable which then runs as root and in turn runs server.sh

    Everything works peachy - things that wouldn't work before like e.g. creating directories etc. works just fine - so server.sh is indeed running as root.

    Now the problem is just that - after updating to the latest SVN - vlogger has some problem updating the database it seems. I do not know why - yet - and I am 100% sure that our approach here was working fine before the SVN update.

    Running server.sh manually and when invoked by the cron job works just fine - so there is still some "snag" or issue with our method of running server.sh via. our custom executable that has cropped up. I am in the process of investigating what might specifically be preventing vlogger from doing its job
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig is a multiserver controlpanel, so the controlpanel does not nescessarily run on the same server then the apache webserver. Almost all larger installs use the multiserver features and in these enviroments you can not simply call server.sh from apache.

    Regarding your vlogger problem, most likely mysql dropped the connection due to connectioin errors or so. Enable logging in mysql and take a look at the mysql log then.
     
  6. zabersoft

    zabersoft Member

    Thanks

    Hi Till,

    Thank you for the feedback. We will certainly keep the multi-server setup issue in mind and maybe change the infrastructure at a later date - right now though 1 server-at-a-time is enough for us and we would like to get things somewhat working with our current system (unfortunately I have a deadline to obey).

    I am now seeing inconsistent results in my apache log and I am not so sure anymore that vlogger is at fault. Something is preventing apache from restarting sucessfully, this is for sure - as this is the last line I see in the ISPConf log before it hangs - but after having enabled mysql debug logging I am not seeing any error output there. Instead the last thing I see is a sucessful insert by vlogger into web_traffic and then .... Nothing. mysql log goes blank as well.

    I will have to investigate further tomorrow - but now my idea - just to test whether vlogger is truly at fault - is to either disable it completely or just disable the database logging. However, I can't seem to find where I can do this.

    Any hints? Thanks :)
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    You can find the vlogger configuration in the ispconfig.conf file in the apache sites-available configuration file directory.
     
  8. vsinyakov

    vsinyakov New Member

    I got the same problem today on slave server.
    I installed ISPConfig on slave server ver. 3.0.2.2 , started Mysql, Webserver and so. A restarted apache several times from the ssh. And everything was fine. Yesterday I rebooted server. All services started and everithg was fine.

    Today when I tried to run "/etc/init.d/apache2 restart" I recevied the following message "Unable to store vlogger data in database" and apache was not restarted , still working.
    After some investigation I found : ispconfig.conf has vlogger conf file /etc/vlogger-dbi.conf and in this file I can see DB settings to master ISPConfig server.

    On Master server I checked "mysql" Database, table "user" and this user from "vlogger-dbi.conf" file was there, but when I looked at "db" table, those user was not present there.
    I manually added those user with proper perrmissions to table "db" where in field "Db"I put "dbispconfig" from the vlogger-dbi.conf and after I can restart apache on slave server without any messages. I added 2 records for host "%" and "localhost".

    it's look's like after upgrading, in version 3.0.2.2 , the right permissions on master server was not inserted, when installing new slave server. It's look like vlooger on my slave server was not working until I restared the server and this is why I can restart apache server without any problem befor I rebooted the server.
     
  9. Gentox

    Gentox New Member

    This fixed my prob

    Thanks m8 that fixed my vlogger restart issue.:D
     

Share This Page