UEC: Troubleshooting

From OnnoWiki
Jump to navigation Jump to search

File Log Eucalyptus

File log berikut akan sangat menolong pada saat melakukan debugging berbagai masalah pada pada Eucalyptus yang berjalan:

Eucalyptus Component Log file(s)
CC cc.log, httpd-cc_error_log, cc-registration.log
NC nc.log, httpd-nc_error_log, euca_test_nc.log
CLC cloud-debug.log, cloud-error.log, cloud-output.log, axis2c.log
SC sc-stats.log, sc-registration.log
WS3 walrus-stats.log, walrus-registration.log

Level logging di atur oleh macro LOGLEVEL di eucalyptus.conf untuk masing-masing komponen. Level log yang ada adalah DEBUG, INFO, WARN, ERROR, dan FATAL. Default level adalah DEBUG (untuk semua komponen).

‘tail -f ‘ pada file log adalah cara yang baik untuk mengetahui apa yang terjadi pada komponen Eucalyptus.

Perintah Linux

Perintah Linux seperti ps, top dll. jalan di CC dan NC sangat membantu dalam mengetahui tahapan proses pada Eucalyptus.

Libvirt tools

NC launches the instances by making libvirt calls to launch a VM. You can use libvirt tools like virsh for troubleshooting any hypervisor related issues.

Launching an instance with VNC attached(HACK):

If the output of euca-describe-instances shows the status of an instance as ‘running’, but if you are not able to SSH into it or RDP into it, it is is tough to find out where the failure is. In such cases, a VNC interface to the instance is generally of great help to troubleshoot further. But Eucalyptus does not provide a way of connecting to the instance through VNC. The following hack can help in setting up a VNC interface to the instance. Windows Instances

On the NC, edit /usr/share/eucalyptus/gen_kvm_libvirt_xml (if KVM is the hypervisor) to change

<devices>
 <disk type='file'>
 <source file='BASEPATH/disk'/>
 <target dev='sda'/>
 </disk>
 <interface type='bridge'>
 <source bridge='BRIDGEDEV'/>
 <mac address='PRIVMACADDR'/>
 <model type='e1000'/>
 </interface>
 <serial type="file">
 <source path='BASEPATH/console.log'/>
 <target port='1'/>
 </serial>
 </devices>

to

<devices>
 <disk type='file'>
 <source file='BASEPATH/disk'/>
 <target dev='sda'/>
 </disk>
 <interface type='bridge'>
 <source bridge='BRIDGEDEV'/>
 <mac address='PRIVMACADDR'/>
 <model type='e1000'/>
 </interface>
 <serial type="file">
 <source path='BASEPATH/console.log'/>
 <target port='1'/>
 </serial>
 <graphics type='vnc' listen='A.B.C.D' port='5904'/>
 </devices>

where A.B.C.D is the IP address of the interface on NC that is reachable from the client machine where you want to run the vnc client. We assume that your NC has 2 interfaces and you are able to use the second interface to reach it without going through CC. Again, this is only for troubleshooting. In a production setup, you may have the NC connected to the outside world only through CC.

With these changes, KVM adds the “-vnc” option to the command with the specified NC’s ip address on display number 4.

To connect to the instance through VNC client from a different machine, use the NC’s ip address and display number 4. Ex: A.B.C.D :4

In the case of Xen, you would modify the relevant sections of /usr/share/eucalyptus/gen_libvirt_xml. We have not tested with Xen, though.

Instance Linux

Kita dapat menggunakan cara yang sama untuk Instance Linux, dengan catatan kita tidak dapat melihat keluaran apapun euca-get-console-output jika output console tidak di tulis ke /var/lib/eucalyptus/instances/<user>/i-xxxxxxxx/console.log. Output tentu saja dapat di display menggunakan VNC.

CATATAN: Cara ini hanya jalan jika kita melakukan debugging satu instance dalam satu waktu. Jika kita berusaha untuk menjalankan instance yang lain pada saat sebuah instance sedang berjalan, KVM akan berusaha untuk menempelkan VNC display 4 yang sama ke instance yang ke dua dan akan gagal dengan error yang tertulis di /var/log/libvirtd/qemu/i-XXXXXXXX.log

inet_listen_opts: bind(ipv4,A.B.C.D,5904): Address already in use
inet_listen_opts:FAILED

Referensi

Pranala Menarik