(solved)500 server error after switch to FS

Moderator: crythias

Locked
ju88a
Znuny newbie
Posts: 21
Joined: 13 May 2014, 12:39
Znuny Version: 3.3.5
Real Name: Craig Mariner
Company: Panbet LTD

(solved)500 server error after switch to FS

Post by ju88a »

Hi

I have just moved servers, I backed up db and imported from old server. File storage was set in old server. After install new server was working fine, I noticed that file storage was set to database in new server changed to file store and system crashed. I reset otrs to defaults and tried again same problem.

Any ideas how to fix please or why this is occurring?

Many Thanks
Last edited by ju88a on 30 Jun 2014, 13:21, edited 1 time in total.
wurzel
Znuny guru
Posts: 3274
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: 500 server error after switch to FS

Post by wurzel »

Hi,

without logfiles - no chance.

I think, it is a file permission problem. But it could be a Windows Issue, or a webserver or whatever...
more information about your system, please

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
ju88a
Znuny newbie
Posts: 21
Joined: 13 May 2014, 12:39
Znuny Version: 3.3.5
Real Name: Craig Mariner
Company: Panbet LTD

Re: 500 server error after switch to FS

Post by ju88a »

Ok CENTOS new system was setup as a slave/rep and was working perfectly on both systems. System has LDAP changes other than that no other system changes from default. OTRS 3.3.5. HHTPS logs shows error:

Kernel/Config.pm did not return a true value at /opt/otrs/bin/cgi-bin/../../Kernel/System/Web/InterfaceAgent.pm line 15.
[Wed Jun 18 14:21:26 2014] [error] [client 172.23.26.50] BEGIN failed--compilation aborted at /opt/otrs/bin/cgi-bin/../../Kernel/System/Web/InterfaceAgent.pm line 15.
[Wed Jun 18 14:21:26 2014] [error] [client 172.23.26.50] Compilation failed in require at /opt/otrs/bin/cgi-bin/index.pl line 35.
[Wed Jun 18 14:21:26 2014] [error] [client 172.23.26.50] BEGIN failed--compilation aborted at /opt/otrs/bin/cgi-bin/index.pl line 35.
[Wed Jun 18 14:21:26 2014] [error] [client 172.23.26.50] Premature end of script headers: index.pl

As before this only occurred when in sysconfig I change to file storage from database.

Thanks for your help
wurzel
Znuny guru
Posts: 3274
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: 500 server error after switch to FS

Post by wurzel »

Hi,

mhh the first thing that comes to my mind is, that SELINUX is enabled?

But I don't know :( Anything in otrs log?

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
ju88a
Znuny newbie
Posts: 21
Joined: 13 May 2014, 12:39
Znuny Version: 3.3.5
Real Name: Craig Mariner
Company: Panbet LTD

Re: 500 server error after switch to FS

Post by ju88a »

no selinux is disabled. Thanks for suggestion. Any other help or ideas please?
thanks
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: 500 server error after switch to FS

Post by crythias »

Otrs version?
Apache error.log tells why 500 error
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
ju88a
Znuny newbie
Posts: 21
Joined: 13 May 2014, 12:39
Znuny Version: 3.3.5
Real Name: Craig Mariner
Company: Panbet LTD

Re: 500 server error after switch to FS

Post by ju88a »

Hi

OTRS version 3.3.5. I installed OTRS on two servers one was a test server and in production the other was to go live. They are identical servers, exact same versions of otrs. Both were running in tests. I copied database from old server to new, everything worked. When I go to change filestorage from DB to FS this is when OTRS crashes and I get internal server error 500. Old server is set to FS as we use OTRS fro customers sending ID photos so DB is no good. I have no idea why this is happening when I switch to FS. Logs just show :

[Fri Jun 27 07:45:19 2014] [error] [client 172.23.26.50] mkdir /opt/otrs/var/article/2014/06/27: Permission denied at /opt/otrs/bin/cgi-bin/../../Kernel/System/Ticket/ArticleStorageFS.pm line 41
[Fri Jun 27 07:45:19 2014] [error] [client 172.23.26.50] Premature end of script headers: index.pl
[Fri Jun 27 07:45:22 2014] [error] [client 172.23.26.50] mkdir /opt/otrs/var/article/2014/06/27: Permission denied at /opt/otrs/bin/cgi-bin/../../Kernel/System/Ticket/ArticleStorageFS.pm line 41
[Fri Jun 27 07:45:22 2014] [error] [client 172.23.26.50] Premature end of script headers: index.pl

Any help please.
Thank you
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: 500 server error after switch to FS

Post by jojo »

mkdir /opt/otrs/var/article/2014/06/27: Permission denied


check permissions
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: 500 server error after switch to FS

Post by Giulio Soleni »

As jojo and others suggested it seems a permission problem.

Stop all relevant services, rebuild config, cleanup caches and reset permissions as well...

Try the following stop-start sequence:

Login as root.

service otrs stop
/opt/otrs/bin/otrs.Scheduler.pl -a stop --force
service crond stop
service httpd stop
su - otrs (you may need to temporary edit /etc/passwd to switch otrs user)
/opt/otrs/bin/otrs.RebuildConfig.pl
/opt/otrs/bin/otrs.LoaderCache.pl -o delete
/opt/otrs/bin/otrs.DeleteCache.pl
/opt/otrs/bin/otrs.DeleteSessionIDs.pl --all
exit (back to root)
/opt/otrs/bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache /opt/otrs

service httpd start
service crond start
service otrs start
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
ju88a
Znuny newbie
Posts: 21
Joined: 13 May 2014, 12:39
Znuny Version: 3.3.5
Real Name: Craig Mariner
Company: Panbet LTD

(Solved)Re: 500 server error after switch to FS

Post by ju88a »

Thank you very much it was file permissions on folders due to group and owner permissions.
Locked