Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. FreeScout in the LAMP app

FreeScout in the LAMP app

Scheduled Pinned Locked Moved LAMP
11 Posts 3 Posters 179 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    ccfu
    wrote last edited by
    #1

    Has anyone successfully used FreeScout in the LAMP app? I need to move an instance from a non-Cloudron server and this seemed to be the best solution considering that there is unfortunately no easy method of copying over conversations from an old install to a new one.

    I have everything copied over, set up and working, but the queue seems to freeze when the cronjob runs also causing the fetching of mails to stop. Clearing the cache gets things going again - but only until the next cronjob runs a minute later. I have been unable to find anything in the logs or in the Freescout issue reports that would identify the problem. Any suggestions would be much appreciated.

    1 Reply Last reply
    1
    • luckowL Offline
      luckowL Offline
      luckow
      translator
      wrote last edited by
      #2

      no. but interesting question. a quick search revealed https://github.com/freescout-help-desk/freescout/issues/2878. Do you want to try this?

      Pronouns: he/him | Primary language: German

      C 1 Reply Last reply
      3
      • luckowL luckow

        no. but interesting question. a quick search revealed https://github.com/freescout-help-desk/freescout/issues/2878. Do you want to try this?

        C Offline
        C Offline
        ccfu
        wrote last edited by
        #3

        @luckow Thanks for the link. That is basically what I did, then cleared the caches manually as the server was throwing a 500 error due to incorrect paths in the cache configuration. There are several threads dealing with problems with the queue:work (a common issue with lavarel by all accounts) but none of them quite resolve the problem.

        I just found one thread that suggests addditional cronjobs to execute queue:work manually and resart it every hour in case it gets stuck. This seems to have resolved the problem with fetching which is now working every minute, and sending seems to be working as well, although the status page suggests queue:work is not being executed. I'll observe further.

        1 Reply Last reply
        2
        • J Offline
          J Offline
          joseph
          Staff
          wrote last edited by
          #4

          you can also find some hints in the package source code - https://git.cloudron.io/packages/freescout-app .

          C 2 Replies Last reply
          0
          • J joseph

            you can also find some hints in the package source code - https://git.cloudron.io/packages/freescout-app .

            C Offline
            C Offline
            ccfu
            wrote last edited by
            #5

            @joseph Thanks. I had a look but can't find anything that would explain what is happening. I think everything is actually running OK, even though the status page is still saying that queue:work is not being executed.

            1 Reply Last reply
            0
            • J joseph

              you can also find some hints in the package source code - https://git.cloudron.io/packages/freescout-app .

              C Offline
              C Offline
              ccfu
              wrote last edited by ccfu
              #6

              @joseph

              I have discovered the apparent sticking point in the LAMP app, but cannot work out why it is happening:

              If I run

              sudo -u www-data php8.3 /app/data/public/artisan schedule:run > /dev/null 2>&1
              

              in the terminal I can see all the commands that are executed, the last one being

              '/usr/bin/php8.3' 'artisan' queue:work --queue='emails,default' --sleep=5 --tries=1 --timeout=1800 sudo -u www-data php8.3 /app/data/public/artisan schedule:run > /dev/null 2>&1
              

              This executes the queue and it shows as running, but the job freezes until it times out at which point the queue shows as no longer running.

              If I run the command via cron the same thing happens, but for some reason the queue is not executed (or at least that is what it shows on the status page). Subsequent cronjobs do not work so mail fetching stops until the hardcoded timeout is reached.

              I tried adding a cronjob for

              sudo -u www-data php8.3 /app/data/public/artisan queue:restart > /dev/null 2>&1
              

              This works insofar as mail fetching works, but the queue is not shown as running.

              Long story short, I think the questions I need answering are why is the job freezing and what is different about executing it via cron and directly via the terminal? The logs show nothing unusual, so I honestly don't know where else to look.

              1 Reply Last reply
              0
              • J Offline
                J Offline
                joseph
                Staff
                wrote last edited by
                #7

                Just light reading of the package code:

                • There is a cron run every minute php artisan schedule:run --no-interaction https://git.cloudron.io/packages/freescout-app/-/blob/master/cron.sh?ref_type=heads#L10 . Put this in cron section - https://docs.cloudron.io/apps/#cron
                • Then, a queue is run as process separately php artisan schedule:run . https://git.cloudron.io/packages/freescout-app/-/blob/master/supervisor/artisan-queue.conf?ref_type=heads#L2 . This can also be put in the cron as a @service php artisan schedule:run (adjust command)
                C 1 Reply Last reply
                0
                • J joseph

                  Just light reading of the package code:

                  • There is a cron run every minute php artisan schedule:run --no-interaction https://git.cloudron.io/packages/freescout-app/-/blob/master/cron.sh?ref_type=heads#L10 . Put this in cron section - https://docs.cloudron.io/apps/#cron
                  • Then, a queue is run as process separately php artisan schedule:run . https://git.cloudron.io/packages/freescout-app/-/blob/master/supervisor/artisan-queue.conf?ref_type=heads#L2 . This can also be put in the cron as a @service php artisan schedule:run (adjust command)
                  C Offline
                  C Offline
                  ccfu
                  wrote last edited by
                  #8

                  @joseph

                  Thanks for that. A small step closer maybe as putting those two in the cron section gives me the same result as including

                  /app/data/public/artisan queue:restart
                  

                  Mail fetching is OK, however, I still get the red text

                  queue:work Last run: ? Last successful run: ? Try to clear cache to force command to start.

                  and not 'running' on the status page. Clearning the cache doesn't help.

                  1 Reply Last reply
                  1
                  • J Offline
                    J Offline
                    joseph
                    Staff
                    wrote last edited by
                    #9

                    mm, don't know much PHP. But maybe worth debugging the code a bit there to figure what it is expecting to be run.

                    C 1 Reply Last reply
                    0
                    • J joseph

                      mm, don't know much PHP. But maybe worth debugging the code a bit there to figure what it is expecting to be run.

                      C Offline
                      C Offline
                      ccfu
                      wrote last edited by
                      #10

                      @joseph Will see what else I can find. It is odd though as no errors are being thrown or logged anywhere and everything actually seems to be working as it should (i.e. the queue is being processed).

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        ccfu
                        wrote last edited by ccfu
                        #11

                        I couldn't resolve this but discovered that it isn't in fact as complicated as I thought it would be to migrate to the Freescout App. Just in case anyone else comes up against this challenge:

                        1. Install and setup Freescout app
                        2. Drop all the tables in the database and import database from previous installation
                        3. If you have any modules: upload module folders to storage/modules
                        4. Upload attachments folder to storage
                          Done 🙂
                        1 Reply Last reply
                        3
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Bookmarks
                        • Search