outroll / vesta

VESTA Control Panel
http://vestacp.com
GNU General Public License v3.0
2.95k stars 1.03k forks source link

VestaCP web conf files are lost IP address if server was rebooted and network connection not established #1968

Open ntfs1984 opened 4 years ago

ntfs1984 commented 4 years ago

Operating System (OS/VERSION):

CentOS 7

VestaCP Version:

0.9.8

Installed Software (what you got with the installer):

apache, nginx, mysql

Steps to Reproduce:

  1. Install VestaCP;
  2. Create there some domains;
  3. Little bit work with it;
  4. Disconnect server from network;
  5. Reboot server WITHOUT NETWORK;
  6. Web configs have EMPTY IP address instead of my IP.

Previously I have similar issue, I decided it's a bug of my CentOS. I reinstalled Linux completely, installed VestaCP from scratch. Now I have the same issue.

How my config file looks:

Screenshot from 2020-01-07 20-04-52 Screenshot from 2020-01-07 20-04-57 Screenshot from 2020-01-07 20-05-16 Screenshot from 2020-01-07 20-05-28

Also, have some temporary sed files in conf folder. Datestamp is CURRENT. Screenshot from 2020-01-07 20-11-49

Also, tried to rebuild web domains, got this:

[root@localhost web]# v-rebuild-web-domains admin
/usr/local/vesta/data/templates/web/httpd//phpfcgid.sh: line 18: /home/admin/web/dating.com/public_html/admin/web/dating.com/cgi-bin/fcgi-starter: No such file or directory
chown: cannot access ‘/home/admin/web/dating.com/public_html/admin/web/dating.com/cgi-bin/fcgi-starter’: No such file or directory
/usr/local/vesta/data/templates/web/httpd//phpfcgid.sh: line 18: /home/admin/web/ballstars.fr/public_html/admin/web/ballstars.fr/cgi-bin/fcgi-starter: No such file or directory
chown: cannot access ‘/home/admin/web/ballstars.fr/public_html/admin/web/ballstars.fr/cgi-bin/fcgi-starter’: No such file or directory
/usr/local/vesta/data/templates/web/httpd//phpfcgid.sh: line 18: /home/admin/web/minidevices.info/public_html/admin/web/minidevices.info/cgi-bin/fcgi-starter: No such file or directory
chown: cannot access ‘/home/admin/web/minidevices.info/public_html/admin/web/minidevices.info/cgi-bin/fcgi-starter’: No such file or directory
/usr/local/vesta/data/templates/web/httpd//phpfcgid.sh: line 18: /home/admin/web/minidevices.info/public_html/admin/web/minidevices.info/cgi-bin/fcgi-starter: No such file or directory
chown: cannot access ‘/home/admin/web/minidevices.info/public_html/admin/web/minidevices.info/cgi-bin/fcgi-starter’: No such file or directory
Error: httpd restart failed
[root@localhost web]# 

As I see, path like "/home/admin/web/minidevices.info/public_html/admin/web/minidevices.info/cgi-bin/fcgi-starter" doesn't make sense, so may be there is really parsing error.

After adding some debug lines, I've got this

[root@localhost web]# v-rebuild-web-domains admin
============DEBUG===========
homedir = 
user = admin
domain = dating.com
===========================
/usr/local/vesta/data/templates/web/httpd//phpfcgid.sh: line 26: /home/admin/web/dating.com/public_html/admin/web/dating.com/cgi-bin/fcgi-starter: No such file or directory
chown: cannot access ‘/home/admin/web/dating.com/public_html/admin/web/dating.com/cgi-bin/fcgi-starter’: No such file or directory
============DEBUG===========
homedir = 
user = admin
domain = ballstars.fr
===========================
/usr/local/vesta/data/templates/web/httpd//phpfcgid.sh: line 26: /home/admin/web/ballstars.fr/public_html/admin/web/ballstars.fr/cgi-bin/fcgi-starter: No such file or directory
chown: cannot access ‘/home/admin/web/ballstars.fr/public_html/admin/web/ballstars.fr/cgi-bin/fcgi-starter’: No such file or directory
============DEBUG===========
homedir = 
user = admin
domain = minidevices.info
===========================
/usr/local/vesta/data/templates/web/httpd//phpfcgid.sh: line 26: /home/admin/web/minidevices.info/public_html/admin/web/minidevices.info/cgi-bin/fcgi-starter: No such file or directory
chown: cannot access ‘/home/admin/web/minidevices.info/public_html/admin/web/minidevices.info/cgi-bin/fcgi-starter’: No such file or directory
============DEBUG===========
homedir = 
user = admin
domain = minidevices.info
===========================
/usr/local/vesta/data/templates/web/httpd//phpfcgid.sh: line 26: /home/admin/web/minidevices.info/public_html/admin/web/minidevices.info/cgi-bin/fcgi-starter: No such file or directory
chown: cannot access ‘/home/admin/web/minidevices.info/public_html/admin/web/minidevices.info/cgi-bin/fcgi-starter’: No such file or directory
Error: httpd restart failed
[root@localhost web]#

homedir variable is EMPTY.

Many conf files damaged and are not regenerating:

Screenshot from 2020-01-07 20-38-53 Screenshot from 2020-01-07 20-39-36

P.S. Please don't suggest any solutions like "reinstall Linux", "Reinstall VestaCP", "Check your router".

Skamasle commented 4 years ago

Hi

This is an inusual issue, normaly people not remove their network and reboot server without it

This can happen because vesta may run network scripts

So when this happen, you need plug your network ON, add ip to vesta and rebuild your vhosts.

I not have in mind what script exactly do it, I not touch vesta a lot of time now.

In virtualbox or some local virtualization not always IP was 127.0.0.1 in vesta, some times this IP is your public IP and not any private one, and all will works fine

Let me find my virtualmachines and I will try reproduce your problem on those days

kasem123 commented 2 years ago

Having the same issue Been trying to fix this for 3 days now. Had a power outage, when everything rebooted it seems like my server booted up before my router had internet and now the configs are messed up

Rebuilding configs doesn't help, not sure where to go from here

ntfs1984 commented 2 years ago

Having the same issue Been trying to fix this for 3 days now. Had a power outage, when everything rebooted it seems like my server booted up before my router had internet and now the configs are messed up

Rebuilding configs doesn't help, not sure where to go from here

As I understand, firstly you need manually edit file /usr/local/vesta/data/users/admin/web.conf, set there correct IP address, and only after that, rebuild web configs.

ntfs1984 commented 2 years ago

Hi

This is an inusual issue, normaly people not remove their network and reboot server without it

This can happen because vesta may run network scripts

So when this happen, you need plug your network ON, add ip to vesta and rebuild your vhosts.

I not have in mind what script exactly do it, I not touch vesta a lot of time now.

In virtualbox or some local virtualization not always IP was 127.0.0.1 in vesta, some times this IP is your public IP and not any private one, and all will works fine

Let me find my virtualmachines and I will try reproduce your problem on those days

Sorry for very late responce.

Situation when network is up later than server boots - usual. That's why DHCP daemons are ALWAYS active, not once during boot process.

Anyway, problem is still persists.

kasem123 commented 2 years ago

Thanks a lot! Issue got sorted when i edited the /usr/local/vesta/data/users/admin/web.conf file and rebuilt configs