Menjalankan streamlit sebagai service pada Windows

Untuk membuat streamlit dapat berjalan sebagai service pada windows, kita dapat menggunakan nssm (non sucking service manager) yang dapat diunduh pada link berikut: nssm.

Adapun langkah-langkahnya adalah sebagai berikut:

1.Buka command prompt dan arahkan ke lokasi nssm

2. Buat service baru dengan perintah: nssm install namaservice

3. Masukkan isian pembuatan service

Path: lokasi streamlit.exe berada

Startup directory: lokasi di mana file streamlit yang akan dijalankan berada

Arguments: perintah yang digunakan, yaitu run namafile.py –server.port nomor_port –server.headless true

4. Jika perlu, tambahkan file log untuk menampung log error yang terjadi jika service error, dengan mengisi lokasi file log error pada tab I/O

5. Klik Install service (jika pembuatan service baru) atau Edit service (jika melakukan perubahan pada service)

6. Buka list service pada windows dengan command: services.msc

7. Jalankan service yang sudah dibuat

Install Nodejs pada Ubuntu Menggunakan Node Version Manager (NVM)

Artikel ini mengacu pada referensi berikut:

https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04

Prasyarat:

Install curl menggunakan apt: sudo apt install curl

Berikut adalah langkah-langkah untuk menginstall nodejs menggunakan node version manager (nvm). Ini saya lakukan pada Ubuntu 22.04.

1. Cek isi script menggunakan command berikut:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh

2. Download dan jalankan script menggunakan command berikut:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

3. Kemudian jalankan script berikut:

source ~/.bashrc

4. Cek versi node yang tersedia dengan command berikut:

nvm list-remote

5. Install versi nodejs yang diinginkan dengan script berikut:

nvm install v16.18.0

6. Cek versi nodejs yang terinstall dengan script berikut:

node -v

7. Cek nodejs yang telah terinstall dengan script berikut:

nvm-list

[ApacheSuperset] Mengatasi Unexpected Error Datetime column not provided as part table configuration and is required by this type of chart

Berikut adalah tampilan errornya

Error tersebut menyebabkan kolom dataset yang berupa tanggal tidak terbaca pada bagian Time Column.

Error tersebut terjadi setelah saya memperbarui dataset yang sudah digunakan pada chart di Apache Superset. Sebelum dataset tersebut diubah chart dapat ditampilkan dan kolom tanggal dapat terbaca. Namun, ketika dataset diubah, muncul error tersebut, meskipun tipe kolom tanggal adalah datetime. Untuk mengatasi error tersebut, dilakukan dengan mengedit dataset dan memberikan centang pada is temporal pada kolom tanggal.

Referensi:

https://stackoverflow.com/questions/43605480/how-to-allow-superset-to-recognize-that-a-string-is-a-datetime

Mengatasi ERROR [BootFeaturesInstaller] Error Boot feature pentaho-client-minimal not found

ERROR [BootFeaturesInstaller] Error Boot feature pentaho-client-minimal not found yang saya alami terjadi pada Pentaho versi 7.1. Adapun error lengkapnya adalah sebagai berikut:

22:25:37,902 ERROR [BootFeaturesInstaller] Error Boot feature pentaho-client-minimal not found
22:25:37,902 ERROR [BootFeaturesInstaller] Error Boot feature config not found
22:25:40,239 ERROR [KarafCapabilityProvider] No feature found matching id: pentaho-client
22:25:40,255 ERROR [KarafCapabilityProvider] No feature found matching id: pentaho-metaverse
22:25:40,255 ERROR [KarafCapabilityProvider] No feature found matching id: pdi-dataservice
22:25:40,255 ERROR [KarafCapabilityProvider] No feature found matching id: pdi-data-refinery
22:25:40,255 ERROR [KarafCapabilityProvider] No feature found matching id: pdi-marketplace
22:25:40,255 ERROR [KarafCapabilityProvider] No feature found matching id: community-edition

Jika transformation dijalankan melalui pentaho spoon tetap berjalan dan transformation dapat dieksekusi sampai selesai. Namun, transformation yang dijalankan melalui task scheduler (OS windows) berlangsung lama (saya kurang tahu apakah berhasil atw tidak).

Solusi atas error ini adalah menghapus isi folder pentaho../system/karaf/cache, kemudian jalankan transformation kembali. Error sebagaimana tersebut di atas tidak muncul lagi.

source: dari sini

Install Docker pada Linux Ubuntu dengan Debian Package

Untuk menginstall Docker pada Linux Ubuntu (versi yang digunakan adalah 18.0.4) dengan Debian Package sebagai berikut:

  • Akses halaman berikut: https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/
  • Unduh containerd.io (containerd.io_1.2.6-3_amd64.deb )
  • Unduh docker-ce-cli (docker-ce-cli_19.03.8~3-0~ubuntu-bionic_amd64.deb)
  • Unduh docker-ce (docker-ce_19.03.8~3-0~ubuntu-bionic_amd64.deb)
  • Install ketiga file tersebut secara berurutan dengan command sudo dpkg -i nama_file
  • Cek hasil instalasi dengan menjalankan command: sudo docker run hello-world
  • Jika berhasil, hasilnya adalah seperti ini
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete 
Digest: sha256:f9dfddf63636d84ef479d645ab5885156ae030f611a56f3a7ac7f2fdd86d7e4e
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

Ubah DNS pada Ubuntu 14.0.4 melalui terminal

Untuk mengubah DNS pada Ubuntu versi 14.0.4 dapat merujuk pada tautan berikut:

  1. https://askubuntu.com/questions/346838/how-do-i-configure-my-dns-settings-in-ubuntu-server
  2. http://www.newbienote.com/2013/10/menambahkan-konfigurasi-server-dns-di.html

Pengaturan DNS dapat dilakukan pada /etc/network/interface. Edit file tersebut dengan editor yang ada vi/nano atau sebagainya:

  • cat /etc/network/interface –>melihat terlebih dahulu isi file interface
  • sudo vi /etc/network/interface –>untuk mengedit isi file
  • Pada bagian dns-nameservers ubah/tambahkan DNS (jika lebih dari satu DNS dipisahkan dengan tanda spasi)
  • Simpan file
  • Restart service network. Untuk perubahan lewat remote akses, lebih aman menggunakan perintah: sudo service networking restart. Jangan menggunakan perintah: sudo ifdown eth0 && sudo ifup eth0, karena dapat mengakibatkan koneksi dengan pc/mesin terputus.

MySQL Error Incorrect string value: ‘\xE2\x80\x8B\xE2\x80\x8B…’

Mengatasi Error Koneksi MySQL 8.x : Authentication method ‘caching_sha2_password’ not supported by any of the available plugins

Untuk mengatasi Error Koneksi MySQL 8.x : Authentication method ‘caching_sha2_password’ not supported by any of the available plugins dapat mengikuti tautan berikut:

https://stackoverflow.com/questions/49931541/mysql-changing-authentication-type-from-standard-to-caching-sha2-password

Langkah-langkahnya adalah sebagai berikut:

  • Jalankan installer MySQL
  • Pilih MySQL versi 8.x dan klik Reconfigure
  • Pada tab Authentication Method, pilih “Use Legacy Authentication Method”.
  • Lanjutkan sampai selesai.

Catatan:

Jika user lama sudah terlanjur direkam dengan metode autentikasi sha2_password, hapus dulu, baru rekam user baru lagi. Jika tidak, koneksi MySQL masih gagal dengan pesan error yang sama.