Saturday, February 12, 2011

mysqld ไม่สามารถใช้งานได้ แต่ status ก็ไม่ตาย ใครเคยเจอบ้าง

แบบอยู่ๆ ทุกเว็บก็ connect mysqld ไม่ได้
แต่พอ ssh เข้าไปเช็ค
[root@server root]# service mysqld status
mysqld (pid 22214) is running...

ผมแก้แค่
[root@server root]# kill -9 22214


มันก็ใช้งานได้เลยนะครับ โดยเปลี่ยน pid
[root@server root]# service mysqld status
mysqld (pid 22548) is running...

แต่ปัญหาคือต้องมาค่อย kill มันนะครับเลยไม่รู้สาเหตุว่าทำไมอยู่ๆมันถึงทำงานไม่ได้นะครับ
มีใครเคยเจอบ้างไหมครับ
ใช้ linux + plesk นะครับ
ขอบคุณครับ

เช็ค log มันขึ้นแบบนี้นะครับจาก /var/log/mysqld.log
[root@server log]# cat mysqld.log.1
A mysqld process already exists at  Sat May 3 20:02:28 ICT 2008
080503 20:02:55  mysqld ended

080503 20:05:27  mysqld started
080503 20:05:28  InnoDB: Out of memory in additional memory pool.
InnoDB: InnoDB will start allocating memory from the OS.
InnoDB: You may get better performance if you configure a bigger
InnoDB: value in the MySQL my.cnf file for
InnoDB: innodb_additional_mem_pool_size.
080503 20:05:28  InnoDB: Started
080503 20:05:28  Found invalid password for user: 'dbservicesrn'@'localhost'; Ignoring user
080503 20:05:28  Found invalid password for user: 'school'@'localhost'; Ignoring user
080503 20:05:28  Found invalid password for user: 'p5wd2'@'localhost'; Ignoring user
080503 20:05:28  Found invalid password for user: 'wixx8'@'localhost'; Ignoring user
/usr/libexec/mysqld: ready for connections

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

ถ้าไม่มีการใช้ innodb ก็ใส่ --skip-innodb ใน my.cnf 



ถ้าไม่มีการใช้ innodb ก็ใส่ --skip-innodb ใน my.cnf


น่าจะใส่ตรงไหนหรือครับ
[mysqld]
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

ผมเจอแปลกเรื่องนึงนะครับ
คือ ผมลอง
[root@server root]# ps auxww |grep mysql
root    24035  0.0  0.1  4248  544 ?        S    May03  0:00 /bin/sh /usr/bin/safe_mysqld --defaults-file=/etc/my.cnf
mysql    32330  0.1  4.2 104588 21988 ?      S    09:58  0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking
root      315  0.0  0.1  3684  660 pts/0    S    10:01  0:00 grep mysql

แต่ พอลอง cat /var/run/mysqld/mysqld.pid กลับไม่มีอะไรเลย เพราะลองเครื่องอื่นแล้วมันจะต้องมี อันเดียวกับ pid เช่น pid 32330
[root@server root]# cat /var/run/mysqld/mysqld.pid

อย่างนี้ผม [root@serverroot]# vi /var/run/mysqld/mysqld.pid
ใส่ id ไปจะเป็นไปไหมครับ

และน่าจะเกียวกับปัญหานี้ไหมครับ

ผมสังเหตุเครื่องนี้ แปลกกว่าเครื่องอื่นตรง pid file ที่เก็บ mysql นะครับ ไม่รู้เกียวหรือเปล่า

เครื่องอื่น
mysql    21365  5.9  0.9 68452 4284 ?        S    Apr18 1364:29 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-locking

ตรง --pid-file=/var/lib/mysql/mysqld.pid จะอยู่ที่ /var/lib/mysql/....xxx


เครื่องที่มีปัญหา
mysql    32330  0.1  4.3 104680 22328 ?      S    09:58  0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking


มันเป็น --pid-file=/var/run/mysqld/mysqld.pid  คือไปอยู่ที่ /var/run/mysqld/..xxxx

ไม่ รู้ว่าอันไหนน่าจะถูกต้องหรือครับ แล้วมันคืออะไรมีผลอย่างไร น่าจะเกี่ยวกับปัญหาหรือเปล่าเพราะ ผมไปเช็คดูที่ file =/var/run/mysqld/mysqld.pid ปรากฏว่าไม่มีนะครับ เลยได้สร้างขี้นมาแล้วก็ใส่ pid เกียวกับ mysql status เข้าไป
ตอนนี้ ลองอยู่ว่าจะมีปัญหาอีกหรือเปล่า

ปัญหาน่าจะมาจาก pid ไฟล์ที่ว่ามาครับ
ประมาณว่า service on อยู่แต่ไ่ม่มี pid อยุ่ในไฟล์
ตัว monitor service ก็เลยคิดว่า down และทำการ start ให้

ลองสั่ง /etc/init.d/mysql(d) stop ติดกัน 2 ครั้ง (เริ่มสั่งตอนต้นนาทีเพื่อหลีกเลี่ยง cron)
แล้วตามด้วย killall mysqld
ps ดูว่ามี process mysql เหลืออยู่หรือเปล่า ถ้ามีก็ kill ออกให้หมด
ระหว่างนี้ไม่ควรจะมี process mysql run ขึ้นมาเอง

เสร็จแล้วสั่ง start mysql จากใน plesk หรือถ้าใน plesk ไม่มี ก็ /etc/init.d/mysql(d) restart
เช็คว่ามี pid ในไฟล์หรือเปล่า
 


เป็นอีกแล้วนะครับ เลย status ดูได้ตามนี้
[root@server root]# mysql
ERROR 1040: Too many connections

[root@server mysql]# mysqladmin processlist
mysqladmin: connect to server at 'localhost' failed
error: 'Too many connections'

[root@server mysqld]# /etc/init.d/mysqld stop
Stopping MySQL:                                            [FAILED]
[root@server mysqld]# /etc/init.d/mysqld stop
Stopping MySQL:                                            [FAILED]


[root@server mysqld]# killall mysqld

[root@server mysqld]# ps auxww |grep mysql
root      7668  0.0  0.1  3688  660 pts/2    S    18:13  0:00 grep mysql

[root@server mysqld]# /etc/init.d/mysqld restart
Stopping MySQL:                                            [FAILED]
Starting MySQL:     


[root@server mysqld]# cat /var/run/mysqld/mysqld.pid

สุดท้ายเหมือนมันสร้าง file ขึ้นมาแต่ไม่ใส่ pid เข้าไปคือ เป็นfile ว่างๆ

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

ทำ mysqld processlist

Uptime: 1151  Threads: 1  Questions: 12155  Slow queries: 0  Opens: 704  Flush tables: 1  Open tables: 64 Queries per second avg: 10.560

และมันมี process เหมือนมัน Lock นะครับ ไม่ยอมหายไปเองจาก processlist เราจะkill มันauto ได้ไหมครับหรือมัน น่ามีปัญหาอะไรทำไมมันไม่ยอมหาย
| 1127 | dbdb| localhost | dbdb| Query          | 3417 | update          | insert into nuke_msanalysis_search ( words, hits, today, hitstoday, xdays, hitsxdays ) values ( '๠|
| 1148 | dbdb| localhost | dbdb| Query          | 3392 | Locked          | update nuke_msanalysis_search set hits=hits+1, today='2008-05-04', hitstoday=hitstoday+1, hitsxdays= |
| 1163 | dbdb| localhost | dbdb| Query          | 3380 | Locked          | update nuke_msanalysis_search set hits=hits+1, today='2008-05-04', hitstoday=hitstoday+1, hitsxdays= |
| 1178 | dbdb| localhost | dbdb| Query          | 3365 | Locked          | update nuke_msanalysis_search set hits=hits+1, today='2008-05-04', hitstoday=hitstoday+1, hitsxdays= |
| 1508 | dbdb| localhost | dbdb| Query          | 2849 | Locked          | insert into nuke_msanalysis_search ( words, hits, today, hitstoday, xdays, hitsxdays ) values ( 'ภ|
| 1522 | dbdb| localhost | dbdb| Query          | 2819 | Locked          | insert into nuke_msanalysis_search ( words, hits, today, hitstoday, xdays, hitsxdays ) values ( '๠|
| 2307 | dbdb| localhost | dbdb| Query          | 1715 | Locked          | update nuke_msanalysis_search set hits=hits+1, today='2008-05-04', hitstoday=hitstoday+1, hitsxdays= |
| 2419 | dbdb| localhost | dbdb| Query          | 1535 | Locked          | update nuke_msanalysis_search set hits=hits+1, today='2008-05-04', hitstoday=hitstoday+1, hitsxdays= |
| 2448 | Loli_phpBB    | localhost | phpBB          | Query          | 1472 | update          | INSERT INTO phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (14924, 'CODE GEA |
| 2538 | Loli_phpBB    | localhost | phpBB          | Query          | 1326 | Locked          | INSERT INTO phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (14925, 'CODE GEA |

(อันนี้แค่ส่วนนึงนะครับ)

พอทราบปัญหาละครับ ตอนแรกนึกว่าเป็นที่ script ลุกค้าแต่เข้าไปเช็คแล้ว
เป็นหลายเว็บเลย โดยเฉพาะเว็บที่เป็น script สำเร็จรูป พวก phpbb smf
มันจะเหลือ process ค้างไว้
เช่น
UPDATE smf_members
                SET
                        lastLogin = 1209916692,
                        memberIP = '58.8.23.64',
                        memberIP2 = '5 |

INSERT INTO smf_messages
                        (ID_BOARD, ID_TOPIC, ID_MEMBER, subject, body, posterName, posterEmai |


เลยคิดว่าเครือ่งน่าจะมีปัญหาที่ไม่ชอบ เคลียร์ process เก่าๆ ทิ้ง ทำให้มันเต็มและก็ค้างให้ที่สุดนะครับ
แบบนี้เราจะแก้อย่างไรดีมีทาง เช็คให้มัน kill auto ไหมครับ 

จาก error มันแจ้งว่า memory pool นั้นมีขนาดใหญ่เกินไป

แต่ว่า my.cnf ของคุณก็ไม่ได้กล่าวถึงเอาไว้เลย

ดังนั้น มันคือการดึงค่า default ออกมาใช้นั่นเอง

ที่มันเกิขึ้นก็เพราะว่า ram ของคุณหมด และมีไม่เพียงพอที่จะจับจองมารองรับการทำงาน

วิธี แก้ก็คือ ให้ตั้งค่าในส่วนของ innodb ใหม่ โดยที่ตั้งเพื่อให้ใช้งาน หรือจอง memory ให้น้อยลง เพราะว่าไม่ตั้งมันจะใช้ค่า default

ซึ่ง ตอนนี้เป็นค่าเท่าไร สามารถตรวจสอบได้จาก show status ครับ หรือจะล็อกอินฐานะ root ใน phpmyadmin เพื่อทำการดูค่าปัจจุบันแล้วไปปรับให้น้อยลงก็ได้ครับ


หรือไม่อยากเครียด ไม่อยากคิดมาก ก็

--skip-innodb

ใน my.cnf มันซะเลย ง่ายดี แต่ผลที่ตามมาคือ  user จะไม่สามารถใช้งานแบบ innodb ได้

สำหรับ เรื่องที่สคริป sql ค้างอยู่นั้น ปรกติผมจะไม่เจอครับ แต่ผมเคยเจอทีนึง ซึ่งคราวนั้นเกิดจากการ restart apache ครับ ทำให้ process SQL ทำงานยังไม่สำเร็จ

โดยปรกติจะเกิดจากการ lock table ครับ แล้วไป restart apache ณ จุดนั้นพอดี ทำให้ SQL ไม่สมบูรณ์และไม่สามารถ ปลดล็อค table ได้ พอมีการทำ DML ใน table นั้นก็ทำให้เกิดการ lock ได้ เพราะว่า table ยังไม่ได้ถูกปลด lock นั่นเอง

สำหรับส่วนนี้ผมยังไม่แน่ใจว่า แก้ด้วยวิธีใดครับ เพราะว่าผมลองไม่ได้ เพราะถ้า lock ทีแล้ว load จะพุ่งขึ้นมาเลยครับ เพราะว่ามันจะเกิดการรอการเข้ามาเปลี่ยนค่า แต่มันทำไม่ได้ครับ

ตอนนี้ลองปรับค่า mysql persistance ให้เป็น 0 ดูนะครับ แล้วตั้งค่า time out ของ mysql เอาไว้ให้ต่ำลง จะทำให้ clear connection ได้เร็วขึ้นครับ

รบกวนเช็ค my.cnf หน่อยได้ไหมครับว่ามันผิดตรงไหน เพราะรู้สึกว่ามันสั้นๆผิดปกตินะครับ
[root@server etc]# cat /etc/my.cnf
[mysqld]
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
   
[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


หรือ เราสามารถ copy my.cnf เครื่องอื่นทีทำงานปกติมาทับได้เลยไหมครับ
ผมลองเทียบกับเครื่องอื่นจะมี คำสั่งมากกว่าเยอะเลย
เช่น
# The MySQL server
[mysqld]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
skip-locking
set-variable    = key_buffer=16M
set-variable    = max_allowed_packet=1M
set-variable    = table_cache=64
set-variable    = sort_buffer=512K
set-variable    = net_buffer_length=8K
set-variable    = myisam_sort_buffer_size=8M

เลยสงสัยว่าอยู่ๆทำไมมันหายไป 

Friday, February 11, 2011

mysqld dead but subsys locked โขว์แบบนี้ ติดตั้งแต่ kloxo อย่างเดียว เกิดจากอะไร

ysqld dead but subsys locked โขว์แบบนี้ ติดตั้งแต่ kloxo อย่างเดียว เกิดจากอะไร ยังไม่ได้ใส่เว็บเลย

ต้องทำอะไรที่ไม่ให้เป็นบ่อยๆครับ
Quote
100811 13:29:40  mysqld started
100811 13:29:40  InnoDB: Started; log sequence number 0 71442
100811 13:29:40 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.91'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
100812 11:59:03 [Note] /usr/libexec/mysqld: Normal shutdown

100812 11:59:03  InnoDB: Starting shutdown...
100812 11:59:04  InnoDB: Shutdown completed; log sequence number 0 71452
100812 11:59:04 [Note] /usr/libexec/mysqld: Shutdown complete

100812 11:59:04  mysqld ended

100812 12:01:12  mysqld started
100812 12:01:13  InnoDB: Started; log sequence number 0 71452
100812 12:01:14 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.91'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
100812 12:31:53 [Note] /usr/libexec/mysqld: Normal shutdown

100812 12:31:55  InnoDB: Starting shutdown...
100812 12:31:56  InnoDB: Shutdown completed; log sequence number 0 71452
100812 12:31:56 [Note] /usr/libexec/mysqld: Shutdown complete

100812 12:31:56  mysqld ended

100812 12:36:11  mysqld started
100812 12:36:11  InnoDB: Started; log sequence number 0 71452
100812 12:36:11 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.91'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
100812 12:54:14 [Note] /usr/libexec/mysqld: Normal shutdown

100812 12:54:14  InnoDB: Starting shutdown...
100812 12:54:16  InnoDB: Shutdown completed; log sequence number 0 71452
100812 12:54:16 [Note] /usr/libexec/mysqld: Shutdown complete

100812 12:54:16  mysqld ended

100812 12:56:28  mysqld started
100812 12:56:28  InnoDB: Started; log sequence number 0 71452
100812 12:56:29 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.91'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
100812 13:17:07 [Note] /usr/libexec/mysqld: Normal shutdown

100812 13:17:09  InnoDB: Starting shutdown...
100812 13:17:11  InnoDB: Shutdown completed; log sequence number 0 71452
100812 13:17:11 [Note] /usr/libexec/mysqld: Shutdown complete

100812 13:17:11  mysqld ended
 
========================================
รู้แต่ว่าถ้าเป็นบ่อยๆ เข้าระวังไม่หาย มีวิธีแก้มาให้ครับ

#chown -R mysql.mysql /var/run/mysqld
Remove lock File '/var/lock/subsys/mysqld'
#killall -9 mysqld
#service mysql restart

File/Dir Permissions MySQL daemon ทำงานด้วยสิทธิของยูสเซอร์ mysql และกรุ๊ป mysql ครับ ดังนั้น ถ้าไฟล์ฐานข้อมูลคุณกำหนดสิทธิเป็น root:root ล่ะก็ MySQL daemon ก็จะซึ่งทำงานเป็น mysql:mysql ก็จะไม่สามารถเข้าถึงไฟล์ได้ครับ

ลองเช็คตามนี้ดูครับ
[root@databaseserver~]$ /etc/rc.d/init.d/mysqld status
mysqld dead but subsys locked

chkconfig:
[root@databaseserver~]$ /sbin/chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off

File/Dir Permissions:
- /var/lib/mysql owned by mysql:mysql
- /var/run/mysqld/mysqld.pid owned by mysql:mysql

PID:
[root@databaseserver~]$ ls -lh /var/run/mysqld/mysqld.pid
-rw-rw---- 1 mysql mysql 5 Mar 24 05:48 /var/run/mysqld/mysqld.pid

Running Processes:
[root@databaseserver~]$ ps -ef | grep mysql
root 3126 1 0 Mar24 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-file=/var/run/mysqld/mysqld.pid --log-error=/var/log/mysqld.log
mysql 3162 3126 0 Mar24 ? 00:34:07 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock 
 ============================================
 
 ไม่เกี่ยวกับ selinux=disabled ใช่มั้ยครับ ผมปิดไว้อยู่ 
แบ่ง partition ไว้ยังไงครับ ลอง df -h มาดูหน่อยครับ 

ผมใช้ centos 5.4 5.5 ก็เป็น

[root@27AO30 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      448G  1.9G  423G  1% /
/dev/sda1              99M  12M  82M  13% /boot
tmpfs                2.0G    0  2.0G  0% /dev/shm
 
จากปัญหานี้ mysqld dead but subsys locked

folder ใน /var/lib/mysql
owner เป็น mysql  cmod เป็น 755 แล้วครับ

แต่บางครั้งก็ยังเป็นอีกครับ ทำไงดี 

ดูจาก mysqld.log ที่ข้อความแรกแล้วไม่ได้บอก error อะไร
ดูจากพื้นที่ก็เหลือเพียบ
ลองดู Ram ครับว่าเหลือเท่าไหร่ (ดูจาก shm แล้่วน่าจะมี 4G ไม่น่าหมดง่ายๆ)
เป็นบ่อยขนาดทุก 30 นาที ลอง top ทิ้งไว้แล้วดู ram กับ process ที่ทำงานหนักๆ ครับ

แล้วเครื่องนี้ลง apache ด้วยหรือเปล่าครับ หรือว่าลง mysql ล้วนๆ


Thursday, February 10, 2011

Alert: Could Not Connect to Database: The error has been logged. Please contact the administrator....

I ssh to server with root roles and change mysql root password.

When I login to localhost:7777 with user admin and create new database, I get error below:

Quote:
Alert: Could Not Connect to Database: The error has been logged. Please contact the administrator....


Old database still work. How to fix it?


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

Home (admin)/Servers/Server Home (localhost)/Database/Admins

and change the password to the one u provided over ssh

i'm not much a linux guy but have learned that ssh with root can make me a lot of problems (probably cause i'm not a linux guy


---------------------------------------------------------------------------
try


Home (admin)/Servers/Server Home (localhost)/Database/Admins

and change the password to the one u provided over ssh

i'm not much a linux guy but have learned that ssh with root can make me a lot of problems (probably cause i'm not a linux guy  )


Thanks but I get error below:
=> Alert: could_not_connect_to_db_admin 


------------------------------------------------------------------------
Home (admin)/Servers/Server Home (localhost)/Mysql Password Reset

maybe that will help.


Did you by chance modify permissions or the password to the kloxo user?

then try
Home (admin)/Servers/Server Home (localhost)/Mysql Password Reset

maybe that will help.


It's work. Thanks for help.


   

Saturday, February 5, 2011

Kloxo อัพไฟล์แล้ว Alert: file_exists_not_owned แก้ยังไง

 อัพไฟล์ zip ผ่านทาง File Manager ของ Kloxo แต่

Alert: file_exists_not_owned [/home/admin/mydomain.net/test//xxxxxxxt.zip]

แก้ยังไงครับ


 ================================================
Alert: file_exists_not_owned [__path_customer_root/admin//love4m.com/forum/smilies.php]


Looks like ownership problems @unix.

Get into the SSH --> to that directory

cd love4m.com/forum

then

chown user:apache * -R

user:apache = unix_username : unix_groupname

-R means that it will reset ownership permissions. The user = the name of that unix account.

If you have a different configuration of permissions and ownerships, then you need to identify the ownership of other files in that directory and change user = that_name and groupname.

Once in my case, the username did not exists for a directory and files because I had deleted the unix user. So only the UID:GID appeared.

So you may get an error if the file does not have proper ownership that the logged in account or that unix user does not exists. Check it out...

Monday, January 24, 2011

Migrating wpmu blog to new host

I have job to transfer wordpress multi user to new host. The wpmu system currently host 400+ with subdomain type.
The old host and new host use same operating system FreeBSD dedicated server but with different version.
The procedure for move wpmu to new host not different than moving ordinary wordpress blog.

Preparing and packing

1. Dumping mysql database
#  mysqldump -udtonet2 -pdotnet22008 dotnet2 > dotnet.sql
2. Packing all files to one tarball
# tar cvzf wordpress-mu.tar.gz  wordpress-mu
3. Transfer the file to new host
# scp wordpress-mu.tar.gz erau@172.88.1.8:/home/erau
Password:
wordpress-mu.tar.gz                    100%   402MB  13.9MB/s   00:03
#
4. Change dns setting
add wildcard to tinydns data file.
.batikweb.com:127.0.0.1:a:259200
.1.88.172.in-addr.arpa:127.0.0.1:a:259200
+batikweb.com:172.88.1.8:8640
+www.batikweb.com:172.88.1.8:8640
+*.batikweb.com:172.88.1.8:86400
@batikweb.com:172.88.1.11:mail.batikweb.com:10:86400
make file
# make
restart dns
# svc -t /var/service/tinydns/
# svc -t /var/service/dnscache/
check dns resolv
# dig batikweb.com
; <<>> DiG 9.3.4-P1 <<>> batikweb.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15165
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;batikweb.com.                        IN      A
;; ANSWER SECTION:
batikweb.com.         8640    IN      A       172.88.1.8
;; Query time: 0 msec
;; SERVER: 172.88.1.10#53(172.88.1.10)
;; WHEN: Tue May 11 09:59:31 2010
;; MSG SIZE  rcvd: 48
#

Unpack and restoring

This steps taken in new host.
Login to server 1.8
4. Move the file
# mv /home/erau/wordpress-mu.tar.gz  /home/dotcom
# cd /home/dotcom
# tar xvzf wordpress-mu.tar.gz
Change vhost
# ee /usr/local/etc/apache22/extra/httpd-vhosts.conf
add these lines :
<VirtualHost 172.88.1.8 >
ServerAdmin alam@hostingformula.net
DocumentRoot /home/dotcom/wordpress-mu
<Directory /home/dotcom/wordpress-mu >
AllowOverride FileInfo Options
</Directory>
ServerName batikweb.com
ServerAlias *.batikweb.com
</VirtualHost>
5. Create database
# mysql -ualam -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 590411
Server version: 5.0.77-log FreeBSD port: mysql-server-5.0.77_1
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input
statement.
mysql> create database wpmu;
Query OK, 1 row affected (0.01 sec)
mysql>
Grant all privileges
mysql> grant all privileges on wpmu.* to dtonet2@localhost identified by ‘dotnet22008′ with grant option;
Query OK, 0 rows affected (0.02 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>
Import database
mysql> exit
Bye
#
6. Import database
# mysql -udtonet2 -pdotnet22008 wpmu < dotnet.sql
Change wp-edit.php to new host information.
#ee  wp-config.php
Which iPad To Buy
Waterproof Case for Ipad
Keyboard for Ipad
7. Restart Apache
# /usr/local/etc/rc.d/apache22 restart
Performing sanity check on apache22 configuration:
Syntax OK
Stopping apache22.
Waiting for PIDS: 793.
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
#
Check everything from browser and no problem so far.
Finish, mission accomplished.
wpmu cannot connect to database, wpmu coupon, wpmu transfer error, mu online experience formula, move wordpress mu to new, wpmu coupon code, tinydns answer section dnscache, change wp mu to another server, porting wordpress da hosting a hosting, transferring a wordpress mu site to a server, wordpress mu connect host, wordpress mu sql query, wordpress multi site change hosts, wpmu multi db grant, wpmu mysql assign user to blog, moving site from wp mu to wp on a new server, moving multiuser wordpress site cannot connect to database, dotnet mysql current connection id, how to migrate wordpress mu to another server, How to move wpmu to new host, how to transfer databases for wpmu to new host, how to transfer wordpress mu, idrive wordpress MU, migrating domain wordpress wpmu, migrating wordpress mu sql, move blogs between wordpress mu databases, move host wp mu, Move WPMU blog to new WPMU blog, moving a wordpress mu blog to new server, moving from wordpress mu, www batikweb com(Visited 165 times, 3 visits today)

Kloxo 500 – Internal Server Error

Kloxo control panel aka lxadmin in the past help me a lot in managing vps operational. I don’t have to touch configuration file for adding new domain, setting virtual host, grant database username and privileges etc. The other best part of this cpanel alternative are :
  1. It’s free ( I can asking for help or install it by myself)
  2. Low resources (specially memory where most  low end vps plan has limited)
Problem came when I must add new domain for my friend blog. I see this message after I enter username and password :

500 – Internal Server Error

I think it just small problem with service and  library conflict.
Restart Kloxo 1 st attempt :
Which iPad To Buy
Waterproof Case for Ipad
Keyboard for Ipad
# service kloxo restart
Stopping kloxo: Waiting for the process to die…..
Stopped kloxo
Starting kloxo: 11
mysqld (pid 30515) is running…
Started kloxo
Try again to login and I still get 500 – Internal Server Error message.
Restart Kloxo 2nd attempt :
# /script/restart
Stopping kloxo: ../bin/common/function.sh: line 28: 16364 Terminated              $__path_php_path $__path_server_path $string > /dev/null 2>&1
Waiting for the process to die…..
Stopped kloxo
Starting kloxo: 11
mysqld (pid 30515) is running…
Started kloxo
I still get 500 – Internal Server Error message after entering username and password.
Searching around (I forgot source url) I try to downgrade ssl.
# yum downgrade openssl
Loaded plugins: fastestmirror
Setting up Downgrade Process
Loading mirror speeds from cached hostfile
* addons: mirror.5ninesolutions.com
* base: centos-distro.cavecreek.net
* extras: mirrors.versaweb.com
* updates: centos-distro.cavecreek.net
addons                                                                                                                                        |  951 B     00:00
base                                                                                                                                              | 2.1 kB     00:00
extras                                                                                                                                          | 2.1 kB     00:00
lxlabslxupdate                                                                                                                            951 B     00:00
lxlabsupdate                                                                                                                            |  951 B     00:00
updates                                                                                                                                      | 1.9 kB     00:00
Resolving Dependencies
–> Running transaction check
—> Package openssl.i686 0:0.9.8e-12.el5_4.1 set to be updated
—> Package openssl.i686 0:0.9.8e-12.el5_4.6 set to be erased
–> Processing Dependency: openssl >= 0.9.8e-12.el5_4.4 for package: mod_ssl
–> Running transaction check
—> Package mod_ssl.i386 1:2.2.3-31.el5.centos.4 set to be erased
–> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package                             Arch                             Version                                              Repository                             Size
=============================================================================
Installing:
openssl                             i686                             0.9.8e-12.el5_4.1                                    updates                               1.4 M
Removing:
openssl                             i686                             0.9.8e-12.el5_4.6                                    installed                             3.3 M
Removing for dependencies:
mod_ssl                             i386                          1:2.2.3-31.el5.centos.4                           installed                             173 k
Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       2 Package(s)
Total download size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
openssl-0.9.8e-12.el5_4.1.i686.rpm                                                                                                              | 1.4 MB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : openssl                                                                                                                                         1/3
Erasing        : mod_ssl                                                                                                                                         2/3
warning: /etc/httpd/conf.d/ssl.conf saved as /etc/httpd/conf.d/ssl.conf.rpmsave
Cleanup        : openssl                                                                                                                                         3/3
Removed:
openssl.i686 0:0.9.8e-12.el5_4.6
Dependency Removed:
mod_ssl.i386 1:2.2.3-31.el5.centos.4
Installed:
openssl.i686 0:0.9.8e-12.el5_4.1
Complete!
#
Restart Kloxo 3rd attempt :
Using command in 1st or 2nd attempt bring me this display
kloxo is up Kloxo and 500   Internal Server Error
Case closed
kloxo 500 - Internal Server Error, kloxo Internal Server Error, kloxo Could not connect to Mysql server, kloxo, 500 - Internal Server Error kloxo, kloxo 500 internal server error, uninstall kloxo, remove kloxo, Internal Server Error KLOXO, kloxo 500 error, kloxo error 500, install kloxo in centos error mysql, restart kloxo, kloxo addons, 500 internal server error kloxo, 500 Internal Server Error how to, error kloxo after shutdown, Stopping kloxo: /bin/common/function sh: line 28, wordpress internal server error Kloxo, kloxo /bin/common/function sh, openssl-0 9 8e-12 el5_4 1 i686 rpm, Starting kloxo: 11 Could not connect to Mysql server, reinstall mysql kloxo, starting kloxo, Kloxo mysql error, Stopping kloxo: /bin/common/function sh, centos 500 kloxo - Internal Server Error, vps 500 - Internal Server Error, kloxo restart, kloxo not restart, kloxo not working 500 internal server error, kloxo function sh, stopping kloxo, kloxo email problem, internal server error 500, kloxo internal server erro, error log file kloxo, kloxo webmail internal server error, download openssl-0 9 8e-12 el5_4 1 i686 rpm, Stopping kloxo: /bin/common/function sh: line 28:, server i kloxo, $__path_php_path $__path_server_path $string > /dev/null 2>&1, starting KLOXO in shell, cai kloxo 500 - Internal Server Error, Stopping kloxo: /bin/common/function sh: lineTerminated, kloxo reboot Internal Server Error, kloxo reboot Could not connect to Mysql server, kloxo pserver-localhost default, upgrade mysql in kloxo, kloxo remove script(Visited 1,509 times, 20 visits today)

Add new slave for kloxo control panel

My friend came and bring more problem too. He want to use vps hosting as alternative for his shared account that getting soft suspend for using many cpu resources. His work as internet marketing make uptime and downtime is very crusial.
He want to experiment with kloxo but willing to see more and since he want to give me access to new vps server  (via donate) I agree to set new CentOS vps server for him.
Here’s step by step guide install kloxo slave server :

Get new VPS server

So many vps provider outside and I choose one from vps.net
New account set up quickly and I have root access for CentOS 32 bit.

Update Yum

I love to use package management as front end tool for managing package.
#yum update

Install Editor

I prefer nano
#yum install nano

Disable secure linux (selinux)

# echo ‘selinux=disabled’ >> /etc/sysconfig/selinux
or with this at command line.
# setenforce 0
setenforce: SELinux is disabled

Install kloxo

#cd /home
#mkdir kloxo
#cd kloxo
#wget http://download.lxlabs.com/download/kloxo/production/kloxo-install-slave.sh
#sh ./kloxo-install-slave.sh
The process will continue as many package will be installed automatically by kloxo like php, mysql, pure-ftpd, awstat etc.
This message will be shown when all process working successfully :
Congratulations. Kloxo has been installed succesfully on your server as slave
You should open the port 7779 on this server, since this is used for the communication between master and slave.
To access this slave, to go admin->servers->add server, give the ip/machine name of this server. The password is ‘admin’. The slave will appear in the listof slaves, and you can access it just like you access localhost

Restart Server

#reboot
Wait and try to ping ip address of vps to make sure reboot process already passed.
Checking current process
# ps ax
PID TTY      STAT   TIME COMMAND
1 ?        Ss     0:00 init [3]
5160 ?        Ss     0:00 /usr/sbin/sshd
5226 ?        Ss     0:00 /usr/bin/freshclam -d -p /var/run/clamav/freshclam.pid
5235 ?        S      0:00 sh ../sbin/kloxo-wrapper.sh
5356 ?        S      0:00 /usr/local/lxlabs/ext/lxlighttpd/sbin/kloxo.httpd -f /usr/local/lxlabs/kloxo/file/lighttpd.conf
5703 ?        Ss     0:00 crond
5714 ?        Ss     0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2
5718 ?        S      0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2
5741 ?        S      0:00 /usr/local/lxlabs/ext/php/php ../sbin/kloxo.php slave
6015 ?        Ss     0:00 sshd: root@pts/0
7290 ?        Ss     0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
7333 pts/0    Ss     0:00 -bash
7342 ?        Ss     0:00 syslogd -m 0
7387 ?        S      0:00 qmail-send
7389 ?        S      0:00 splogger qmail
7390 ?        S      0:00 qmail-lspawn |preline procmail
7392 ?        S      0:00 qmail-rspawn
7393 ?        S      0:00 qmail-clean
7793 pts/0    R+     0:00 ps ax
Access the web
http://vps-ip-address:7778/
you’ll see this message  :
Slave Server

Add slave server to kloxo master

Login to kloxo master and click Servers.
kloxo slave 1 Add new slave for kloxo control panel
Click Add Server.
Enter IP or hostname and click Add button.
kloxo slave 2 Add new slave for kloxo control panel
The server will be listed in servers under admin.
kloxo slave 3 Add new slave for kloxo control panel
Till this step kloxo slave successfully install at new vps server and also successfully integrated to kloxo master.
Enjoy the server and stay health!
kloxo slave, kloxo control panel, kloxo phpmyadmin, kloxo themes, Kloxo theme, kloxo slave install, install kloxo slave, kloxo panel, kloxo hosting, how to install kloxo slave, how to secure kloxo, kloxo procmail, install ioncube kloxo, how to install drupal on dtc on centos, kloxo master, download kloxo, kloxo mail, install kloxo as a slave, kloxo mail settings, kloxo panel review, klox hosting panel, why does kloxo download package like joomla etc, install kloxo slave howto, install kloxo as slave, new hosting panel, how to use kloxo control panel, how to instal ioncube kloxo, kloxo slave server, kloxo panel user guide, kloxo php mail, Server Mail Settings kloxo, kloxo control panel screenshots, adding a dns hostname in kloxo, access apanel outside uniform server, backup settings kloxo, centos kloxo panel, vpx access kloxo panel, change kloxo master to slave, kloxo control panel port, add slave server kloxo, kloxo how to open ports, kloxo hostname, kloxo dtc, kloxo download, kloxo DB Error: extension not found, kloxo php info, kloxo cygwin, kloxo control panel tutorial, kloxo mysql update, Kloxo panel hosting(Visited 1,272 times, 13 visits today)

 
Design by Laikeng | Bloggerized by Storesu - sutoday | Court