Control Web Panel
WebPanel => CentOS-WebPanel Bugs => Topic started by: angelbro on February 16, 2018, 03:04:47 AM
-
Hi everyone.
Sorry for my bad english.
I had this massage on Anacron jop mail from my server.
######################
Update Server Packages
######################
TERM environment variable not set.
https://mirrors.ustc.edu.cn/epel/7/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
Redirecting to /bin/systemctl restart cwpsrv.service
Redirecting to /bin/systemctl restart cwp-phpfpm.service
Redirecting to /bin/systemctl reload cwpsrv.service
Redirecting to /bin/systemctl reload cwp-phpfpm.service
Date which backup script is using: 2018-02-15 18:13:33
What does it mean?
Search resulut fot "TERM environment variable not set" is not helpful for me.
Please tell me how can I fix it.
-
Hi,
I noticed today that I have problems too
######################
Update Server Packages
######################
TERM environment variable not set.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[16-Feb-2018 03:50:16] WARNING: Nothing matches the include pattern '/usr/local/cwp/php71/etc/php-fpm.d/users/*.conf' from /usr/local/cwp/php71/etc/php-fpm.d/users.conf at line 1.
[16-Feb-2018 03:50:16] NOTICE: configuration file /usr/local/cwp/php71/etc/php-fpm.conf test is successful
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[16-Feb-2018 03:50:16] WARNING: Nothing matches the include pattern '/usr/local/cwp/php71/etc/php-fpm.d/users/*.conf' from /usr/local/cwp/php71/etc/php-fpm.d/users.conf at line 1.
[16-Feb-2018 03:50:16] NOTICE: configuration file /usr/local/cwp/php71/etc/php-fpm.conf test is successful
Date which backup script is using: 2018-02-16 02:50:17
-
@angelbro
it means that the variable TERM is not set for the whole environment, but it is available locally for root user.
To fix this we need to make the variable globally through 'export'.
1. connect to your server via SSH as root
2. Find out your TERM value
on the terminal execute
# echo $TERM
my result for e.g. is
xterm-256color
if yours is "dumb" then use "dump"
compare the output with
# printenv TERM
it probably differs. either way proceed with the following.
3. export the variable
Now you just could do
# export TERM=xterm-256color
but after a server reboot it would be forgotten.
so we need to put this into ~/.bashrc
# echo "export TERM=xterm-256color" >> ~/.bashrc
or
# echo "export TERM=dumb" >> ~/.bashrc
IMPORTANT: use ">>" it means append.
If you use ">" it will replace everything inside the file!
From now on - everytime you login in as root, the .bashrc script will say "make TERM=xterm-256color a public environment variable".
Alternative you could also put "export TERM=xterm-256color" OR "export TERM=dumb" into the cronjob (who sends you the emails) under: "/etc/cron.daily/cwp" to automate it if you like.
Probably good option if you don't login often as root very often.
4. finally: reload/execute .bashrc
# source ~/.bashrc
it's the same as logout and login again.
I don't know why this happens. This should be easy peasy for the CWP creators.
ENJOY! ;)
Source: https://linuxconfig.org/term-environment-variable-not-set-solution (https://linuxconfig.org/term-environment-variable-not-set-solution)
Source: https://github.com/dockerfile/mariadb/issues/3 (https://github.com/dockerfile/mariadb/issues/3)
-
@zakrpa
you have 2 more problems!
1. You need to fix "/usr/local/cwp/php71/etc/php-fpm.d/users.conf" at line 1.
don't know what is wrong there.
OR
Do you have a user account named "users" ?
If yes … delete him from CWP.
And second you need to to fix ERROR 1045
1. reset you mysql root passwort
to do that, execute:
# /scripts/mysql_pwd_reset
2. copy the new password
and make sure it is saved under ~/.my.cnf AND /usr/local/cwpsrv/var/services/pma/config.inc.php
Then you need to do this > https://www.ostraining.com/blog/coding/error-1045-phpmyadmin/ (https://www.ostraining.com/blog/coding/error-1045-phpmyadmin/)
with your new password.
Maybe you have to fix ERROR 1045 before you can delete a user account (step 1).
Enjoy! ;)
-
@angelbro & @zakrpa
Don't mention it, you are welcome!
-
@zenben
Thanks, your solution with variable export worked!
For me (CentOS 7.9) it was
export TERM=xterm