Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: mindesbunister on November 12, 2014, 11:04:02 am

Title: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 12, 2014, 11:04:02 am
Hello Everyone,

i have just clicked on "upgrade to 4.0". After the upgrade has finished, everything seems to be working. The Only problem i have, the webinterface can not be reached under 8443. I get the message "internal server error".

The logs do not really show anything useful.

Any help is greatly appreciated.

kind regards,
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 12, 2014, 11:32:21 am
I have the same issue - Is it related to the web-server being disabled?
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: BerT666 on November 12, 2014, 12:05:00 pm
I have read (sorry I don't remember where) that it could be an issue with the port.

Can you lookup the ports with netstat -tulpen?
there you should find the Port of the Webserver for the Admin Interface.

If not, you have to look after it in the Web-Server settings (aktivated?) or in the config of the haproxy (sorry, I cannot give you the exact path since I do not have ssh Access to my server at the moment).

Regards Thomas
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 12, 2014, 12:44:47 pm
thanks for your info. I can not control it, because i just restored the machine from a backup.

@trvaa, can you check if you find anything?
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 12, 2014, 12:57:51 pm
netstat -tulpen | grep haproxy

should give you the ports available
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 12, 2014, 01:03:43 pm
I'm off site at the moment. When I get back I'll check it out.
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: damien on November 12, 2014, 01:15:50 pm
I have the same problem with the update.

No HAProxy has enable on my system. i have checked with your command. It's normal, in 4.0 the HAProxy has removed.

Have you another way for resolve this?
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 12, 2014, 01:21:40 pm
what if you look for port 80 or 443 via

netstat -tulpen | grep 80

and take a look which programm that port is using. Afterwards grep for that programm to see which other ports are in use.
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: damien on November 12, 2014, 01:24:48 pm
80 / 443 : no server listen
8443 : ngnix web server

Thanks for your help ;)
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 12, 2014, 01:28:27 pm
the only question is, why do we get the error while trying to reach the webinterface on that port...
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: damien on November 12, 2014, 01:31:35 pm
Same descripted on first post:

on https 8443 Port, i have an error 500 : Internal Server Error.


127.0.0.1 - - [11/Nov/2014:21:09:28 +0100] "GET / HTTP/1.1" 500 32 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0"
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: damien on November 12, 2014, 02:02:58 pm
Hi Again,

I have resolved my problem with this workaround :

https://forum.zentyal.org/index.php/topic,23667.0.html
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: BerT666 on November 12, 2014, 02:07:03 pm
It looks like there is a "port-forwarding-error" when redirecting port 8443...
Do you try to access the Web-Interface from localhost or from a remote PC?

maybe you find something in the nginx server .conf (sorry at the moment I cannot tell the precise path; must be somewhere in /etc).

Is it possible that you post your .conf?
Maybe someone can find something...

Regards

Thomas
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: haraldxps on November 12, 2014, 05:12:44 pm
I have the same problems, here is the file I have in nginx configuration.


It looks like there is a "port-forwarding-error" when redirecting port 8443...
Do you try to access the Web-Interface from localhost or from a remote PC?

maybe you find something in the nginx server .conf (sorry at the moment I cannot tell the precise path; must be somewhere in /etc).

Is it possible that you post your .conf?
Maybe someone can find something...

Regards

Thomas
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: BerT666 on November 12, 2014, 11:06:26 pm
Hi,

I just diff'ed /var/lib/zentyal/conf/Nginx.conf between Fresh install (without Updates) and with updated packeges.
They are the same, so this is not the source of the error...
Also the nginx.conf, /etc/nginx/conf.d and /etc/nginx/sites-* look OK...

At the moment I have no clue...

Besides that this error also occure in a fresh Install, not only after Update from 3.5
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 13, 2014, 01:40:14 pm
does anyone know, if this is being worked on? I mean, this is quite a critical bug as far as i am concerned. I can not believe that we are the only guys having this problem?!
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mike59999 on November 13, 2014, 01:46:29 pm
Hi,

we have also the same Problem.
After upgrading to Zenytal 4.0 the Webinterface shows "Internal Server Error".
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 13, 2014, 01:53:57 pm
There is a duplication of this over here that J. A. Calvo commented on yesterday but all quiet snce then. He did say he thought it was a "corner case" but judjing by the number of posts probably isn't:

https://forum.zentyal.org/index.php/topic,23667.0.html
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 13, 2014, 05:00:54 pm
does the solution work for you?
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: BerT666 on November 13, 2014, 05:05:36 pm
Quote from post:
Removing that only hides the real error, it's not a proper fix.


Call me old fashioned, but I want a fix, not only "hide" the error
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 13, 2014, 05:11:52 pm
i agree on that
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 13, 2014, 07:09:08 pm
does the solution work for you?

I'm waiting for the proper fix to the real problem
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mike59999 on November 13, 2014, 09:02:44 pm
Yes it's better to fix the Problem and not hidding it.
But when you have not time because theres somebody who needs a VPN asap.
Or you need Permissions on a file share then i think you have no other choice.
I know that the changes i posted in the other thread only hidding the problems, but it was important to get access to the Webinterface at this time.
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Javier Amor Garcia on November 14, 2014, 05:07:41 pm
Hello people,

1. Can you check you have haproxy running?. If it is running stop/remove it and restart webadin. with "sudo service zentyal webadmin restart"

2. If you have not the first problem. Do you have the  package 'zentyal-cloud-prof' installed?. Can you try to remove it?
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 14, 2014, 05:54:48 pm
this is what i have installed.

ii  zentyal                               4.0                            all          Zentyal - Core metapackage
ii  zentyal-antivirus                     4.0                            all          Zentyal - Antivirus
ii  zentyal-ca                            4.0.1                          all          Zentyal - Certification Authority
ii  zentyal-common                        4.0                            all          Zentyal - Common Library
ii  zentyal-core                          4.0.2                          all          Zentyal - Core
ii  zentyal-dns                           4.0.1                          all          Zentyal - DNS Server
ii  zentyal-firewall                      4.0                            all          Zentyal - Firewall
ii  zentyal-mail                          4.0.1                          all          Zentyal - Mail and Groupware
ii  zentyal-mailfilter                    4.0                            all          Zentyal - Mail Filter
ii  zentyal-network                       4.0                            all          Zentyal - Network Configuration
ii  zentyal-ntp                           4.0                            all          Zentyal - NTP Service
ii  zentyal-objects                       4.0                            all          Zentyal - Network Objects
ii  zentyal-openchange                    4.0.3                          all          Zentyal - OpenChange Server
ii  zentyal-samba                         4.0.2                          all          Zentyal - Domain Controller and File Sharing
ii  zentyal-services                      4.0                            all          Zentyal - Network Services
ii  zentyal-software                      4.0                            all          Zentyal - Software Management
ii  zentyal-sogo                            4.0.3                          all          transitional dummy package
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 14, 2014, 07:00:14 pm
Hello people,

1. Can you check you have haproxy running?. If it is running stop/remove it and restart webadin. with "sudo service zentyal webadmin restart"

2. If you have not the first problem. Do you have the  package 'zentyal-cloud-prof' installed?. Can you try to remove it?

I don't have haproxy or zentyal-cloud-prof installed

packages list attached
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Javier Amor Garcia on November 14, 2014, 07:14:33 pm
Thanks for your replies. I think we can discard the haproxy/cloud-pro theory.

Can you check the file /var/log/upstart/zentyal.webadmin-uwsgi.log for errors?.

In the other thread is linked a trac ticket which has the error 'Can't locate EBox/RemoteServices/RemoteAccess.pm'. If it is your same case, can you run the command " grep -ri 'EBox::RemoteServices::RemoteAccess' /usr/share/perl5/EBox*" and paste the results?.


Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 14, 2014, 10:23:02 pm
I have the error in /var/log/upstart/zentyal.webadmin-uwsgi.log:

Can't locate EBox/RemoteServices/RemoteAccess.pm in @INC (you may need to install the EBox::RemoteServices::RemoteAccess module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at (eval 156) line 2.
BEGIN failed--compilation aborted*** uWSGI perl stacktrace ***
Trace begun at (eval 158) line 1
eval 'Devel::StackTrace->new->as_string;' at (eval 158) line 0
eval 'use EBox::RemoteServices::RemoteAccess' at /usr/share/perl5/EBox/WebAdmin/PSGI.pm line 224
EBox::WebAdmin::PSGI::_getCodeRef('EBox::RemoteServices::RemoteAccess::validate') called at /usr/share/perl5/EBox/WebAdmin/PSGI.pm line 119
EBox::WebAdmin::PSGI::subApps at /usr/share/zentyal/psgi/zentyal.psgi line 60
eval '#line 1 /usr/share/zentyal/psgi/zentyal.psgi
# Copyright (C) 2010-2014 Zentyal S.L.

But no output from using " grep -ri 'EBox::RemoteServices::RemoteAccess' /usr/share/perl5/EBox*"

Output from: " grep -ri 'EBox::RemoteServices:' /usr/share/perl5/EBox*" is attached
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 15, 2014, 10:01:33 am
i do have the same error!
Can't locate EBox/RemoteServices/RemoteAccess.pm in @INC (you may need to install the EBox::RemoteServices::RemoteAccess module)................

But when i try to grep -ri 'EBox::RemoteServices::RemoteAccess' /usr/share/perl5/EBox*"

all i get is a ">" on the next line of my shell!? Am i doing something wrong? Attached the screenshot
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Javier Amor Garcia on November 15, 2014, 10:39:03 am
Sorry, I typed wrong the grep command. The command is "grep -ri EBox::RemoteServices::RemoteAccess' /usr/share/perl5/EBox*"(without the ' before EBox).

Looking at the output of Trvaa, I dont see any reference to EBox::RemoteServices:RemoteAccess. Maybe it is cached somewhere?. If you reboot the computer the problem continues?
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 15, 2014, 11:16:12 am
Sorry, I typed wrong the grep command. The command is "grep -ri EBox::RemoteServices::RemoteAccess' /usr/share/perl5/EBox*"(without the ' before EBox).

Looking at the output of Trvaa, I dont see any reference to EBox::RemoteServices:RemoteAccess. Maybe it is cached somewhere?. If you reboot the computer the problem continues?

I think the command is fine it's just that there is no instance of "EBox::RemoteServices::RemoteAccess" to find.

My output was for grep looking for "EBox::RemoteServices:" only.

I've rebooted a couple of times and no difference.
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 15, 2014, 11:40:40 am
exactly the same as trvaa here

Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Javier Amor Garcia on November 15, 2014, 01:41:49 pm
It baffles me where this RemoteAccess reference comes from.

Can you please, run another grep comand to check your system?.

This time:

Quote
grep -ri RemoteAccess /usr/share/perl* /etc/* /var/lib/zentyal*
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 15, 2014, 01:50:25 pm
It baffles me where this RemoteAccess reference comes from.

Can you please, run another grep comand to check your system?.

This time:

Quote
grep -ri RemoteAccess /usr/share/perl* /etc/* /var/lib/zentyal*

output attached
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Javier Amor Garcia on November 15, 2014, 04:39:45 pm
This time there is a match:

Code: [Select]
/var/lib/zentyal/conf/webadmin/psgi-subapps.yaml:{"/ebox":{"validateFunc":"EBox::RemoteServices::RemoteAccess::validate","appName":"EBox::RemoteServices::RemoteAccess::psgiApp","userId":"remote_user","validation":1},"/soap":{"validateFunc":"EBox::RemoteServices::WSDispatcher::validate","appName":"EBox::RemoteServices::WSDispatcher::psgiApp","userId":"remote","validation":1}}
Can you open the ]/var/lib/zentyal/conf/webadmin/psgi-subapps.yaml and comment out this line?. To comment it, just add the '#' cahracter at the begin. Then restart webadmin to check if this is the problem
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 15, 2014, 06:01:08 pm
Commented out and webadmin restarted but no fix I'm afraid!
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Javier Amor Garcia on November 15, 2014, 06:15:11 pm
Ok, it is abit difficult to me to try to fix this without having a mahcine which shows the problem but I think we can try other thing:

1. Bakcup the file /var/lib/zentyal/conf/webadmin/psgi-subapps.yaml (jsut in case we broke something and had to restore it)
2. Execute: sudo perl -MEBox -MEBox::WebAdmin::PSGI -e'EBox::init(); EBox::WebAdmin::PSGI::removeSubApp("/ebox"); 1'
3. Execute: sudo perl -MEBox -MEBox::WebAdmin::PSGI -e'EBox::init(); EBox::WebAdmin::PSGI::removeSubApp("/soap"); 1'
4. Restart webadmin with "sudo service zentyal webadmin restart"
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 15, 2014, 06:25:36 pm
Ok, it is abit difficult to me to try to fix this without having a mahcine which shows the problem but I think we can try other thing:

1. Bakcup the file /var/lib/zentyal/conf/webadmin/psgi-subapps.yaml (jsut in case we broke something and had to restore it)
2. Execute: sudo perl -MEBox -MEBox::WebAdmin::PSGI -e'EBox::init(); EBox::WebAdmin::PSGI::removeSubApp("/ebox"); 1'
3. Execute: sudo perl -MEBox -MEBox::WebAdmin::PSGI -e'EBox::init(); EBox::WebAdmin::PSGI::removeSubApp("/soap"); 1'
4. Restart webadmin with "sudo service zentyal webadmin restart"

OK - do you require the commenting out to be removed first?
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: trvaa on November 15, 2014, 07:08:28 pm
I've removed the commenting out and issued the commands as requested.

All good!!!!

Webadmin interface back and logged in successfully.

Well done
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Bassie on November 16, 2014, 04:11:40 am
This worked for me as well. Thank you
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 16, 2014, 01:00:03 pm
ok. This seems to work and also fix the problem described here

https://forum.zentyal.org/index.php/topic,23843.0.html

The only problem, this broke my dns module....  >:(
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: kempi on November 16, 2014, 11:18:05 pm
Worked for me too. Tnx.
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Deckard on November 17, 2014, 07:53:22 am
Ok, it is abit difficult to me to try to fix this without having a mahcine which shows the problem but I think we can try other thing:

1. Bakcup the file /var/lib/zentyal/conf/webadmin/psgi-subapps.yaml (jsut in case we broke something and had to restore it)
2. Execute: sudo perl -MEBox -MEBox::WebAdmin::PSGI -e'EBox::init(); EBox::WebAdmin::PSGI::removeSubApp("/ebox"); 1'
3. Execute: sudo perl -MEBox -MEBox::WebAdmin::PSGI -e'EBox::init(); EBox::WebAdmin::PSGI::removeSubApp("/soap"); 1'
4. Restart webadmin with "sudo service zentyal webadmin restart"

Worked perfect for me, thank you :)
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Javier Amor Garcia on November 17, 2014, 08:15:03 am
The only problem, this broke my dns module....  >:(

I suspect that is a different error. Could you give us more details, please?
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on November 17, 2014, 11:19:45 am
The only problem, this broke my dns module....  >:(

I suspect that is a different error. Could you give us more details, please?

Will do. Just need a bit of time to reproduce. I restored a backup.
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Daguet57 on November 27, 2014, 12:06:31 am
It also worked for me after a failed 3.5 to 4.0 upgrade. Thanks !  :D
(PS : No malfunctions seen so far after those steps)
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: azchas on December 04, 2014, 05:49:30 am
Same problem for me. Upgraded from 3.5.5 to 4.0 today and lost the webadmin. Javier's fix solved the problem Thank you Javier!

I want to add some information that might help in tracking this bug. I maintain 2 identically configured Zentyal machines. One is my primary network gateway, the 2nd is always running as a hot spare. I keep their configurations identical, and I test updates on the hot spare before applying them to the primary machine. Although configured the same, the two machines have completely different hardware.

The upgrade from 3.5 to 4 went without a hitch on the hot spare. When I applied the same upgrade to my primary machine, this Internal Server Error bug arose. So I'm wondering if this is an issue that is somehow hardware related.
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: BerT666 on December 05, 2014, 09:05:04 pm
I have only one Zentyal node.
It is a VM under XenServer 6.2 (all Updates applied); Xen-Tools installed.

I hope this helps to find the source...
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: Deckard on December 08, 2014, 03:37:55 pm
Mine is running under hyper-v and Windows server essentials 2012 r2
Title: Re: Zentyal 3.5 GUI Upgrade to 4.0 Internal Server Error
Post by: mindesbunister on December 19, 2014, 09:03:56 pm
proxmox 2.3 KVM