-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sanity check for Cygnus returns 502 Bad Gateway #359
Comments
I have not been able to reproduce this error. The hash value of the
|
Thank you for taking a look! I can confirm that it works with only Before I tried with my original setup, that has many more services enabled, and the failure happend with So the problem must occur with more services enabled, and I can try to enable one by one. Which would be the best log file to look at? |
Just as a reference, the diff --git a/config.sh b/config.sh
index 67b7d60..67e74e4 100755
--- a/config.sh
+++ b/config.sh
@@ -94,12 +94,12 @@ IMAGE_TIMESCALE=timescale/timescaledb-postgis:1.7.5-pg12
# Cygnus
#
# Set a sub-domain name of Cygnus
-CYGNUS=
+CYGNUS=cygnus
# Use Cygnus sink (true or false) Default: false
CYGNUS_MONGO=
CYGNUS_MYSQL=
-CYGNUS_POSTGRES=
+CYGNUS_POSTGRES=true
CYGNUS_ELASTICSEARCH=
# Expose port (none, local, all) Default: none
@@ -129,7 +129,7 @@ IMAGE_ELASTICSEARCH_DB=elasticsearch:7.6.2
# Comet
#
# Set a sub-domain name of Comet
-COMET=
+COMET=comet
# Expose port (none, local, all) Default: none
COMET_EXPOSE_PORT=
@@ -145,7 +145,7 @@ IMAGE_COMET=telefonicaiot/fiware-sth-comet:2.10.0
#
# Perseo
#
-PERSEO=
+PERSEO=perseo
# Perseo Max age (default: 6000)
PERSEO_MAX_AGE=
@@ -189,7 +189,7 @@ IMAGE_DRACO=ging/fiware-draco:2.1.0
# Quantumleap
#
# Set a sub-domain name of Quantumleap
-QUANTUMLEAP=
+QUANTUMLEAP=quantumleap
# Expose port (none, local, all) Default: none
QUANTUMLEAP_EXPOSE_PORT=
@@ -236,7 +236,7 @@ IMAGE_MEMCACHED=memcached:1
# IoT Agent over Mosquitto
#
# Set a sub-domain name of Mosquitto
-MOSQUITTO=
+MOSQUITTO=mosquitto
# Use MQTT (Port 1883). (true or false) Default: false
MQTT_1883=
@@ -261,7 +261,7 @@ IMAGE_MOSQUITTO=eclipse-mosquitto:1.6
# IoT Agent over HTTP
#
# Set a sub-domain name to use IoT Agent over HTTP.
-IOTAGENT_HTTP=
+IOTAGENT_HTTP=iotagent-http
# Authorization for IoT Agent over HTTP. (none, basic or bearer) Default: bearer
IOTA_HTTP_AUTH=
@@ -276,7 +276,7 @@ IOTA_HTTP_BASIC_PASS=
# IoT Agent for UltraLight 2.0
#
# Set a sub-domain name of IoT Agent for UltraLight 2.0
-IOTAGENT_UL=
+IOTAGENT_UL=iotagent-ul
IOTA_UL_DEFAULT_RESOURCE=/iot/ul
IOTA_UL_TIMESTAMP=true
@@ -292,7 +292,7 @@ IMAGE_IOTAGENT_UL=telefonicaiot/iotagent-ul:2.4.2
# IoT Agent for JSON
#
# Set a sub-domain name of IoT Agent for JSON
-IOTAGENT_JSON=
+IOTAGENT_JSON=iotagent-json
IOTA_JSON_DEFAULT_RESOURCE=/iot/json
IOTA_JSON_TIMESTAMP=true
@@ -308,11 +308,11 @@ IMAGE_IOTAGENT_JSON=telefonicaiot/iotagent-json:2.4.2
# Node-RED
#
# Set a sub-domain name of Node-RED
-NODE_RED=
+NODE_RED=nodered
# Node-RED multi instance
# Number of Node-RED instance. default: 1
-NODE_RED_INSTANCE_NUMBER=
+NODE_RED_INSTANCE_NUMBER=3
# username for Node-RED instance. default: node-red
NODE_RED_INSTANCE_USERNAME=
@@ -338,7 +338,7 @@ IMAGE_NODE_RED=letsfiware/node-red:0.37.0
# Grafana
#
# Set a sub-domain name of Grafana
-GRAFANA=
+GRAFANA=grafana
# Logging level for Grafana
# https://grafana.com/docs/grafana/latest/administration/configuration/#configure-with-environment-variables |
Eventually The diff --git a/config.sh b/config.sh
index 67b7d60..7051045 100755
--- a/config.sh
+++ b/config.sh
@@ -94,12 +94,12 @@ IMAGE_TIMESCALE=timescale/timescaledb-postgis:1.7.5-pg12
# Cygnus
#
# Set a sub-domain name of Cygnus
-CYGNUS=
+CYGNUS=cygnus
# Use Cygnus sink (true or false) Default: false
CYGNUS_MONGO=
CYGNUS_MYSQL=
-CYGNUS_POSTGRES=
+CYGNUS_POSTGRES=true
CYGNUS_ELASTICSEARCH=
# Expose port (none, local, all) Default: none
@@ -129,7 +129,7 @@ IMAGE_ELASTICSEARCH_DB=elasticsearch:7.6.2
# Comet
#
# Set a sub-domain name of Comet
-COMET=
+COMET=comet
# Expose port (none, local, all) Default: none
COMET_EXPOSE_PORT= This returns $ sudo ngsi version --host cygnus.example.com | jq
cbVersion002 error 502 Bad Gateway <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html> Cygnus works without diff --git a/config.sh b/config.sh
index 67b7d60..92fd770 100755
--- a/config.sh
+++ b/config.sh
@@ -94,12 +94,12 @@ IMAGE_TIMESCALE=timescale/timescaledb-postgis:1.7.5-pg12
# Cygnus
#
# Set a sub-domain name of Cygnus
-CYGNUS=
+CYGNUS=cygnus
# Use Cygnus sink (true or false) Default: false
CYGNUS_MONGO=
CYGNUS_MYSQL=
-CYGNUS_POSTGRES=
+CYGNUS_POSTGRES=true
CYGNUS_ELASTICSEARCH=
# Expose port (none, local, all) Default: none And Cygnus works with Comet if all databases are set to true. diff --git a/config.sh b/config.sh
index 67b7d60..5d16b4d 100755
--- a/config.sh
+++ b/config.sh
@@ -94,12 +94,12 @@ IMAGE_TIMESCALE=timescale/timescaledb-postgis:1.7.5-pg12
# Cygnus
#
# Set a sub-domain name of Cygnus
-CYGNUS=
+CYGNUS=cygnus
# Use Cygnus sink (true or false) Default: false
-CYGNUS_MONGO=
-CYGNUS_MYSQL=
-CYGNUS_POSTGRES=
+CYGNUS_MONGO=true
+CYGNUS_MYSQL=true
+CYGNUS_POSTGRES=true
CYGNUS_ELASTICSEARCH=
# Expose port (none, local, all) Default: none
@@ -129,7 +129,7 @@ IMAGE_ELASTICSEARCH_DB=elasticsearch:7.6.2
# Comet
#
# Set a sub-domain name of Comet
-COMET=
+COMET=comet
# Expose port (none, local, all) Default: none
COMET_EXPOSE_PORT= Then the ngsi command return correctly $ sudo ngsi version --host cygnus.example.com | jq
{
"success": "true",
"version": "3.2.0.9b21eae9095e3250ba8799e61411905d1c756191"
} |
This error seems to occur when Cygnus mongodb and postgresql sinks are enabled.
As a workaround, enable the cygnus mysql sink as well.
Or disable STH-Comet.
Your configuration is bellow:
When enabled STH-Comet and Cygnus, the FIWARE Big Bang sets CYGNUS_MONGO to Therefore, your configuration is equivalent to:
|
I see. That makes sense. And thank you for the suggestions! I usually prefer PostgreSQL, if I have the choice. That's why I initially disabled the other alternatives. But there is no problem to enable all. That said, I thought it may be helpful to report the problem here. |
I put a question about this issue on the Stack Overflow site as shown: |
Checklist
Put an
x
in the boxes that applymake collect
command.Not sure I inspected all errors and logs, but unfortunately I already deleted my previous setup.
Describe the bug
When I run the sanity check for Cygnus I get a "502 Bad Gateway" response like
This happens, when only 1 sink is set to
true
. When 2 or more sinks are enabled, it seems to be working.Eventually there is a problem when
CYGNUS_MULTIAGENT
is not settrue
, see:https://github.com/lets-fiware/FIWARE-Big-Bang/blob/main/lets-fiware.sh#L2248-L2250
Your system environment
Run
make collect
in a directory where you ran the lets-fiware.sh script and paste the results here.To Reproduce
Steps to reproduce the behavior:
true
. -> 502 Bad Gatewaytrue
. -> it worksExpected behavior
A clear and concise description of what you expected to happen.
As descibed in the documentation it should return something like
Server (please complete the following information):
The text was updated successfully, but these errors were encountered: