Error : #1045 Cannot log in to the MySQL server

Jul09

Getting the following error while trying to access phpmyadmin from within cpanel :

#1045 Cannot log in to the MySQL server

Solution :

Please change the cpanel username from within cpanel. make sure that “Allow MySQL password change” check box is selected while changing the password.

Iframe

Jul09

Bare minimum iframe code:

iframe code

  1. Opening tag
  2. iframe page source
  3. height of the iframe
  4. width of the iframe
  5. Non-iframe content (What to display in the users’ browser if they are not capable of viewing iframes.)
  6. Closing tag

RVsitebuilder

Jul09

RVsitebuilder installation

cd /usr/local/cpanel/whostmgr/docroot/cgi/
rm -f rvsitebuilderinstaller.tar
wget http://download.rvglobalsoft.com/rvsitebuilderinstaller.tar
tar -xvf rvsitebuilderinstaller.tar
chmod 755 addon_rvsitebuilder.cgi
rm -f rvsitebuilderinstaller.tar

Open root WHM, at the bottom of menu on the left side where is under Plugins section, you will find RVSiteBuilder Installer menu.

Click RVSiteBuilder Installer to begin installation process.

After completing the installation, you will be linked to RVSiteBuilder Manager automatically. Please configure RV SiteBuilder immediately.

Berkeley DB error /var/spool/exim/db/retry: unexpected file type or format

Jul09

Berkeley DB error /var/spool/exim/db/retry: unexpected file type or format

This problem occur when  receiving the emails in the inbox.

When you facing the above error simply do below following steps to resolve it ,

1) Login to the server as root and stop the EXIM service using below commands :-

root@master[#] /etc/init.d/exim stop

2) root@master[#]  cd /var/spool/exim/db/

after that you need to take a backup of “/db” for security purpose  and remove all the files.

root@master[#]  cp -Ra db/ db.bk/  (For taking a backup )

3) root@master[#]  cd /var/spool/exim/db/

4) root@master[#]  rm -rf *  (for remove/delete files)

And start the EXIM service so the new “db” is automatically created,

5) /etc/init.d/exim start 

Here your issue is resolved :D

vps

Jul09

“Unable to fork: Cannot allocate memory”
root@server]# vzctl enter [container ID]
We get the error like “Unable to fork: Cannot allocate memory”

Some times we get error while entering in to the VPS server vzctl enter [CT ID], We get the errorlike “Unable to fork: Cannot allocate memory”

This error is basically received in case of the VPS is running out of the resources. In this case even rebooting the VPS may fix it on temporary basis and not permanently. To sort this issue we can increase the kmemsize & privvmpages values for the VPS in order to solve the issue.

kmemsize
The size of unswappable memory allocated by the operating system kernel. It includes all the kernel internal data structures associated with the Container processes, except the network buffers.

privvmpages
This parameter allows controlling the amount of memory allocated by applications.

For eliminating the error just follow the below mentioned steps:

check the container id in cat /proc/user_beancounters by firing the command

root@server]# cat /proc/user_beancounters | grep container ID

Then you will be able to see Container ID: kmemsize 2505478 2538648 11055923 11377049 0

So the memory is consumed totally.now,

root@server]# vzctl set container ID –k memsize 12752512:12752512 –save

Now restart the container vzctl restart container ID

OR I my case I have just restarted the VPS container

That’s it!! Now try to enter to the VPS container and you will not receive the error.

Plesk

Jul09

Different configuration files in plesk:
I) Apache configuration and log files locations
1)Main apache configuration files
[root@server1 ~]#/etc/httpd/conf/httpd.conf

2)sers apache configuration files
[root@server1 ~]#/etc/httpd/conf.d/*_psa_httpd.conf

3)Users apache configuration files
Include /home/httpd/vhosts/<domainname>/conf/httpd.include

4)Apache’s log file is located in
[root@server1 ~]#/var/log/httpd/error_log

5)Apache include files directory
[root@server1 ~]#/etc/httpd/conf.d/

6)Apache binary file
[root@server1 ~]#/usr/sbin/httpd

II)Qmail configuration and log files locations
1)mail directory
[root@server1 ~]#/var/qmail

2)Location of qmail maildirs
[root@server1 ~]#/var/qmail/mailnames/

3)Log file location
[root@server1 ~]#/usr/local/psa/var/log/maillog

4)Binary directory
[root@server1 ~]#/var/qmail/bin/

III)My Sql configuration file and log location
1)location of mysql
[root@server1 ~]#/var/lib/mysql

2)Configuration File
[root@server1 ~]#/etc/my.cnf

3)Log file
[root@server1 ~]#/var/log/mysqld.log

4)Binary file
[root@server1 ~]#/usr/bin/mysql

IV)BIND configuration file
1)Configuration File
[root@server1 ~]#/var/named/run-root/etc/named.conf

2)Zone file location
[root@server1 ~]#/var/named/run-root/var/<domain>

V)Plesk configuration files
1)Plesk admin password
[root@server1 ~]#/etc/psa/.psa.shadow

2)Plesk configuration file
[root@server1 ~]#/etc/psa/psa.conf

3)Plesk directory
[root@server1 ~]#/usr/local/psa

4)Directory for the config file is
[root@server1 ~]#/usr/local/psa/etc

5)postgresql directory
[root@server1 ~]#/var/lib/pgsql/data

VI)FTP configuration files and logs
1)FTP configuration file
[root@server1 ~]#/etc/proftpd.conf

2)FTP log file
[root@server1 ~]#/usr/local/psa/var/log/xferlog

3)FTP bianry file
[root@server1 ~]#/usr/bin/ftp

VII)Awstatics configurtion files and logs
1)Configuration file location
[root@server1 ~]#/etc/awstats/awstats.com

2)Log file are located in
[root@server1 ~]#/var/log/httpd/access_log

3)Domains access logs
[root@server1 ~]#/home/httpd/vhosts/<domain name>/statistics/logs/access_log

Tomcat

Jun25

Cloud Hosting

Tomcat – java.lang.OutOfMemoryError: PermGen space

When you access .jsp page then some times it shows the following error on the page.

============================
HTTP Status 500 –

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception

root cause

java.lang.OutOfMemoryError: PermGen space

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
Apache Tomcat/5.5.25
============================

Solution is :

It needs to increase the memory by making changes in catalina.sh file.

Follow the following steps :

1) vi /usr/local/jakarta/tomcat/bin/catalina.sh

2) Add following line into the catalina.sh file.

JAVA_OPTS=”-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC”

Partial example of catalina.sh file

===========================================
# JSSE_HOME (Optional) May point at your Java Secure Sockets Extension
# (JSSE) installation, whose JAR files will be added to the
# system class path used to start Tomcat.
#
# CATALINA_PID (Optional) Path of the file which should contains the pid
# of catalina startup java process, when start (fork) is used
#
# $Id: catalina.sh 609438 2008-01-06 22:14:28Z markt $
# —————————————————————————–

JAVA_OPTS=”-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC”

# OS specific support. $var _must_ be set to either true or false.
cygwin=false
os400=false
darwin=false

========================================

Save and exit
Then restart the tomcat

root@server[~]# /usr/local/jakarta/tomcat/bin/./shutdown.sh
root@server[~]# /usr/local/jakarta/tomcat/bin/./startup.sh
root@server[~]# /usr/local/jakarta/tomcat/bin/./catalina.sh run
root@server[~]# /scripts/restartsrv tomcat

Sidebar