Activation of database cannot be made because of BACKUP PENDING

Posted on

Pernah menemukan error seperti ini saat hendak mengaktifkan database db2?

SQL1116N  A connection to or activation of database "TEST" cannot be made
because of BACKUP PENDING.  SQLSTATE=57019

Saya pernah, dan ini solusinya:

userdb@server01:/> db2dart TEST /CHST /WHAT DBBP OFF

Updated the log file header control file.
The requested DB2DART processing has completed successfully!
Complete DB2DART report found in:
/db2/TEST/db2dump/DART0000/TEST.RPT

Langkah-langkah instalasi osTicket di Debian Wheezy

Posted on

osTicket is the world’s most popular and trusted open source customer support ticketing system. osTicket is designed to help you improve customer service by providing your staff with a customer support platform they need to deliver fast, effective and measurable support.

osTicket is a FREE, open source software released under GPL license. Our core features and usability not only rival, but also exceed those of most bloated commercial helpdesk solutions.

osTicket is powerful, yet simple to use. This ensures that your staff can quickly begin using the system without any headaches or hassles, and with very little or no training.

Itu adalah kutipan dari website resminya tentang apa itu osTicket dan apa gunanya osTicket, dan berikut ini adalah langkah-langkah instalasinya:

# apt-get install mysql-server mysql-client
# mysql_secure_installation
# apt-get install apache2 php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-idn php-pear 
  php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode 
  php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
# mysql -u root -p
Enter password:

mysql> CREATE USER 'osticket'@'localhost' IDENTIFIED BY 'p@ssw0rd';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT USAGE ON * . * TO 'osticket'@'localhost' IDENTIFIED BY 'p@ssw0rd' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE DATABASE IF NOT EXISTS `osticket` ;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON `osticket` . * TO 'osticket'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
# cd /var/www/ 
# wget http://osticket.com/dl/osTicket-v1.7.1.zip
# unzip osTicket-v1.7.1.zip
# ln -s upload osticket
# chown -R www-data:www-data upload
# cp include/ost-sampleconfig.php include/ost-config.php
# chmod 0666 include/ost-config.php

Akses ke http://ip_server/osticket
Ikuti langkah-langkah instalasinya hingga selesai, jika ada error maka akan tampil di halaman instalasi tersebut.

Untuk keamanan, setelah instalasinya selesai, lakukan hal dibawah ini:

# chmod 0664 /var/www/osticket/include/ost-config.php
# rm -rf /osticket/setup

osticket

Sekian dan semoga bermanfaat.

Apache OCF resource agent tidak mau start ketika modul SSL diaktifkan

Posted on Updated on

Lagi-lagi masih seputar pacemaker dan apache2, setelah kemarin ketemu masalah, sekarang ketemu lagi masalah Apache OCF resource agent tidak mau start saat server direstart, akhirnya ketemu… ternyata dikarenakan folder /var/run/apache2 nya hilang/dihapus ketika server direstart, sedangkan /var/run/apache2 digunakan oleh apache jika SSL module diaktifkan.

Error log di apache :

[error] (2) No such file or directory: Cannot create SSLMutex with file `/var/run/apache2/ssl_mutex'

Ternyata ini adalah bug resource-agents

Solusinya adalah di-patch atau tambahkan di script OCF apachenya agar membuat folder /var/run/apache2 sebelum apachenya start.

# vi /usr/lib/ocf/resource.d/heartbeat/apache
...
start_apache() {
  if
    silent_status
  then
    ocf_log info "$CMD already running (pid $ApachePID)"
    return $OCF_SUCCESS
  fi

  [ -d /var/run/apache2 ] || mkdir /var/run/apache2 # <--- tambahkan baris berikut

  ocf_run $HTTPD $HTTPDOPTS $OPTIONS -f $CONFIGFILE
  tries=0
  while :  # wait until the user set timeout
  do
    monitor_apache
        ec=$?
        if [ $ec -eq $OCF_NOT_RUNNING ]
        then
                tries=`expr $tries + 1`
                ocf_log info "waiting for apache $CONFIGFILE to come up"
                sleep 1
        else
                break
        fi
  done
        if [ $ec -ne 0 ] && silent_status; then
                stop_apache
        fi
        return $ec
}
...

Semoga bermanfaat…

Pacemaker Alert via email

Posted on

Lagi-lagi tentang pacemaker, Anda ingin menerima alert via email jika terjadi sesuatu dengan Cluster Anda? Anda cukup menjalankan langkah berikut di semua node cluster Anda.

# crm_mon --daemonize --mail-to user@example.com &

Pasang di /etc/rc.local agar ketika server direstart, perintah diatas akan dijalankan secara otomatis.

Hasilnya Anda akan menerima email alert seperti berikut:

Status OK

Cluster notification
====

Completed operation start for resource r0:0 on node1

Details:
operation status: (0) complete
script returned: (0) ok
expected return value: (0) ok

Salah satu resource failed

Cluster notification
====

Operation start for resource WebSite on node1 failed: Timed Out

Details:
operation status: (2) Timed Out

Apache tidak bisa start di node cluster Pacemaker

Posted on

Jika Anda pengguna cluster pacemaker, dan menemukan error seperti dibawah ini saat resource apache2 tidak mau start dan isi dari error log tidak menunjukkan clue yang berarti :

Failed actions:
    WebSite_start_0 (node=node1, call=24, rc=-2, status=Timed Out): unknown exec error

Anda bisa mencoba langkah berikut, langkah ini sudah saya coba dan menyelesaikan masalah saya.

# crm status
============
Last updated: Fri Sep 13 11:38:17 2013
Last change: Fri Sep 13 11:38:02 2013 via crm_attribute on node1
Stack: openais
Current DC: node2 - partition with quorum
Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff
2 Nodes configured, 2 expected votes
7 Resources configured.
============

Online: [ node2 node1 ]

 Resource Group: WebServer
     ClusterIP  (ocf::heartbeat:IPaddr2):       Started node1
     WebFS      (ocf::heartbeat:Filesystem):    Started node1
     Links      (heartbeat:drbdlinks):  Started node1
     DBase      (ocf::heartbeat:mysql): Started node1
     WebSite    (ocf::heartbeat:apache):        Stopped
 Master/Slave Set: ms_r0 [r0]
     Masters: [ node1 ]
     Slaves: [ node2 ]

Failed actions:
    WebSite_start_0 (node=node1, call=24, rc=-2, status=Timed Out): unknown exec error

Tambahkan baris berikut di apache2.conf (saya menggunakan Debian 7.1)

ExtendedStatus On

<Location /server-status>
     SetHandler server-status
     Order deny,allow
     Deny from all
     Allow from 127.0.0.1
</Location>

Kemudian restart resource apachenya.

# crm resource restart WebSite