diff --git a/onboarder/index.rst b/onboarder/index.rst index 500f91689..a9cd31254 100644 --- a/onboarder/index.rst +++ b/onboarder/index.rst @@ -14,6 +14,7 @@ Akeneo Onboarder prerequisites/index installation/index synchronization/index + troubleshooting/index .. toctree:: :hidden: diff --git a/onboarder/installation/index.rst b/onboarder/installation/index.rst index 17d1d6927..e23d0065c 100644 --- a/onboarder/installation/index.rst +++ b/onboarder/installation/index.rst @@ -68,8 +68,7 @@ Here are two examples in order to define environment variables: .. warning:: - All the following variables must be set in order to configure the Onboarder correctly. - + All the following variables must be set in order to configure the Onboarder correctly for all entrypoints, all processes that runs the PIM code source. **Variables provided by the Akeneo team** diff --git a/onboarder/synchronization/index.rst b/onboarder/synchronization/index.rst index dfac26496..8bd9ee4d9 100644 --- a/onboarder/synchronization/index.rst +++ b/onboarder/synchronization/index.rst @@ -31,13 +31,13 @@ Launch the message worker | The messages that are part of the synchronization process are queued. | The queue is consumed by a command line process called ``worker``. | -| The worker has to always be launched as it polls the queue waiting for new messages to handle. +| The worker as to always be launched as it polls the queue waiting for new messages to handle. You want a supervised worker ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Add the following supervisor configuration (update the following example to your needs) +You can use supervisor to run the ``worker`` as a daemonized process, supervisor will monitor this process and according to the configuration you'll define it will be autostarted and autorestarted. .. code-block:: bash @@ -48,9 +48,19 @@ Add the following supervisor configuration (update the following example to your autostart=true autorestart=true +.. warning:: + + By default the environment variable of the shell that is running the supervisord process will not propagate the environment variables to the process it monitor. + You've to configure :doc:`the mandatory environment variables ` that the akeneo/pim-onboarder bundle requires in the ``/etc/supervisor.conf`` file. + +.. code-block:: bash + + [supervisord] + environment=GOOGLE_APPLICATION_CREDENTIALS="/srv/pim/serviceAccount.json",ONBOARDER_TOPIC_NAME_FOR_PUBLICATION_TO_MIDDLEWARE="middleware-topic-name",... + .. note:: - Supervisor documentation: https://github.com/Supervisor/supervisor#documentation + Supervisor documentation: http://supervisord.org/ You want an infinite worker ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/onboarder/troubleshooting/index.rst b/onboarder/troubleshooting/index.rst new file mode 100644 index 000000000..58f9b1498 --- /dev/null +++ b/onboarder/troubleshooting/index.rst @@ -0,0 +1,19 @@ +Troubleshooting +=============== + +Running the job queue daemon command line leads to errors +--------------------------------------------------------- + +.. code-block:: bash + + batch.ERROR: Encountered an error executing the step: No project ID was provided, and we were unable to detect a default project ID. + +If you encounter this kind of error in ``var/logs/*.log``, it's because the job queue daemon command line isn't aware of the mandatory environment variables needed to run the onboarder properly. + +If you launch this daemon :doc:`using supervisor configuration ` as recommended by the PIM installation manual you have to configure :doc:`the mandatory environment variables ` that the akeneo/pim-onboarder bundle requires in the ``/etc/supervisor.conf`` file. + +.. code-block:: bash + + [supervisord] + environment=GOOGLE_APPLICATION_CREDENTIALS="/srv/pim/serviceAccount.json",ONBOARDER_TOPIC_NAME_FOR_PUBLICATION_TO_MIDDLEWARE="middleware-topic-name",... +