Stuck Job

Discussion in 'ISPConfig 3 Priority Support' started by BobGeorge, Oct 8, 2018.

  1. BobGeorge

    BobGeorge Member

    As we've added new servers, I'm rearranging the cluster and the emails have moved to a new server.

    I manually edited the master ISPConfig database to change the "server_id" in all the "mail_*" tables to the new server's id. I've run a resync.

    The problem is that I missed a DB table. There's also, I now know, from looking at the stuck job in the job queue, a set of "spamfilter_*" tables too. So I've also gone into the master DB and updated the "server_id" on those tables too.

    But the thing is, I've got a stuck job in the queue because, in deleting an email account, it's created a job to remove the spamfilter for that user in the "spamfilter_users" table, but it's the previous server's id, not the new server's id. This job logically won't ever clear, as that server's no longer responsible for this anymore.

    How would I manually clear it?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Delete the job in sys_datalog table if no server with that ID exists anymore.
     
  3. BobGeorge

    BobGeorge Member

    Okay, that's fixed now. It's all up and running.

    ...except that the APS installer isn't working anymore. I'm trying to install, say, Wordpress and I fill out the details, hit "install" and then it takes me to the "installed packages" screen, but I don't see any "installation_task" for it. No errors. It's just not doing it.

    What should I look into to diagnose this problem?

    (I knew that shifting the DB server to another node would likely cause a few glitches like this, and require a bit of manual manipulation of the master database to make sure that all the entries reflect the new location. But it's hunting down which ones I need to change to get things back to how they ought to be.

    An unfortunately necessary process because we simply didn't have enough nodes to begin with, in order to have a dedicated DB server - budgets - but now we do. If you're looking for suggestions of "future features" for ISPConfig then perhaps built-in tools for an admin to move things from one server to another because, in actual practice, clusters can be rather "ad hoc" in their construction and, like this, duties switch to other nodes as more are added and stuff like that.

    For example, once this has been done, the next thing on the list, once we get a few more nodes, will be turning those into dedicated email servers. So that then all our services are separated out properly and I no longer need cram multiple services onto the same nodes anymore.)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The APS installer was an external contribution and is written a bit different from other ISPConfig code. I don't think that it has any debug code, so you'll probably have to look at the aps installer code files of the interface to find out why it fails. But before you start with that, check with phpmyadmin that none of the aps tables are crashed or miss any fields.
     
  5. BobGeorge

    BobGeorge Member

    I've already looked at the aps tables in the master database - just to see if I could work out what's going on myself - and they seem fine.

    Yeah, I'll take a look through the source code. I thought I'd ask you first, just in case you already knew what the issue might be - as someone else might have had something like this before.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I did not hear of that issue before.
     
  7. BobGeorge

    BobGeorge Member

    Following the code, the problem was that the APS code looks into the network configuration to get the DB server's IP address. What I'd not done is set that properly in the system settings, so it was the default of "127.0.0.1" which is wrong.

    I fixed that and it installed, although I'm getting another error which is "error establishing connection to database". The Wordpress installation config is correct, the problem is that the APS installer is creating a new database user with "@localhost" and that's wrong too.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    So the installer is probably not able to resolve the relation between database location and website location in your setup then.
     
  9. BobGeorge

    BobGeorge Member

    Yes. I'll have a deeper look into it when I get into work later.

    But, really, it's unsurprising that it's doing this. I set up the cluster in one configuration and now, with the addition of extra nodes, I'm re-arranging things to a new configuration - changing the responsibilities of some of the nodes, now that I can separate those out - and there is likely some settings, somewhere in the master database, that still reflect the old configuration that I've missed.

    Just trying to work out where those wrong entries are to be able to fix them.
     
  10. BobGeorge

    BobGeorge Member

    Actually, now that I look at it again at work, I can see that it is working. Just not the way I need it to.

    As well as "user@localhost", it's also doing "user@<ip of storage server>". But the shared storage server does not, itself, serve websites - it just stores them - which is NFS shared with the actual web servers (and mirrored in ISPConfig).

    It's a variation of the same problem I had before. And I guess I could fix it with a variation of the patch I did previously - throw in a line of PHP to explicitly force "[email protected]/255.0.0.0" instead. But where does the APS installer actually create the user? I'm guessing it'd be in the "server/lib/classes" folder?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, it should be in one of the aps classes there.
     
  12. BobGeorge

    BobGeorge Member

    By the way, as an aside, I've spotted a thread on the forums from June, where you stated that APS has been changed to a paid service for Plesk and Odin customers. Thus, that APS was a dead "open" standard and ISPConfig would be removing it eventually. Does this continue to be the case? As I seem to be able to update the package list.

    Just wondering, because if it's essentially dead and will be removed in future, then there might not be too much point in spending much effort getting it to function.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    The aps thing is a bit funny indeed. What I said in that thread is what I've read on their site, but the aps installer indeed continues to work, so just forget what I posted there :)
     
  14. BobGeorge

    BobGeorge Member

    Yeah, that is odd. Perhaps they considered doing that... then immediately changed their minds, when they realised it was kind of a terrible idea. Or someone else volunteered to maintain the catalog site in their stead to keep it "open". Or something along those lines.

    But, yes, whatever it was, it no longer applies, so I'll duly forget what you posted there. :)
     

Share This Page