Difference between revisions of "GUI does not open"
(27 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
= Apache service = | |||
You can check ip addr command output to make sure you are using the correct IP. | |||
Also make sure apache service is up and running. | |||
netstat -vatupn | grep httpd | |||
should show apache listening on port 80. | |||
= iptables = | = iptables = | ||
Line 10: | Line 21: | ||
<br><br> | <br><br> | ||
= DB settings = | = DB settings / HDD full = | ||
[[Image:something_went_wrong. | [[Image:something_went_wrong.png]] | ||
If you get such error - that means GUI cannot connect to DB. | If you get such error - that means GUI cannot connect to DB. | ||
Check /home/mor/config/database.yml and correct DB settings in [production] section. | * Check if HDD is full (df -h), | ||
** Free some space if so, find the reason why it become full - resolve it | |||
** Free /tmp folder (maybe too much files in it) | |||
** Log shows: '''Mysql2::Error: Got error 28 from storage engine''' | |||
* Check /home/mor/config/database.yml and correct DB settings in [production] section. | |||
* Check if MySQL is running. | |||
* Check MySQL log for read errors. | |||
* Check if your system has enough RAM | |||
<br><br> | |||
= Apache cannot start = | = Apache cannot start = | ||
Line 38: | Line 55: | ||
<br><br> | <br><br> | ||
= Errors in /tmp/mor_crash.log = | = Errors in /tmp/mor_crash.log = | ||
Line 48: | Line 66: | ||
= Error 503 when opening GUI = | = Error 503 when opening GUI = | ||
<br> | <br> | ||
After you perform upgrade on server, you get 503 error when opening GUI. | After you perform yum upgrade on server, you get 503 error when opening GUI. | ||
In server /var/log/httpd/error_log | In server /var/log/httpd/error_log | ||
<br> | <br> | ||
You see a lot of: | You see a lot of: | ||
<br> | <br> | ||
[error] (13)Permission denied: mod_fcgid: couldn't bind unix domain socket /etc/httpd/logs/fcgidsock/8060.11 | [error] (13)Permission denied: mod_fcgid: couldn't bind unix domain socket /etc/httpd/logs/fcgidsock/8060.11 | ||
[warn] (13)Permission denied: mod_fcgid: spawn process /var/www/html/billing/dispatch.fcgi error | [warn] (13)Permission denied: mod_fcgid: spawn process /var/www/html/billing/dispatch.fcgi error | ||
This means that permission are mixed up,solution: | This means that permission are mixed up, solution: | ||
chmod 555 /etc/httpd/logs (this is a symlink to /var/httpd/logs) | chmod 555 /etc/httpd/logs (this is a symlink to /var/httpd/logs) | ||
<br><br> | |||
<br><br> | |||
= Premature end of script headers: dispatch.fcgi = | |||
/etc/init.d/httpd stop | |||
cd /usr/src/mor/sh_scripts | |||
./centos_fcgid.sh | |||
cp -fr /usr/src/mor/gui/* /home/mor | |||
/etc/init.d/httpd start | |||
<br><br> | |||
= This webpage has a redirect loop = | |||
When you get this error delete cookies in your web browser and try to open the page again. | |||
Also, this error can appear if admin user (id=0) was removed from database. | |||
<br><br> | |||
= cannot load such file -- bundler/setup (LoadError) = | |||
[[File:bundler_setup_error.png]] | |||
gem install bundler | |||
cd /home/m2 OR cd /home/mor | |||
bundle | |||
/etc/init.d/httpd restart | |||
<br><br> | |||
= Website is under heavy load = | |||
[[File:Website_under_heavy_load.png]] | |||
Edit file: | |||
/etc/httpd/conf.d/passenger.conf | |||
Add line: | |||
PassengerMaxRequestQueueSize 150 | |||
Restart apache service: | |||
service httpd restart | |||
<br><br> | |||
= Error No space left on device = | |||
[Thu Oct 24 09:01:45.442926 2024] [suexec:notice] [pid 11549:tid 140536302729344] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) | |||
[Thu Oct 24 09:01:45.443532 2024] [core:emerg] [pid 11549:tid 140536302729344] (28)No space left on device: AH00023: Couldn't create the ssl-cache mutex | |||
AH00016: Configuration Failed | |||
'''Step 1:''' Check Disk Space | |||
Run the following command to check available disk space: | |||
df -h | |||
[root@serv ~]# df -h | |||
Filesystem Size Used Avail Use% Mounted on | |||
devtmpfs 3,8G 0 3,8G 0% /dev | |||
tmpfs 3,9G 0 3,9G 0% /dev/shm | |||
tmpfs 3,9G 42M 3,8G 2% /run | |||
tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup | |||
/dev/sda1 250G 12G 239G 5% / | |||
tmpfs 782M 0 782M 0% /run/user/0 | |||
If the disk is full, you will need to free up space. | |||
'''Step 2:''' Check Inodes | |||
If your disk has enough space but you still encounter this error, check the inode usage: | |||
df -i | |||
[root@serv ~]# df -i | |||
Filesystem Inodes IUsed IFree IUse% Mounted on | |||
devtmpfs 993620 341 993279 1% /dev | |||
tmpfs 1000796 1 1000795 1% /dev/shm | |||
tmpfs 1000796 674 1000122 1% /run | |||
tmpfs 1000796 16 1000780 1% /sys/fs/cgroup | |||
/dev/sda1 131071424 261716 130809708 1% / | |||
tmpfs 1000796 1 1000795 1% /run/user/0 | |||
'''Step 3:''' Clear Apache Shared Memory and Semaphores | |||
If the disk or inodes are not full, but the error remains, run the following commands to list semaphores used by Apache: | |||
ipcs -s | grep apache | |||
[root@srv80096328 ~]# ipcs -s | grep apache | |||
0x00000000 2 apache 600 1 | |||
0x00000000 3 apache 600 1 | |||
0x00000000 4 apache 600 1 | |||
0x00000000 5 apache 600 1 | |||
0x00000000 6 apache 600 1 | |||
0x00000000 7 apache 600 1 | |||
0x00000000 32776 apache 600 1 | |||
0x00000000 32777 apache 600 1 | |||
0x00000000 10 apache 600 1 | |||
0x00000000 11 apache 600 1 | |||
0x00000000 12 apache 600 1 | |||
0x00000000 13 apache 600 1 | |||
0x00000000 14 apache 600 1 | |||
0x00000000 15 apache 600 1 | |||
........... | |||
0x00000000 33490 apache 600 1 | |||
0x00000000 33491 apache 600 1 | |||
0x00000000 33492 apache 600 1 | |||
0x00000000 33493 apache 600 1 | |||
0x00000000 33494 apache 600 1 | |||
0x00000000 33497 apache 600 1 | |||
0x00000000 33498 apache 600 1 | |||
0x00000000 33499 apache 600 1 | |||
0x00000000 33500 apache 600 1 | |||
0x00000000 33501 apache 600 1 | |||
0x00000000 33502 apache 600 1 | |||
Remove the semaphores listed in the output: | |||
ipcrm -s <ID> | |||
Example: | |||
ipcrm -s <15> | |||
ipcrm -s <12> | |||
ipcrm -s <32777> | |||
Restart Apache after resolving disk space or inode issues. | |||
systemctl restart httpd | |||
Try to reboot the server if there are too many semaphores listed or the issue persists. | |||
<br><br> | <br><br> |
Latest revision as of 09:32, 24 October 2024
Apache service
You can check ip addr command output to make sure you are using the correct IP.
Also make sure apache service is up and running.
netstat -vatupn | grep httpd
should show apache listening on port 80.
iptables
Turn off iptables:
/etc/init.d/iptables stop
If it helps - fix iptables rules or uninstall iptables (not recommended).
How to fix iptables rules - check iptables manual or better - consult specialist.
DB settings / HDD full
If you get such error - that means GUI cannot connect to DB.
- Check if HDD is full (df -h),
- Free some space if so, find the reason why it become full - resolve it
- Free /tmp folder (maybe too much files in it)
- Log shows: Mysql2::Error: Got error 28 from storage engine
- Check /home/mor/config/database.yml and correct DB settings in [production] section.
- Check if MySQL is running.
- Check MySQL log for read errors.
- Check if your system has enough RAM
Apache cannot start
Apache log /var/log/httpd/error_log shows:
No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed
Checking your disk shows that you have plenty of space. The problem is that apache didn't shut down properly, and it's left myriads of semaphore-arrays left, owned by my apache-user. Run:
ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
Restart Apache:
/etc/init.d/httpd restart
Reason for this problem: unknown
Errors in /tmp/mor_crash.log
ActionView::TemplateError (undefined method...
Upgrade DB by running appropriate fix script.
Error 503 when opening GUI
After you perform yum upgrade on server, you get 503 error when opening GUI.
In server /var/log/httpd/error_log
You see a lot of:
[error] (13)Permission denied: mod_fcgid: couldn't bind unix domain socket /etc/httpd/logs/fcgidsock/8060.11 [warn] (13)Permission denied: mod_fcgid: spawn process /var/www/html/billing/dispatch.fcgi error
This means that permission are mixed up, solution:
chmod 555 /etc/httpd/logs (this is a symlink to /var/httpd/logs)
Premature end of script headers: dispatch.fcgi
/etc/init.d/httpd stop cd /usr/src/mor/sh_scripts ./centos_fcgid.sh cp -fr /usr/src/mor/gui/* /home/mor /etc/init.d/httpd start
This webpage has a redirect loop
When you get this error delete cookies in your web browser and try to open the page again.
Also, this error can appear if admin user (id=0) was removed from database.
cannot load such file -- bundler/setup (LoadError)
gem install bundler cd /home/m2 OR cd /home/mor bundle /etc/init.d/httpd restart
Website is under heavy load
/etc/httpd/conf.d/passenger.conf
Add line:
PassengerMaxRequestQueueSize 150
Restart apache service:
service httpd restart
Error No space left on device
[Thu Oct 24 09:01:45.442926 2024] [suexec:notice] [pid 11549:tid 140536302729344] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Thu Oct 24 09:01:45.443532 2024] [core:emerg] [pid 11549:tid 140536302729344] (28)No space left on device: AH00023: Couldn't create the ssl-cache mutex AH00016: Configuration Failed
Step 1: Check Disk Space
Run the following command to check available disk space:
df -h
[root@serv ~]# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 3,8G 0 3,8G 0% /dev tmpfs 3,9G 0 3,9G 0% /dev/shm tmpfs 3,9G 42M 3,8G 2% /run tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup /dev/sda1 250G 12G 239G 5% / tmpfs 782M 0 782M 0% /run/user/0
If the disk is full, you will need to free up space.
Step 2: Check Inodes
If your disk has enough space but you still encounter this error, check the inode usage:
df -i
[root@serv ~]# df -i Filesystem Inodes IUsed IFree IUse% Mounted on devtmpfs 993620 341 993279 1% /dev tmpfs 1000796 1 1000795 1% /dev/shm tmpfs 1000796 674 1000122 1% /run tmpfs 1000796 16 1000780 1% /sys/fs/cgroup /dev/sda1 131071424 261716 130809708 1% / tmpfs 1000796 1 1000795 1% /run/user/0
Step 3: Clear Apache Shared Memory and Semaphores
If the disk or inodes are not full, but the error remains, run the following commands to list semaphores used by Apache:
ipcs -s | grep apache
[root@srv80096328 ~]# ipcs -s | grep apache 0x00000000 2 apache 600 1 0x00000000 3 apache 600 1 0x00000000 4 apache 600 1 0x00000000 5 apache 600 1 0x00000000 6 apache 600 1 0x00000000 7 apache 600 1 0x00000000 32776 apache 600 1 0x00000000 32777 apache 600 1 0x00000000 10 apache 600 1 0x00000000 11 apache 600 1 0x00000000 12 apache 600 1 0x00000000 13 apache 600 1 0x00000000 14 apache 600 1 0x00000000 15 apache 600 1 ........... 0x00000000 33490 apache 600 1 0x00000000 33491 apache 600 1 0x00000000 33492 apache 600 1 0x00000000 33493 apache 600 1 0x00000000 33494 apache 600 1 0x00000000 33497 apache 600 1 0x00000000 33498 apache 600 1 0x00000000 33499 apache 600 1 0x00000000 33500 apache 600 1 0x00000000 33501 apache 600 1 0x00000000 33502 apache 600 1
Remove the semaphores listed in the output:
ipcrm -s <ID>
Example:
ipcrm -s <15> ipcrm -s <12> ipcrm -s <32777>
Restart Apache after resolving disk space or inode issues.
systemctl restart httpd
Try to reboot the server if there are too many semaphores listed or the issue persists.