Mantis: tracker goes offline and Source Integration misses commits

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Mantis: tracker goes offline and Source Integration misses commits

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
kkremitzki
Veteran
Posts: 2517
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Mantis: tracker goes offline and Source Integration misses commits

Post by kkremitzki »

Would you be interested in me teaching you how to maintain Mantis? Now that it's on Digital Ocean we have a better automatic backup situation and more granular access control options.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Mantis: tracker goes offline and Source Integration misses commits

Post by Kunda1 »

Sure, that would be OK with me
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
kkremitzki
Veteran
Posts: 2517
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Mantis: tracker goes offline and Source Integration misses commits

Post by kkremitzki »

Just for starters here's the admin manual reference on the process for updates:

https://mantisbt.org/docs/master/en-US/ ... ll.upgrade
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
kkremitzki
Veteran
Posts: 2517
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Mantis: tracker goes offline and Source Integration misses commits

Post by kkremitzki »

You should now be able to SSH in to the machine running the tracker with ssh vagrant@tracker.lxd after SSHing into the server. Please feel free to attempt the upgrade and other maintenance and just announce things in advance.

Also, once you are in the tracker machine, if you do sudo -i to get a root shell and then ctrl-R to search through the history, then type sudo -u www-data you will find the command used to the source integration import. It needs to be ran in /var/www/tracker, so you can use that to add a cronjob to fix the issue with missing imports.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Mantis: tracker goes offline and Source Integration misses commits

Post by Kunda1 »

kkremitzki wrote: Sat May 09, 2020 10:43 pm You should now be able to SSH in to the machine running the tracker
Sorry for the delay, I have a moment to do this and am attempting now
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Mantis: tracker goes offline and Source Integration misses commits

Post by openBrain »

JFYI, it seems Source Integration is totally at lost ATM. No commit has been correctly caught for weeks. ;)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Mantis: tracker goes offline and Source Integration misses commits

Post by Kunda1 »

openBrain wrote: Fri Jun 05, 2020 5:33 pm JFYI, it seems Source Integration is totally at lost ATM. No commit has been correctly caught for weeks. ;)
Check again. Looks like @kkremitzki's instructions worked ;)

Question though, can I use sudo in a bash 1 liner and run from cron ?

Also why does source integration need to be 'rebooted' ? Is there something we can do to avoid a cron script ? Also can i create a script that uses a conditional to check if Source Integration is down to 'reboot' it?

I'll ask on https://gitter.im/mantisbt-plugins/source-integration
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Mantis: tracker goes offline and Source Integration misses commits

Post by openBrain »

Kunda1 wrote: Fri Jun 05, 2020 9:27 pm Check again. Looks like @kkremitzki's instructions worked ;)
I saw one manually ran an update at 15:23 UTC. It added a big bunch of changes in the activity stack. :)
But this isn't a good way I guess if someone has to do it every hour.
You can chain some sudos using '&&' and eventually run this with cron.
But so it is not killed with your session, you have to run it with 'nohup' or inside a 'screen'. You can also create a cronjob (if server allows) which is probably the cleanest way.
Do you have a pointer to the commands you're using?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Mantis: tracker goes offline and Source Integration misses commits

Post by Kunda1 »

openBrain wrote: Sat Jun 06, 2020 7:35 am Do you have a pointer to the commands you're using?

Code: Select all

sudo -i
cd /var/www/tracker
sudo -u www-data php-cgi -f plugin.php page=Source/import id=all api_key=alphanumerickey
Should I add that in to a cronjob that runs every 30 minutes?

Code: Select all

* */2 * * * sudo -i && cd /var/www/tracker && sudo -u www-data php-cgi -f plugin.php page=Source/import id=all api_key=alphanumerickey
Should the cronjob be run from a root cron or the vagrant@ account cron ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply