Troubleshooting Cloudflare Tunnel 503: When Your Config Isn't Being Read
Setup Cloudflare Tunnel Baru: Berhasil, Tapi Kok 503?
Oke, jadi begini. Gw hari ini lagi iseng mau setup Cloudflare Tunnel buat salah satu domain produksi. Biasanya sih lancar-lancar aja, tapi kali ini kok ada yang aneh. Tiba-tiba akses ke domain itu malah muncul error 503 Service Unavailable. Padahal Apache/XAMPP di lokal baik-baik aja, dan gw udah bikin tunnelnya sesuai prosedur. Tapi kok gitu ya..
Buat yang belum tau, Cloudflare Tunnel ini tuh gini, cara yang asik buat expose server lokal ke internet tanpa perlu ribet setting port forwarding. Enaknya, koneksi langsung ke edge Cloudflare pake protokol QUIC, jadi lebih aman dan kenceng. Konfigurasi tunnel yang biasa gw pake kurang lebih kayak gini:
tunnel: <NAMA_TUNNEL>
credentials-file: C:\Users\<USER>\.cloudflared\<TUNNEL-UUID>.json
ingress:
- hostname: <DOMAIN>
service: http://localhost:80
- service: http_status:404
Maksudnya, tunnel ini pake file credentials JSON yang udah di-generate. Trus, semua request dari hostname domain tertentu bakal diarahin ke Apache lokal di port 80. Kalau request dari hostname lain ya dapet 404. Sederhana, kan?
Gw udah yakin banget konfigurasinya bener. Tunnel juga katanya berhasil konek ke Cloudflare. Tapi kok pas dibuka di browser, error 503 terus. Otomatis, mikirnya langsung ke mana-mana. "Apa firewall gw ngeblok? Apa Apache-nya mati? Apa ada yang salah di dashboard Cloudflare?"
Wadaw, mumet dah.
Gw coba cek log-nya cloudflared. Di situ akhirnya ketahuan masalahnya. Bukan masalah koneksi, bukan masalah firewall, bukan masalah Apache. Tapi ada warning yang sangat spesifik banget:
"No ingress rules were defined in provided config (if any) nor from the cli, cloudflared will return 503 for all incoming HTTP requests"
Nah, ini dia titik terangnya. Log-nya bilang, aturan ingress alias aturan pengalihan, gak kebaca. Entah dari config file atau dari command line. Akibatnya, cloudflared yang jalan ini bingung, "Ini request mau dikemanain?" Maka, solusinya simple, semua request HTTP dikembalikan 503.
Jadi intinya, tunnel sebenarnya sehat. Koneksi QUIC ke edge Cloudflare juga sukses. Cuma ya itu, cloudflared yang sedang berjalan gak baca config.yml yang udah gw bikin. Entah kenapa, mungkin karena path-nya salah, atau formatnya error.
Setelah gw pastiin lokasi config.yml-nya bener dan langsung gw panggil pas ngejalanin tunnel-nya, warning-nya langsung ilang. Log-nya mulai menunjukkan koneksi-koneksi yang terdaftar. Dan pas gw coba lagi di browser? Jreng, langsung muncul tampilan website lokal. Sukses!
Jadi kalau lo ngalamin hal serupa, pas bikin Cloudflare Tunnel ternyata error 503 atau malah gak mau jalan, coba cek lagi. Jangan terlalu fokus ke masalah koneksi atau firewall dulu. Coba cek aturan ingress di config kamu. Pastikan cloudflared bener-bener membaca config itu. Kadang masalah sederhana gini bikin mumet seharian.
Oh iya, satu catatan lagi. Biasanya ada juga pesan tentang system root certificate pool di Windows. Di kasus gw, itu bukan penyebab masalah karena origin yang gw pake adalah HTTP lokal. Jadi gak perlu terlalu dipikirin.. hehe.
Entahlah, mungkin kedepannya Cloudflare bikin error message yang lebih manusiawi lagi ya, biar gak bikin bingung. Tapi ya sudahlah, namanya juga troubleshooting. Kita cuma perlu baca log-nya pelan-pelan.. :)
New Cloudflare Tunnel Setup: Connected but Facing 503? Let's Investigate
Okay, so here's the thing. Today, I was just messing around, trying to set up a new Cloudflare Tunnel for one of my production domains. Usually, this goes smoothly, but something felt off. I hit the domain and boom, a 503 Service Unavailable error. Apache and XAMPP were running fine locally, and I followed the tunnel procedure to a T. But why, though?
For those who don't know, a Cloudflare Tunnel is an awesome way to expose a local server to the internet without the hassle of port forwarding. The neat part is the connection goes directly to Cloudflare's edge via QUIC, making it faster and more secure. The typical config I use looks something like this:
tunnel: <TUNNEL_NAME>
credentials-file: C:\Users\<USER>\.cloudflared\<TUNNEL-UUID>.json
ingress:
- hostname: <DOMAIN>
service: http://localhost:80
- service: http_status:404
What this does is use the generated JSON credentials file for the tunnel. Then, it routes requests from a specific domain hostname to my local Apache instance on port 80. Any other hostname gets a 404. Simple, right?
I was absolutely sure my config was correct. The tunnel even said it connected successfully. But every time I opened the browser, I was greeted with that dreaded 503 error. My mind immediately started racing. "Is my firewall blocking it? Is Apache down? Did I mess up something in the Cloudflare dashboard?"
Whoa, total brain fry.
So, I decided to check the cloudflared logs. And there it was, the smoking gun. It wasn't a connection issue, a firewall issue, or an Apache issue. It was a very specific warning that read:
"No ingress rules were defined in provided config (if any) nor from the cli, cloudflared will return 503 for all incoming HTTP requests"
And there's the root of the problem. The logs were clearly saying that the ingress rules weren't being read. Not from the config file, not from the command line. So the running cloudflared instance was confused. It had no idea where to direct the incoming requests. Its failsafe? Return a 503 for everything.
So, the tunnel itself was actually healthy. The QUIC connection to Cloudflare's edge was successful. The issue was that the cloudflared process wasn't reading the `config.yml` file I had created. Maybe the path was wrong, or maybe the formatting was off.
After I double-checked that the config file was in the right place and called it properly when starting the tunnel, the warning vanished. The logs started showing active connections. I tried accessing the domain again, and what do you know? It worked! The local website appeared. Success!
So, if you ever run into a similar issue where your Cloudflare Tunnel isn't working and gives a 503 error, take a moment to step back. Don't just focus on firewalls or network settings. Check your ingress rules. Make sure the cloudflared daemon is actually reading your config file. Sometimes, the simplest problems are the ones that drive you crazy all day.
Oh, and one more side note. I also saw a message about the system root certificate pool on Windows. In my case, it wasn't the cause because my origin was local HTTP. So, you probably don't need to stress too much about that.
I don't know, maybe one day Cloudflare can make error messages a bit more human-friendly to avoid this kind of confusion. But it is what it is. That's just the nature of troubleshooting. You just have to read the logs carefully.. :)
Terima kasih sudah mampir! Jika kamu menikmati konten ini dan ingin menunjukkan dukunganmu, bagaimana kalau mentraktirku secangkir kopi? 😊 Ini adalah gestur kecil yang sangat membantu untuk menjaga semangatku agar terus membuat konten-konten keren. Tidak ada paksaan, tapi secangkir kopi darimu pasti akan membuat hariku jadi sedikit lebih cerah. ☕️
Thank you for stopping by! If you enjoy the content and would like to show your support, how about treating me to a cup of coffee? �� It’s a small gesture that helps keep me motivated to continue creating awesome content. No pressure, but your coffee would definitely make my day a little brighter. ☕️ Buy Me Coffee

Post a Comment for "Troubleshooting Cloudflare Tunnel 503: When Your Config Isn't Being Read"
Post a Comment
You are welcome to share your ideas with us in comments!