OTRS no update new tickets/mails.

Moderator: crythias

Post Reply
b0nete
Znuny newbie
Posts: 14
Joined: 17 Aug 2017, 14:52
Znuny Version: 4.0.8

OTRS no update new tickets/mails.

Post by b0nete »

Good. It turns up an OTRS 5 server, migrating the DB from an OTRS 4 using the scripts provided by the OTRS itself.

The migration came out pretty well, I expected to have more problems.

For now I am getting the problem that I receive new mails in the configured mails but in the OTRS are not updated unless I go to mail accounts and press on "Bring mails", this way if it works.

The first thing I thought was that there was some problem with the demon, but it was running perfect.
[root@localhost otrs]# su -c "bin/otrs.Daemon.pl status" -s /bin/bash otrs
otrs.Daemon.pl - the OTRS daemon
Copyright (C) 2001-2017 xxx, http://otrs.com/

Daemon running
[root@localhost otrs]# su -c "bin/otrs.Console.pl Maint::Daemon::List" -s /bin/bash otrs
Listing system daemons...
SchedulerCronTaskManager
SchedulerFutureTaskManager
SchedulerGenericAgentTaskManager
SchedulerTaskWorker
Done.
[root@localhost otrs]#
[
On the other hand, I go to the logs to see if I find something there and give myself with the following.
DATE AND TIME PRIORITY INSTALLATION MESSAGE
Tue Aug 22 11:00:24 2017 error OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SchedulerFutureTaskManager-91 ERROR: no existe la relación «scheduler_future_task»
Tue Aug 22 11:00:24 2017 error OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker-91 ERROR: no existe la relación «scheduler_task»
As I see it is a relationship problem in DB (I use PostgreSQL). Could this be affecting that I am not updated tickets? Is there a way to view the structure of the DB to create the tables manually?
Thanks for the help, I hope reply.
b0nete
Znuny newbie
Posts: 14
Joined: 17 Aug 2017, 14:52
Znuny Version: 4.0.8

Re: OTRS no update new tickets/mails.

Post by b0nete »

Continuing with this, I found in the OTRS documentation the DB structure.

I attached it here in case someone wants to see it.
https://ftp.otrs.org/pub/otrs/doc/datab ... tabase.png

Look for the tables that were giving me the error mentioned above and according to this scheme have no relationship, which could be affecting?
Thank you.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS no update new tickets/mails.

Post by root »

HI,

It looks like the migration went wrong. What exact commands did you executed (and as which user)?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
b0nete
Znuny newbie
Posts: 14
Joined: 17 Aug 2017, 14:52
Znuny Version: 4.0.8

Re: OTRS no update new tickets/mails.

Post by b0nete »

The idea was to migrate from OTRS4 (4.0.8 Appliance on Ubuntu) to OTRS5 (on CentOS).

Install CentOS, I installed OTRS the easy way with the .rpm package.

Then in my OTRS4 use the backup.pl script to perform the backup of the DB ONLY.
And with the restore.pl script restore ONLY the DB in my OTRS5.

It seems that everything was migrated, I have my tickets, users, queues, mails, etc. The problem is that I do not synchronize correctly the new tickets and it could be because of this error.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS no update new tickets/mails.

Post by root »

Hi,

Migrating away from the appliance is a good idea, using CentOS too. I'm convinced that something went wrong during the migration.
Check which type of backup file the backup.pl created, pg_dump knows multiple and afaik there are incompatibilities if you have a version mismatch on the new server.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
b0nete
Znuny newbie
Posts: 14
Joined: 17 Aug 2017, 14:52
Znuny Version: 4.0.8

Re: OTRS no update new tickets/mails.

Post by b0nete »

I have done the migration twice obtaining the same result.

I would have no problem trying it again. The best option would be to perform and restore the DB backup ONLY as I am doing so far? Or also restore the Config and Application files?

PS: I tried to execute the query "SELECT * FROM scheduler_task" and "SELECT * FROM scheduler_future_task" on my OTRS4 server currently working and I get the same error, but I only get the error when executing the query, it does not appear in the LOGS, as If it does in OTRS5.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS no update new tickets/mails.

Post by root »

b0nete wrote:
PS: I tried to execute the query "SELECT * FROM scheduler_task" and "SELECT * FROM scheduler_future_task" on my OTRS4 server currently working and I get the same error, but I only get the error when executing the query, it does not appear in the LOGS, as If it does in OTRS5.
The relation is added with OTRS 5 during the migration (see https://github.com/OTRS/otrs/blob/rel-5 ... ql.sql#L29) and this must be an error with OTRS 4. Do you have the shell history of your migration?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
b0nete
Znuny newbie
Posts: 14
Joined: 17 Aug 2017, 14:52
Znuny Version: 4.0.8

Re: OTRS no update new tickets/mails.

Post by b0nete »

Finally I could solve it starting from the link you passed me.
What I did was open a PostgreSQL console and run the commands to create tables and relationships manually, specifically the following, just as the script does.
CREATE TABLE scheduler_task (
id bigserial NOT NULL,
ident BIGINT NOT NULL,
name VARCHAR (150) NULL,
task_type VARCHAR (150) NOT NULL,
task_data TEXT NOT NULL,
attempts SMALLINT NOT NULL,
lock_key BIGINT NOT NULL,
lock_time timestamp(0) NULL,
lock_update_time timestamp(0) NULL,
create_time timestamp(0) NOT NULL,
PRIMARY KEY(id),
CONSTRAINT scheduler_task_ident UNIQUE (ident)
);
CREATE INDEX scheduler_task_ident_id ON scheduler_task (ident, id);
CREATE INDEX scheduler_task_lock_key_id ON scheduler_task (lock_key, id);
and
CREATE TABLE scheduler_future_task (
id bigserial NOT NULL,
ident BIGINT NOT NULL,
execution_time timestamp(0) NOT NULL,
name VARCHAR (150) NULL,
task_type VARCHAR (150) NOT NULL,
task_data TEXT NOT NULL,
attempts SMALLINT NOT NULL,
lock_key BIGINT NOT NULL,
lock_time timestamp(0) NULL,
create_time timestamp(0) NOT NULL,
PRIMARY KEY(id),
CONSTRAINT scheduler_future_task_ident UNIQUE (ident)
);
CREATE INDEX scheduler_future_task_ident_id ON scheduler_future_task (ident, id);
CREATE INDEX scheduler_future_task_lock_key_id ON scheduler_future_task (lock_key, id);
After this I think I gave some other error with the table, but carry out the same step of searching the script for the SQL commands and re-executed them.

Greetings, thanks for the help!
Post Reply