WebFaction
Community site: login faq

Hei!

I have created domain + application + website for custom application (https://github.com/OpenRTMFP/Cumulus) but whatever i try, i still get an error "502 -- Bad Gateway".

(I have doube checked the ports and my other custom app running node.js is working well...)

I maybe the problem is connected to fact, that this Cumulus application works with UDP not typical TCP?

Thanks for any help!

asked 06 Nov '12, 18:26

Mart
1313
accept rate: 0%

I also tested if the UDP packages recieve the running application server with command:

hping3 --udp --baseport 80 --keep cumulus.mywebfaction.com

But the server did not receive any input (in my local machine i could see this ping from Cumulus server log).

(06 Nov '12, 19:10) Mart

A Custom Application (listening on port) is not designed for arbitrary traffic, regardless of whether it is TCP or UDP. Instead, it only works with HTTP traffic. Specifically, a Custom Application (listening on port) application works using a proxy_pass directive on the front-end Nginx server listening on ports 80 and 443. That is to say that when a request comes in for a domain which is mapped to a custom application, the front-end Nginx server then forwards the request on to your application for handling. That means that this only works with HTTP/1.1.

In your case, it sounds like your application is using TCP and UDP with some protocol other than HTTP. We certainly support such applications, but you can't use a Custom Application (listening on port) for them. Instead, we'll need to assign an open-ports IP address for this and open a TCP/UDP port directly in the firewall for your application. This can be done free of charge; just open a support ticket for details.

Important: Just a note for anyone else landing on this thread due to seeing a "502 Bad Gateway" error with their Custom Application (listening on port) application: Most of the time, a "502 Bad Gateway" error does not indicate that you need an open port directly in the firewall; most of the time, it means that your application is not running on the correct port, and you just need to either turn it on or fix the port in the application settings and restart it.

Why the same error for three completely different problems? The front-end Nginx server reports a 502 Bad Gateway error when it can't communicate with the application. It doesn't know whether that's because the application can't speak HTTP, or because it's running on the wrong port, or because it's not running at all.

permanent link

answered 06 Nov '12, 22:55

ryans ♦♦
5.0k93260
accept rate: 43%

edited 06 Nov '12, 23:08

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×47
×21
×3
×1
×1

question asked: 06 Nov '12, 18:26

question was seen: 9,663 times

last updated: 06 Nov '12, 23:08

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM