Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Server Error when Add/Delete Domain #102

Closed
kang28ivan opened this issue Aug 11, 2019 · 13 comments
Closed

Internal Server Error when Add/Delete Domain #102

kang28ivan opened this issue Aug 11, 2019 · 13 comments
Labels
Type: Bug Unreleated Issue not originating from VWI

Comments

@kang28ivan
Copy link

I have problems when adding or removing domains

500
Internal Server Error
Something went wrong. Please try your request again.

https://prnt.sc/or6s0j

@kurtobando
Copy link

Better to check your apache error logs for clues. 500 is too general to isolate.

@kang28ivan
Copy link
Author

here this error log

2019/08/11 17:41:13 [error] 14982#14982: *118 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: in /home/admin/web/myhostname/public_html/add/domain.php on line 64" while reading response header from upstream, client: 110.139.250.131, server: myhostname, request: "GET /add/domain.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "myhostname", referrer: "https://myhostname/index.php" 2019/08/11 17:41:13 [error] 14982#14982: *118 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 1 in /home/admin/web/myhostname/public_html/add/domain.php on line 206" while reading upstream, client: 110.139.250.131, server: myhostname, request: "GET /add/domain.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "myhostname", referrer: "https://myhostname/index.php" 2019/08/11 17:41:13 [error] 14982#14982: *118 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 3 in /home/admin/web/myhostname/public_html/add/domain.php on line 320" while reading upstream, client: 110.139.250.131, server: myhostname, request: "GET /add/domain.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "myhostname", referrer: "https://myhostname/index.php" 2019/08/11 17:41:13 [error] 14982#14982: *118 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 1 in /home/admin/web/myhostname/public_html/add/domain.php on line 445" while reading upstream, client: 110.139.250.131, server: myhostname, request: "GET /add/domain.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "myhostname", referrer: "https://myhostname/index.php"

@cdgco
Copy link
Owner

cdgco commented Aug 12, 2019

@kang28ivan Nothing in your error log would throw a fatal error, they are all just notices rather than errors or warnings. Try editing your .htaccess file, changing line 34 to php_flag display_errors On and attempting the same action then respond with any error codes.

@kang28ivan
Copy link
Author

@kang28ivan Nothing in your error log would throw a fatal error, they are all just notices rather than errors or warnings. Try editing your .htaccess file, changing line 34 to php_flag display_errors On and attempting the same action then respond with any error codes.

I use nginx + php-fpm at this time, and for the DB menu is not available?
I don't see a menu to add a database

@cdgco
Copy link
Owner

cdgco commented Aug 18, 2019

@kang28ivan This is likely related to issue #97 which has been fixed in the upcoming release, but you can try the solution listed in this comment to see if that works.

I would also appreciate if you could run the command bash <(curl -s https://cdgco.github.io/debug) and reply with the ouput so that I can see your specific system configuration.

@kang28ivan
Copy link
Author

@kang28ivan This is likely related to issue #97 which has been fixed in the upcoming release, but you can try the solution listed in this comment to see if that works.

I would also appreciate if you could run the command bash <(curl -s https://cdgco.github.io/debug) and reply with the ouput so that I can see your specific system configuration.

Thank you, this means just waiting for an upcoming release for improvement db menu.

here debug command result

bash <(curl -s https://cdgco.github.io/debug)
/dev/fd/63: line 22: [: missing `]'
Error: Debian, Ubuntu, CentOS, or RHEL not detected. Exiting ...\n

@cdgco
Copy link
Owner

cdgco commented Aug 18, 2019

@kang28ivan Sorry, it looks like the debug script isn't working. Could you try running this command instead php -v && lsb_release -a && /usr/local/vesta/bin/v-list-sys-config && /usr/local/vesta/bin/v-list-sys-services and could you also tell me what operating system you are using?

As for the actual issue, yes you can wait for the next release, but the fix is already uploaded to GitHub, so if you manually replace your includes.php file as detailed in the comment I linked above, you should be able to fix it immediately.

@kang28ivan
Copy link
Author

@kang28ivan Sorry, it looks like the debug script isn't working. Could you try running this command instead php -v && lsb_release -a && /usr/local/vesta/bin/v-list-sys-config && /usr/local/vesta/bin/v-list-sys-services and could you also tell me what operating system you are using?

As for the actual issue, yes you can wait for the next release, but the fix is already uploaded to GitHub, so if you manually replace your includes.php file as detailed in the comment I linked above, you should be able to fix it immediately.

Thank you, I will try manual update sir.

php -v && lsb_release -a && /usr/local/vesta/bin/v-list-sys-config && /usr/local/vesta/bin/v-list-sys-services

PHP 7.2.21 (cli) (built: Jul 30 2019 14:46:08) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.6.1810 (Core)
Release: 7.6.1810
Codename: Core
WEB Server: nginx:80 ()
SSL Support: openssl:443
WEB Backend: php-fpm
Web Stats: webalizer, awstats
FTP Server: vsftpd
Mail Server: exim + dovecot + clamav + spamassassin
Database: mysql
DNS server: named
CRON: crond
Firewall: iptables
Backups: local
Disk Quota: yes
Version: 0.9.8
NAME STATE CPU MEM UPTIME


nginx running 0.1 1285 5551
php-fpm running 73.4 414 5551
named running 0 1188 8121
exim running 0 1 8136
dovecot running 0 0 8136
clamd running 0 825 10207
spamassassin running 75.1 9513 521
mariadb running 1 4017 9208
vsftpd running 0 0 8136
crond running 0 1 10208
iptables running 0 0 0

@cdgco
Copy link
Owner

cdgco commented Aug 18, 2019

@kang28ivan It looks like your problem is the same as the other issue. It is specifically related to MariaDB (and/or Apache2 & Named) on CentOS. If this fix does not work, let me know.

Also, I could be wrong, but I believe this error should also be preventing your 'DNS' page from displaying too.

@kang28ivan
Copy link
Author

@kang28ivan It looks like your problem is the same as the other issue. It is specifically related to MariaDB (and/or Apache2 & Named) on CentOS. If this fix does not work, let me know.

Also, I could be wrong, but I believe this error should also be preventing your 'DNS' page from displaying too.

It seems right as you said, several times I have to restart the mariadb because when access to the interface appears not connected notifications, and after restarting mariadb can work fine.

So how is the solution to fix it?

@cdgco
Copy link
Owner

cdgco commented Aug 18, 2019

@kang28ivan The issue with the menus not showing is that VWI is attempting to find MySQL not MariaDB. That is fixed by replacing your includes/includes.php file with this one.

The 'not connected' notifications are an entirely different issue, and are likely a product of your server configuration. Either your server does not have enough resources to keep up with the requests from VWI or it is having trouble using the specified connection.

One method of solving this is to enable database caching in your includes.php file by changing line 34 from $configstyle = '1'; to $configstyle = '2'; and specifying a secure location in line 48: $co1 = $configlocation . "../tmp/";. By doing this, if VWI cannot connect to your database in time, it will use a local copy from the last time it was able to connect. See Connection Method - Vesta Web Interface - Docs for more info.

To fix the underlying issue that is causing this, you might want to try different addresses such as localhost, your FQDN such as example.com or an IP address such as 12.34.56.78 in your config.php file, or you may want to try using a different database for VWI, such as a MySQL database from a different host like freemysqlhosting.net or remotemysql.com (I have never used either service, so do your own research if choosing a 3rd party provider).

@kang28ivan
Copy link
Author

@kang28ivan It looks like your problem is the same as the other issue. It is specifically related to MariaDB (and/or Apache2 & Named) on CentOS. If this fix does not work, let me know.

Also, I could be wrong, but I believe this error should also be preventing your 'DNS' page from displaying too.

I have already tried reinstalling, but the result is still the same, when add domain and delete domain always "Internal Server Error"

2019/08/18 23:08:38 [error] 8563#8563: *1777840 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 2 in /home/admin/web/abcotra/public_html/add/domain.php on line 206" while reading upstream, client: 180.249.201.8, server: abcotra, request: "GET /add/domain.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "abcotra", referrer: "https://abcotrahostname.com/index.php" 2019/08/18 23:08:38 [error] 8563#8563: *1777840 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 3 in /home/admin/web/abcotra/public_html/add/domain.php on line 320" while reading upstream, client: 180.249.201.8, server: abcotra, request: "GET /add/domain.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "abcotra", referrer: "https://abcotrahostname.com/index.php" 2019/08/18 23:08:55 [error] 8563#8563: *1777840 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 180.249.201.8, server: abcotra, request: "POST /create/domain.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "abcotra", referrer: "https://abcotrahostname.com/add/domain.php"

@cdgco
Copy link
Owner

cdgco commented Aug 18, 2019

@kang28ivan The error that is causing this is from this line [error] 8563#8563: *1777840 recv() failed (104: Connection reset by peer) while reading response header from upstream. This is an error between nginx and php-fpm where your server is closing the connection because it is out of resources.

Unfortunately, this in not an error with VWI but rather VestaCP and your configuration of nginx and php-fpm. I would recommend reading something like this and altering your memory and timeout configurations, or contacting the support team from VestaCP as they are much more knowledgeable about these issues.

@cdgco cdgco added the Unreleated Issue not originating from VWI label Aug 18, 2019
cdgco added a commit that referenced this issue Sep 16, 2019
Bug Fixes, Dependency Updates, Plugin System, Copyright Headers, Reset Settings to Default Closes #86 and #102
@cdgco cdgco closed this as completed Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Unreleated Issue not originating from VWI
Projects
None yet
Development

No branches or pull requests

3 participants