Upgrading From 3.2.13 to 3.3.0

Moderator: crythias

Locked
suthagar
Znuny newbie
Posts: 4
Joined: 27 Dec 2013, 12:27
Znuny Version: 3.2.13
Real Name: Kathirkamathamby Suthagar
Company: i-Resource

Upgrading From 3.2.13 to 3.3.0

Post by suthagar »

Hi,

We are using OTRS 3.2.13 we have been trying to upgrade directly to 3.3.3 and indirectly 3.3.0.beta-3.3.0.beta2.....3.3.3. Unfortunately both of these attempts have failed.

1. DBUpdate-to-3.3.mysql.sql indicates an error at the following statement.
  • ALTER TABLE standard_response DROP INDEX standard_response_name;
The current table structure looks like below. (check p2.jpg)
p2.jpg
This causes an error. This is fairly simple, I can change the script and succeed. I am not sure why this difference in index name. This haven't happened with OTRS before and I couldn't find anything similar on the internet. Does this mean that there is something different on my table structure?. If that is the case how is 3.2.13 working?

2. DBUpdate-to-3.3.pl gives few foreign key constraint errors.

ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_queue_id_id FOREIGN KEY (queue_id) REFERENCES queue (id)
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`finhd`.<result 2 when explaining filename '#sql-2348_5a'>, CONSTRAINT `FK_queue_standard_template_queue_id_id` FOREIGN KEY (`queue_id`) REFERENCES `queue` (`id`)) at /opt/otrs/Kernel/System/DB.pm line 499.
ERROR: OTRS-DBUpdate-to-3.3-3 Perl: 5.10.1 OS: linux Time: Thu Dec 26 11:16:07 2013

Message: Cannot add or update a child row: a foreign key constraint fails (`finhd`.<result 2 when explaining filename '#sql-2348_5a'>, CONSTRAINT `FK_queue_standard_template_queue_id_id` FOREIGN KEY (`queue_id`) REFERENCES `queue` (`id`)), SQL: 'ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_queue_id_id FOREIGN KEY (queue_id) REFERENCES queue (id)'

Traceback (17478):
Module: main::_AddQueueStandardTemplateForeignKeys (unknown version) Line: 554
Module: ./DBUpdate-to-3.3.pl (unknown version) Line: 130

ERROR: OTRS-DBUpdate-to-3.3-3 Perl: 5.10.1 OS: linux Time: Thu Dec 26 11:16:07 2013

Message: Error during execution of 'ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_queue_id_id FOREIGN KEY (queue_id) REFERENCES queue (id)'!

Traceback (17478):
Module: main::_AddQueueStandardTemplateForeignKeys (unknown version) Line: 556
Module: ./DBUpdate-to-3.3.pl (unknown version) Line: 130



This doesn't stop the migration.


Migration completed!


3. After migration everything works except for the web interface. I can login and access the Admin section. As soon as I load the status or queue vies I get messages similar to the ones attached
p3.jpg
p4.jpg
After we select ok, the web page gets inactive. Nothing gets logged on OTRS system logs, /var/log/httpd/errorlog , /var/log/mysqldlog.

We are following the documentation below.
http://doc.otrs.org/3.3/en/html/upgrading.html

Can anyone help us? (Have you upgraded and were there something that you had to do)

Thank You
You do not have the required permissions to view the files attached to this post.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Upgrading From 3.2.13 to 3.3.0

Post by crythias »

1) Still need to look at your *index*... the error is either that it can't find the index to drop or that it is not allowed to drop the index or ... some other error. Since you didn't post it, it's hard to fix.

2) table queue_standard_template has a queue_id that does not exist as table.column queue.id . This is possibly because of a deleted queue.

3) delete cache. rebuild config.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
suthagar
Znuny newbie
Posts: 4
Joined: 27 Dec 2013, 12:27
Znuny Version: 3.2.13
Real Name: Kathirkamathamby Suthagar
Company: i-Resource

Re: Upgrading From 3.2.13 to 3.3.0

Post by suthagar »

Hi Crythias,

Thank you for the prompt response.

I will reply the points suggested and then explain what has been done since.

1. Indexes
I don't know how to do this.

2. queue_standard_template doesn't exist on 3.2.13. This only gets created when migrating to 3.3.0. The current 3.2.13 is still operational. Hence I doubt that it has been removed.

3. delete cache. rebuild config
I have been following http://doc.otrs.org/3.3/en/html/upgrading.html. Hence I have performed these steps.

Since this issue was posing an issue, I performed few attempts and collected some information.

1. At the start of the update I can see the following message.

$rpm -Uvh xxxx

backup old (maybe not compatible) templates (of 3.2.13)
mv: target `/opt/otrs/Kernel/Output/HTML/Standard/*.backup_maybe_not_compat_to.3.2.13' is not a directory
mv: target `/opt/otrs/Kernel/Output/HTML/Standard/Warning.dtl' is not a directory
otrs.RebuildConfig.pl - OTRS rebuild default config


2.First DB part

$cat scripts/DBUpdate-to-3.3.mysql.sql | mysql -p -f -u root otrs

INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_queue_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_queue_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_attachment_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_attachment_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_change_by_id does not exist, skipping.
ERROR 1091 (42000) at line 109: Can't DROP 'standard_response_name'; check that column/key exists


3. The DB Update Produces the following output.

Migration started...

ERROR: Permission denied: /opt/otrs/Kernel/Config/Files/ZZZAAuto.pm
ERROR: Permission denied: /opt/otrs/Kernel/Config/Files/ZZZAAuto.pm
Step 1 of 13: Refresh configuration cache...
If you see warnings about 'Subroutine Load redefined', that's fine, no need to worry!
Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAuto.pm line 7.
done.

Step 2 of 13: Check framework version... done.

Step 3 of 13: Generate MessageID md5sums... done.

Step 4 of 13: Migrate old settings... done.

Step 5 of 13: Migrate OTRSExternalTicketNumberRecognition... done.

Step 6 of 13: Checking Standard Template table columns...
Check if 'template_type' columns exists.
'template_type' column not found, create it.
ALTER TABLE standard_template ADD template_type VARCHAR (100) NULL
UPDATE standard_template SET template_type = 'Answer' WHERE template_type IS NULL
ALTER TABLE standard_template CHANGE template_type template_type VARCHAR (100) DEFAULT 'Answer' NOT NULL
done.

Step 7 of 13: Updating Queue Standard Template relations table...
Cleaning queue_standard_template table
Creating new Foreign Keys for queue_standard_template table

--- Note: ---
If you have already run this script before then the Foreign Keys are already set and you might see errors regarding 'duplicate key' or 'constrain already exists', that's fine, no need to worry!
---

ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_standard_template_id_id FOREIGN KEY (standard_template_id) REFERENCES standard_template (id)
ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_queue_id_id FOREIGN KEY (queue_id) REFERENCES queue (id)
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`finhd`.<result 2 when explaining filename '#sql-7af_1b'>, CONSTRAINT `FK_queue_standard_template_queue_id_id` FOREIGN KEY (`queue_id`) REFERENCES `queue` (`id`)) at /opt/otrs/Kernel/System/DB.pm line 499.
ERROR: OTRS-DBUpdate-to-3.3-3 Perl: 5.10.1 OS: linux Time: Sat Jan 11 23:46:18 2014

Message: Cannot add or update a child row: a foreign key constraint fails (`finhd`.<result 2 when explaining filename '#sql-7af_1b'>, CONSTRAINT `FK_queue_standard_template_queue_id_id` FOREIGN KEY (`queue_id`) REFERENCES `queue` (`id`)), SQL: 'ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_queue_id_id FOREIGN KEY (queue_id) REFERENCES queue (id)'

Traceback (2477):
Module: main::_AddQueueStandardTemplateForeignKeys (unknown version) Line: 563
Module: ./DBUpdate-to-3.3.pl (unknown version) Line: 130

ERROR: OTRS-DBUpdate-to-3.3-3 Perl: 5.10.1 OS: linux Time: Sat Jan 11 23:46:18 2014

Message: Error during execution of 'ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_queue_id_id FOREIGN KEY (queue_id) REFERENCES queue (id)'!

Traceback (2477):
Module: main::_AddQueueStandardTemplateForeignKeys (unknown version) Line: 565
Module: ./DBUpdate-to-3.3.pl (unknown version) Line: 130

done.

Step 8 of 13: Migrate OTRSGenericStandardTemplates... done.

Step 9 of 13: Checking if ACL tables already exist... Check if ACL table exists.
ACL tables not found, create it.
CREATE TABLE acl (
id INTEGER NOT NULL AUTO_INCREMENT,
name VARCHAR (200) NOT NULL,
comments VARCHAR (250) NULL,
description VARCHAR (250) NULL,
valid_id SMALLINT NOT NULL,
stop_after_match SMALLINT NULL,
config_match LONGBLOB NULL,
config_change LONGBLOB NULL,
create_time DATETIME NOT NULL,
create_by INTEGER NOT NULL,
change_time DATETIME NOT NULL,
change_by INTEGER NOT NULL,
PRIMARY KEY(id),
UNIQUE INDEX acl_name (name)
)
CREATE TABLE acl_sync (
acl_id VARCHAR (200) NOT NULL,
sync_state VARCHAR (30) NOT NULL,
create_time DATETIME NOT NULL,
change_time DATETIME NOT NULL
)
ALTER TABLE acl ADD CONSTRAINT FK_acl_create_by_id FOREIGN KEY (create_by) REFERENCES users (id)
ALTER TABLE acl ADD CONSTRAINT FK_acl_change_by_id FOREIGN KEY (change_by) REFERENCES users (id)
ALTER TABLE acl ADD CONSTRAINT FK_acl_valid_id_id FOREIGN KEY (valid_id) REFERENCES valid (id)
done.

Step 10 of 13: Uninstall Merged Feature Add-Ons... done.

Step 11 of 13: Delete the files that are not longer needed... done.

Step 12 of 13: Clean up the cache... done.

Step 13 of 13: Refresh configuration cache another time...
If you see warnings about 'Subroutine Load redefined', that's fine, no need to worry!
Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAAuto.pm line 7.
Subroutine Load redefined at /opt/otrs/Kernel/Config/Files/ZZZAuto.pm line 7.
done.


The interesting fact is that the OTRS works after the update (i.e creating tickets), but I can't only access status and queue views. I get the messages attached before. On the status view, after selecting "ok", there will be a transparent "cannot read article()" message behind each ticket number.

The following error message gets logged on the httpd error logs when I access status view.

[Sun Jan 12 10:32:13 2014] -e: Use of uninitialized value in numeric comparison (<=>) at /opt/otrs//Kernel/Output/HTML/LayoutTicket.pm line 903.
[Sun Jan 12 10:32:13 2014] -e: Use of uninitialized value in numeric comparison (<=>) at /opt/otrs//Kernel/Output/HTML/LayoutTicket.pm line 903.


My personal opinion is that the installation will work but there is something failing with the graphical components (Java script). I might be wrong here. Please let me know if you need additional information.

Thank you in advance.

Note:finhd is the database name.

SK
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Upgrading From 3.2.13 to 3.3.0

Post by crythias »

check your database and make sure it's innodb.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
suthagar
Znuny newbie
Posts: 4
Joined: 27 Dec 2013, 12:27
Znuny Version: 3.2.13
Real Name: Kathirkamathamby Suthagar
Company: i-Resource

Re: Upgrading From 3.2.13 to 3.3.0

Post by suthagar »

Hi crythias;

I think the most simple way to do this will be to execute "SHOW TABLE STATUS" after selecting the database. All my tables are InnoDB and the default engine is set to InnoDB in /etc/my.cnf. If I remember correctly, OTRS required InnoDB before 3.2.10.

Thank You
SK
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Upgrading From 3.2.13 to 3.3.0

Post by crythias »

I don't really know if I personally am going to be able to assist with this. I never use the RPM and I thought I read somewhere that the RPM did all the work for you.

I'm going to bow out of this topic. I apologize for the inconvenience. Maybe someone else can assist.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
suthagar
Znuny newbie
Posts: 4
Joined: 27 Dec 2013, 12:27
Znuny Version: 3.2.13
Real Name: Kathirkamathamby Suthagar
Company: i-Resource

Re: Upgrading From 3.2.13 to 3.3.0

Post by suthagar »

Hi crythias,

Thank you for all the help and suggestions. I appreciate your time and effort.

Thank You
SK
otrschorsch
Znuny newbie
Posts: 2
Joined: 17 Apr 2014, 08:27
Znuny Version: 3.3.6

Re: Upgrading From 3.2.13 to 3.3.0

Post by otrschorsch »

Hi there,

viewtopic.php?f=62&t=23366#p92796
2.First DB part

$cat scripts/DBUpdate-to-3.3.mysql.sql | mysql -p -f -u root otrs

INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
how serious is this INFO-Log? I tried to upgrade from 3.2 to 3.3 with postgres. With postgres i get this error (not info):
ALTER TABLE
ERROR: constraint "fk_standard_response_valid_id_id" of relation "standard_response" does not exist
Doesn't matter? (I postet my question already in the german area viewtopic.php?f=35&t=24861#p98736)

The update stops :-/
the upgrade-manual show this psql-code:
psql --set ON_ERROR_STOP=on
Should I just ignore the ON_ERROR_STOP setting?

Greets
schorsch
Lubomirsb
Znuny newbie
Posts: 83
Joined: 15 Nov 2013, 15:19
Znuny Version: 4.0.13
Real Name: Lubomir
Company: Expert-M

Re: Upgrading From 3.2.13 to 3.3.0

Post by Lubomirsb »

I received this error "Core.UI.InitTableHead is not a function" everytime I tried to open FAQ->explorer and FAQ->journal. The problem was that FAQ module version was too old for my OTRS version. So I upgraded the FAQ module and everything seems to work now. I assume you have a backup (before the upgrade Application.tar.gz , Config.tar.gz and Databasebackup.sql.gz ) , so why dont restore it and try to make another upgrade ? Maybe you skip something .Hope this helps.
OTRS 3.3.4 ,Centos 6.5
Locked