I developed a new extension that work on (onCreateObject) trigger:
this extension use amqp to send a message to RabbitMQ.
I have two cases:
1- when I run iTop locally (xamp) and create a new Server from console or from sync the trigger work and send the message to RMQ.
2- when I run iTop as a docker image and create a new Server from console the trigger work and send the message to RMQ, but from sync and I got bellow error:
The AMQP message is sent successfully in the following cases:
When the CI (Configuration Item) is created from the iTop UI
When the CI is created via CSV synchronization on Windows
However, the message fails to send only when the CI is created via CSV synchronization inside the Docker container, where the error Class "AMQPConnection" not found is triggered.
I checked that amqp is enabled in fpm/php.ini and in cli/php.ini.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The synchronization runs successfully, and all items are created as expected in iTop.
However, when the OnObjectCreate trigger is executed, it fails with the following error: Class "AMQPConnection" not found.
I check this:
* php -r "var_dump(class_exists('AMQPConnection'));"
bool(true)
extension=amqp.so is loaded in "/etc/php/8.1/cli/php.ini" and in "/etc/php/8.1/fpm/php.ini"
Last edit: Marah Alh 2025-07-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good day dears,
I developed a new extension that work on (onCreateObject) trigger:
this extension use amqp to send a message to RabbitMQ.
I have two cases:
1- when I run iTop locally (xamp) and create a new Server from console or from sync the trigger work and send the message to RMQ.
2- when I run iTop as a docker image and create a new Server from console the trigger work and send the message to RMQ, but from sync and I got bellow error:
from extension:
iTop version: 3.1.1
Mariadb: 11.5.2
You'll need to debug your own custom code; as it seems PHP can't find your AMQPConnection class.
The AMQP message is sent successfully in the following cases:
However, the message fails to send only when the CI is created via CSV synchronization inside the Docker container, where the error Class "AMQPConnection" not found is triggered.
I checked that amqp is enabled in fpm/php.ini and in cli/php.ini.
Are you calling your CSV synchronization in CLI ? Are you sure the right php binary is used and has your php extension loaded ?
In my .NET service, I initiate the synchronization by executing the following PHP command:
The synchronization runs successfully, and all items are created as expected in iTop.
However, when the OnObjectCreate trigger is executed, it fails with the following error: Class "AMQPConnection" not found.
I check this:
* php -r "var_dump(class_exists('AMQPConnection'));"
bool(true)
Last edit: Marah Alh 2025-07-22