Control Web Panel
WebPanel => CentOS-WebPanel Bugs => Topic started by: daro2013 on July 17, 2018, 10:28:44 AM
-
Hi sir,
I have installed CWP on both CentOs 6 64bits and CentOs 7 64bits, both generate php errors in CWP panel. I can confirm that the installation went well without errors, and I managed to create DNS records, a Database, username with password for an application in PhpMyAdmin.
However, these errors are shown in CWP panel for some reasons:
Warning: mysqli::__construct(): (HY000/1049): Unknown database 'oauthv2' in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
Notice: Trying to get property of non-object in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
I also can confirm that I have checked the password in these two files:
$ cat /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
$ cat /root/.my.cnf
they are the same and the same as root mysql password generated by CWP after the installation is complete.
Can you please help guide me how to fix that?
Cheers
Thon
-
navigate to /var/lib/mysql and see if oauthv2 exist or not. The error shows that this database doesnt exist.
-
hi,
Thank you for your help.
There is no such a file:
/var/lib/mysql
on my server. What it could be?
Cheers
Thon
-
what is output of this command
ls -la /var/lib/mysql
Also this command
mysql
SHOW VARIABLES LIKE 'datadir';
-
Hi,
Here are the inputs:
[root@vps69091 include]# ls -la /var/lib/mysql
total 110672
drwxr-xr-x 8 mysql mysql 4096 Jul 17 06:15 .
drwxr-xr-x. 34 root root 4096 Jul 17 05:04 ..
-rw-rw---- 1 mysql mysql 16384 Jul 17 06:15 aria_log.00000001
-rw-rw---- 1 mysql mysql 52 Jul 17 06:15 aria_log_control
-rw-rw---- 1 mysql mysql 12582912 Jul 17 06:15 ibdata1
-rw-rw---- 1 mysql mysql 50331648 Jul 17 06:15 ib_logfile0
-rw-rw---- 1 mysql mysql 50331648 Jul 17 05:00 ib_logfile1
drwx------ 2 mysql mysql 4096 Jul 17 05:19 mailwizz
-rw-rw---- 1 mysql mysql 0 Jul 17 05:01 multi-master.info
drwx--x--x 2 mysql mysql 4096 Jul 17 05:00 mysql
srwxrwxrwx 1 mysql mysql 0 Jul 17 06:15 mysql.sock
drwx------ 2 mysql mysql 4096 Jul 17 05:00 performance_schema
drwx------ 2 mysql mysql 4096 Jul 17 05:02 postfix
drwx------ 2 mysql mysql 4096 Jul 17 05:02 root_cwp
drwx------ 2 mysql mysql 4096 Jul 17 05:04 roundcube
-rw-rw---- 1 mysql mysql 24576 Jul 17 06:15 tc.log
-rw-rw---- 1 mysql mysql 6 Jul 17 06:15 vps69091.pid
-> SHOW VARIABLES LIKE 'datadir';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'olF5rZVkFN3d
SHOW VARIABLES LIKE 'datadir'' at line 1
Cheers
-
oauthv2 database doesnt exist on your server thats why its giving error.
-
Hi,
Thanks for your help.
What is the solution to that?
Cheers
-
Update:
I created that database in PhpMyAdmin:
oauthv2
The first warning has gone. But the second notice is still there:
Notice: Trying to get property of non-object in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0
How can I fix that?
Cheers
-
Login to phpmyadmin with your root password.
http://serverip:2030/pma
Navigate to create database
http://serverip:2030/pma/server_databases.php
Create database.
oauthv2 as latin1_swedish_ci
Download the attached database and import in it.
http://send.bullten.net/download/3e2027b25812432019042b2d10b771a5.html
-
Hi,
It is FIXED!
Thanks for great help.
Why this has happened?
Cheers
-
Update:
New warnings coming:
2018-07-17 10:49:39 Danger: ModSecurity - SECURITY ISSUE
Mod Security is NOT enabled on your server, click here to enable it.
×2018-07-17 10:49:39 Danger: Firewall - SECURITY ISSUE
CSF/LFD Firewall is NOT enabled on your server, click here to enable it.
×2018-07-17 10:49:39 Danger: Hidden Processes - SECURITY ISSUE
Hide all processes if not owned by the user is NOT activated on your server, click here to enable it.
Cheers
-
Just warning. Enable those functions if you need.
-
thanks.
I just closed those warnings and refresh cwp browser, they have gone.
Many thanks again for great help.
Cheers
-
Update:
After I created a user in CWP panel which will automatically created an FTP server with a default index.html. It seem not working when I tried to access that page at:
http://www.mydomain.com/index.html
it generates:
"This site can’t be reached"
What could be wrong with that?
-
Update:
I have to issue the following commands:
[root@vps69091 ~]# service named reload && /etc/init.d/named restart
Redirecting to /bin/systemctl reload named.service
Job for named.service invalid.
they generate errors.
It seems that named has been moved?
Cheers
-
What is output of
yum list installed | grep bind
And
serivce named restart
-
a. Here are the outputs of the commands:
[root@vps196134 ~]# yum list installed | grep bind
bind.x86_64 32:9.9.4-61.el7 @base
bind-libs.x86_64 32:9.9.4-61.el7 @base
bind-libs-lite.x86_64 32:9.9.4-61.el7 @base
bind-license.noarch 32:9.9.4-61.el7 @base
bind-utils.x86_64 32:9.9.4-61.el7 @base
[root@vps196134 ~]# serivce named restart
-bash: serivce: command not found
b. And here the DNS config I did in CWP panel:
$TTL 38400
@ IN SOA ns1.mydomain.com. admin.mydomain.com. (
20170922110026 ; serial
90M ; refresh
15M ; retry
14D ; expire
3600 ; default_ttl
)
mydomain.com. 14400 IN NS ns1.mydomain.com.
mydomain.com. 14400 IN NS ns2.mydomain.com.
ns1 14400 IN A xxx.xxx.xxx.xxx
ns2 14400 IN A xxx.xxx.xxx.xxx
mydomain.com. 14400 IN A xxx.xxx.xxx.xxx
localhost 14400 IN A 127.0.0.1
mydomain.com. 14400 IN MX 0 mydomain.com.
server IN A xxx.xxx.xxx.xxx
www IN A xxx.xxx.xxx.xxx
mydomain.com. IN TXT "v=spf1 a mx ptr a:mydomain.com ip4:xxx.xxx.xxx.xxx ?all"
_adsp._domainkey.mydomain.com. IN TXT "dkim=all"
_domainkey.mydomain.com. IN TXT "o=~; r=abuse@mydomain.com"
_dmarc.mydomain.com. IN TXT "v=DMARC1; p=quarantine; sp=r; pct=100; aspf=r; adkim=s"
default._domainkey IN TXT ( "v=DKIM1; k=rsa; "
"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCCRwGE8OCQk/skzSse3837B4/PLCtW6FfYESiyFshpKlF8bOGl7MfpKXibbTfBdur0puNmGOPhSSPxzEsnHjmYp7xHErzgYVd/Wgqp9HdyQRBfqyVJXmSbhuhjFe7zCYyrp4gZY1maDa5T6p8nIj/acuXrmgJNLOeAcbW7RjS8EQIDAQAB" ) ; ----- DKIM key default for mydomain.com
nh4rtd9f IN CNAME www.mydomain.com.
Cheers
-
Sorry I miss typed Its
service named restart
-
Sorry there is a mistyped command above. Here is a correct one:
[root@vps196134 ~]# service named restart
Redirecting to /bin/systemctl restart named.service
Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details.
Cheers
-
what is output of this.
systemctl status named.service
-
Here it is:
[root@vps196134 ~]# systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-07-18 03:02:07 EDT; 3h 3min ago
Process: 3650 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
Process: 13170 ExecReload=/bin/sh -c /usr/sbin/rndc reload > /dev/null 2>&1 || /bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 12029 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, status=0/SUCCESS)
Process: 3660 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)
Main PID: 12031 (code=exited, status=0/SUCCESS)
Jul 18 03:02:07 vps196134.vps.ovh.ca bash[3660]: zone ns2.baiagmumr5g.eu/IN: loaded serial 2013071600
Jul 18 03:02:07 vps196134.vps.ovh.ca bash[3660]: dns_rdata_fromtext: /var/named/baiagmumr5g.eu.db:2: near '20170922110026': out of range
Jul 18 03:02:07 vps196134.vps.ovh.ca bash[3660]: /var/named/baiagmumr5g.eu.db:36: file does not end with newline
Jul 18 03:02:07 vps196134.vps.ovh.ca bash[3660]: zone baiagmumr5g.eu/IN: loading from master file /var/named/baiagmumr5g.eu.db failed: out of range
Jul 18 03:02:07 vps196134.vps.ovh.ca bash[3660]: zone baiagmumr5g.eu/IN: not loaded due to errors.
Jul 18 03:02:07 vps196134.vps.ovh.ca bash[3660]: _default/baiagmumr5g.eu/IN: out of range
Jul 18 03:02:07 vps196134.vps.ovh.ca systemd[1]: named.service: control process exited, code=exited status=1
Jul 18 03:02:07 vps196134.vps.ovh.ca systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Jul 18 03:02:07 vps196134.vps.ovh.ca systemd[1]: Unit named.service entered failed state.
Jul 18 03:02:07 vps196134.vps.ovh.ca systemd[1]: named.service failed.
Thanks
-
Issue in /var/named/baiagmumr5g.eu.db
Recreate it.
-
Here is the DNS record I have set in CWP panel:
$TTL 38400
@ IN SOA ns1.baiagmumr5g.eu. admin.baiagmumr5g.eu. (
20170922110026 ; serial
90M ; refresh
15M ; retry
14D ; expire
3600 ; default_ttl
)
baiagmumr5g.eu. 14400 IN NS ns1.baiagmumr5g.eu.
baiagmumr5g.eu. 14400 IN NS ns2.baiagmumr5g.eu.
ns1 14400 IN A 167.114.98.75
ns2 14400 IN A 167.114.98.75
baiagmumr5g.eu. 14400 IN A 167.114.98.75
localhost 14400 IN A 127.0.0.1
baiagmumr5g.eu. 14400 IN MX 0 baiagmumr5g.eu.
server IN A 167.114.98.75
www IN A 167.114.98.75
baiagmumr5g.eu. IN TXT "v=spf1 a mx ptr a:baiagmumr5g.eu ip4:167.114.98.75 ?all"
_adsp._domainkey.baiagmumr5g.eu. IN TXT "dkim=all"
_domainkey.baiagmumr5g.eu. IN TXT "o=~; r=abuse@baiagmumr5g.eu"
_dmarc.baiagmumr5g.eu. IN TXT "v=DMARC1; p=quarantine; sp=r; pct=100; aspf=r; adkim=s"
Can you please what is wrong with that?
Cheers
-
your serial is too long, it can be only 10 characters long
your is
20170922110026 ; serial
-
thanks for your advice.
I have changed to the followings:
; Panel %version%
; Zone file for ns1.baiagmumr5g.eu
$TTL 14400
ns1.baiagmumr5g.eu. 86400 IN SOA ns1.baiagmumr5g.eu. admin.baiagmumr5g.eu. (
2013071600 ;serial, todays date+todays
86400 ;refresh, seconds
7200 ;retry, seconds
3600000 ;expire, seconds
86400 ;minimum, seconds
)
baiagmumr5g.eu. 14400 IN NS ns1.baiagmumr5g.eu.
baiagmumr5g.eu. 14400 IN NS ns2.baiagmumr5g.eu.
ns1 14400 IN A 167.114.98.75
ns2 14400 IN A 167.114.98.75
baiagmumr5g.eu. 14400 IN A 167.114.98.75
localhost 14400 IN A 127.0.0.1
baiagmumr5g.eu. 14400 IN MX 0 baiagmumr5g.eu.
server IN A 167.114.98.75
www IN A 167.114.98.75
baiagmumr5g.eu. IN TXT "v=spf1 a mx ptr a:baiagmumr5g.eu ip4:167.114.98.75 ?all"
_adsp._domainkey.baiagmumr5g.eu. IN TXT "dkim=all"
_domainkey.baiagmumr5g.eu. IN TXT "o=~; r=abuse@baiagmumr5g.eu"
_dmarc.baiagmumr5g.eu. IN TXT "v=DMARC1; p=quarantine; sp=r; pct=100; aspf=r; adkim=s"
But it still does not work.
Cheers
-
did you try rebuilding zone?
-
Hi,
Can you give me instruction on how to rebuild zone?
Cheers
-
Update: I have deleted a user I created in CWP panel to remove DNS record. And created it again to rebuild DNS records.
The issue is still the same; binding does not work.
Or I can give you SSH credentials to have a look? Do you have an email address?
Cheers
-
try to check info about the error
service named status
if the is no error info then you can check for bind error in the /var/log/messages file
example
service named restart
tail -n 200 /var/log/messages
-
Thanks, studio4host.
Bullen has fixed it. He may put his guides here soon to benefit everyone.
Cheers
-
Thanks.
What is the equivalent to:
service named restart
-
Thanks.
What is the equivalent to:
service named restart
This service is used to restart the DNS service.
-
Thanks. I mean what is the equivalent to
service named restart (that is for CentOs 6)
on CentOs 7?
-
you can use the same on the centos 7 or if you want you can also use systemctl on centos 7
systemctl restart named.service
-
Thank you for all who have tried to help me especially Bullten. I found his advice on another link and was able to fix the issue with binding.
Just simply go to CWP panel --> DNS Functions --> Edit Nameservers IPs --> then press Save Changes to rebuild DNS records
Then in SSH, this command now works:
$ systemctl restart named
However, I have another issue. Because this ticket is too long, I will open another ticket.
Many thanks again for this great community.
Cheers
Daro
-
Login to phpmyadmin with your root password.
http://serverip:2030/pma
Navigate to create database
http://serverip:2030/pma/server_databases.php
Create database.
oauthv2 as latin1_swedish_ci
Download the attached database and import in it.
http://send.bullten.net/download/3e2027b25812432019042b2d10b771a5.html
Hi Bullten,
Could you upload this database again, becaus I got that warnings and notices too.
Thanks alot.
-
Here is the file https://send.bullten.network/download/384331592e4be3a0aadf84b2f9eb37fb.html
-
I just installed the panel and i get the same error
(https://i44.servimg.com/u/f44/12/76/13/88/cwp-er10.png)
-
i have absolutely the same warning, upload please oauth2v database again, because link expired
-
Someone upload it somewhere else as our system will delete it in 7 days
https://send.bullten.network/download/ef95faa2e951d34c129a1382f033c3eb.html
-
thanks, it fixed my problem
-
You have tried to enter the User GUI
-
Someone upload it somewhere else as our system will delete it in 7 days
https://send.bullten.network/download/ef95faa2e951d34c129a1382f033c3eb.html
Can you reupload again, sure i will upload to my drive and give the link at here so it can be useful for other people who have same problems.
-
https://send.bullten.network/download/ae08ab5e78a0137522d98e0df63a9d5d.html
-
https://send.bullten.network/download/ae08ab5e78a0137522d98e0df63a9d5d.html
I have been put this file into my gist on github,
at here >> https://gist.github.com/aalfiann/b628949373c40497b7904ce20651d3d2 (https://gist.github.com/aalfiann/b628949373c40497b7904ce20651d3d2)
-
hmmm I see something wrong here, please do the following
- Backup your BD oauthv2
- Remove it
- Try to enter as a user
The DB must have been created, but not in InnoDB but in MyISAM
Please let me know how it went
-
Hi I have this problem
I have the oauthv2 Database in my list
But my error is:
Warning: mysqli_connect(): (HY000/1049): Unknown database 'root' in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
and in my cwp7 Dashboard: MySQL Database Server is failed
-
Name servers is not ssetup good.
and for domain probably you didnt be directed corectly