Error with otrs.ArticleStorageSwitch.pl - DB to FS. Unsuccessful stat on filename.

Moderator: crythias

Locked
danchitu86
Znuny newbie
Posts: 37
Joined: 31 Jan 2011, 11:25
Znuny Version: 3.2.3
Real Name: Dan
Company: ANB
Location: Bucharest, RO

Error with otrs.ArticleStorageSwitch.pl - DB to FS. Unsuccessful stat on filename.

Post by danchitu86 »

Hello,

I had to change the location of attachment from DB to FS. When I tried to run the script to export old articles to FS, after some minutes, I received an error.
It could be related to a length bigger than 255 char, but I am not sure. Even if this is the case, how can I resolve the issue? The script always stops at this ticket.

Code: Select all

D:\OTRS\StrawberryPerl\perl\bin>perl.exe D:\OTRS\OTRS\bin\otrs.ArticleStorageSwitch.pl -s ArticleStorageDB -d ArticleStorageFS
.......
NOTICE: 1235/25072 (TicketID:1681)
NOTICE: 1236/25072 (TicketID:1682)
NOTICE: 1237/25072 (TicketID:1684)
NOTICE: 1238/25072 (TicketID:1685)
NOTICE: 1239/25072 (TicketID:1686)
NOTICE: 1240/25072 (TicketID:1687)
NOTICE: 1241/25072 (TicketID:1688)
NOTICE: 1242/25072 (TicketID:1689)
NOTICE: 1243/25072 (TicketID:1690)
NOTICE: 1244/25072 (TicketID:1691)
NOTICE: 1245/25072 (TicketID:1692)

Unsuccessful stat on filename containing newline at D:/OTRS/OTRS/Kernel/System/Main.pm line 432. ERROR: OTRS-otrs.ArticleStorageSwitch.pl-10 Perl: 5.12.3 OS: MSWin32 Time: Tue Jan 20 15:57:40 2015

Message: Can't write 'D:/OTRS/OTRS/var/article/2013/08/13/12092/Re___Ticket#2013073110000378__Petitie__Clarificare_sarcini_ameliorare_asfaltare_complex_strazi_cartier_TEI_TOBOC_(Magura_Vaii,_Nea__..._.eml.content_type': Invalid argument

Traceback (3912):
   Module: Kernel::System::Main::FileWrite (v1.69) Line: 449
   Module: Kernel::System::Ticket::ArticleStorageFS::ArticleWriteAttachment (v1.84) Line: 323
   Module: Kernel::System::Ticket::TicketArticleStorageSwitch (v1.587) Line: 7610
   Module: D:\OTRS\OTRS\bin\otrs.ArticleStorageSwitch.pl (v1.22) Line: 163

ERROR: OTRS-otrs.ArticleStorageSwitch.pl-10 Perl: 5.12.3 OS: MSWin32 Time: Tue Jan 20 15:57:40 2015

Message: Not all files are moved! (TicketID:1692/ArticleID:12092)!

Traceback (3912):
   Module: Kernel::System::Ticket::TicketArticleStorageSwitch (v1.587) Line: 7673
   Module: D:\OTRS\OTRS\bin\otrs.ArticleStorageSwitch.pl (v1.22) Line: 163

D:\OTRS\StrawberryPerl\perl\bin>
Thank you very much!

P.S. OTRS 3.2.3 on Windows 2008 R2, mysql db and apache2.2.
danchitu86
Znuny newbie
Posts: 37
Joined: 31 Jan 2011, 11:25
Znuny Version: 3.2.3
Real Name: Dan
Company: ANB
Location: Bucharest, RO

Re: Error with otrs.ArticleStorageSwitch.pl - DB to FS. Unsuccessful stat on filename.

Post by danchitu86 »

Do you please have any suggestions?

Thank you!
danchitu86
Znuny newbie
Posts: 37
Joined: 31 Jan 2011, 11:25
Znuny Version: 3.2.3
Real Name: Dan
Company: ANB
Location: Bucharest, RO

Re: Error with otrs.ArticleStorageSwitch.pl - DB to FS. Unsuccessful stat on filename.

Post by danchitu86 »

Please, any help?
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

Re: Error with otrs.ArticleStorageSwitch.pl - DB to FS. Unsuccessful stat on filename.

Post by EXG133 »

That is a perl error. The script is trying to create a file that contains a new line character. Afaik this is \n in Perl which I don't see in the filename..

Regardless, creating a file with that name on Windows doesn't look seem like a good idea. Couldn't you download that attachment, rename it and reattach it in a new note?
danchitu86
Znuny newbie
Posts: 37
Joined: 31 Jan 2011, 11:25
Znuny Version: 3.2.3
Real Name: Dan
Company: ANB
Location: Bucharest, RO

Re: Error with otrs.ArticleStorageSwitch.pl - DB to FS. Unsuccessful stat on filename.

Post by danchitu86 »

I found the ticket, but how can I delete the attachment from that article?


Thank you!
You do not have the required permissions to view the files attached to this post.
danchitu86
Znuny newbie
Posts: 37
Joined: 31 Jan 2011, 11:25
Znuny Version: 3.2.3
Real Name: Dan
Company: ANB
Location: Bucharest, RO

Re: Error with otrs.ArticleStorageSwitch.pl - DB to FS. Unsuccessful stat on filename.

Post by danchitu86 »

I have fixed that, but now I have this error:
I can not understand what is wrong, should I delete that article? There is no attachment to it.

Code: Select all

NOTICE: 4168/26308 (TicketID:5434)
NOTICE: 4169/26308 (TicketID:5435)
NOTICE: 4170/26308 (TicketID:5436)
NOTICE: 4171/26308 (TicketID:5437)
NOTICE: 4172/26308 (TicketID:5438)
NOTICE: 4173/26308 (TicketID:5439)
NOTICE: 4174/26308 (TicketID:5440)
NOTICE: 4175/26308 (TicketID:5441)
NOTICE: 4176/26308 (TicketID:5442)
ERROR: OTRS-otrs.ArticleStorageSwitch.pl-10 Perl: 5.12.3 OS: MSWin32 Time: Mon Feb  9 11:13:53 2015

 Message: Not all files are moved! (TicketID:5442/ArticleID:40107)!

 Traceback (4272):
   Module: Kernel::System::Ticket::TicketArticleStorageSwitch (v1.587) Line: 7673
   Module: D:\OTRS\OTRS\bin\otrs.ArticleStorageSwitch.pl (v1.22) Line: 163
Locked