ovh / celery-director

Simple and rapid framework to build workflows with Celery

Home Page:https://ovh.github.io/celery-director/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot display workflows - pending load (director init workflows example)

vldbnc opened this issue · comments

Webserver is run as

director webserver -b 0.0.0.0:8080

root@ip-XXX:/usr/local/bin# pip list
Package Version


alembic 1.3.2
amqp 2.6.1
attrs 21.2.0
Babel 2.9.1
billiard 3.6.4.0
celery 4.4.7
celery-director 0.3.1
certifi 2021.5.30
Click 7.0
environs 6.1.0
Flask 1.1.1
Flask-HTTPAuth 4.1.0
Flask-json-schema 0.0.5
Flask-Migrate 2.5.2
Flask-SQLAlchemy 2.4.1
flower 0.9.3
gunicorn 20.0.4
itsdangerous 2.0.1
Jinja2 3.0.1
jsonschema 3.2.0
kombu 4.6.11
Mako 1.1.4
MarkupSafe 2.0.1
marshmallow 3.12.1
mysql-connector-python 8.0.21
pip 21.1.2
pluginbase 1.0.0
protobuf 3.17.3
psycopg2-binary 2.8.4
pyrsistent 0.17.3
python-dateutil 2.8.1
python-dotenv 0.17.1
python-editor 1.0.4
pytz 2021.1
PyYAML 5.1.2
redis 3.3.11
sentry-sdk 0.16.3
setuptools 57.0.0
six 1.16.0
SQLAlchemy 1.3.11
SQLAlchemy-Utils 0.35.0
terminaltables 3.1.0
tornado 5.1.1
urllib3 1.26.5
vine 1.3.0
Werkzeug 2.0.1
wheel 0.36.2
root@ip-XXX:/usr/local/bin#

root@ip-XXX:/usr/local/bin# director workflow list
+-----------------+----------+----------------------+
| Workflows (2) | Periodic | Tasks |
+-----------------+----------+----------------------+
| example.ETL | -- | EXTRACT |
| | | TRANSFORM |
| | | LOAD |
+-----------------+----------+----------------------+
| example.RANDOMS | -- | Group GROUP_RANDOMS: |
| | | └ RANDOM |
| | | └ RANDOM |
| | | ADD |
+-----------------+----------+----------------------+
root@ip-XXX:/usr/local/bin#

# Auto-generated, please adjust.
# ---------- Database ----------
DIRECTOR_DATABASE_URI="sqlite:////app/workflows/database.db"
DIRECTOR_DATABASE_POOL_RECYCLE=-1


# ---------- Celery ----------
DIRECTOR_BROKER_URI="redis://127.0.0.1:6379/0"
DIRECTOR_RESULT_BACKEND_URI="redis://127.0.0.1:6379/1"


# ---------- Frontend ----------
DIRECTOR_API_URL="http://0.0.0.0:8080/api"
DIRECTOR_FLOWER_URL="http://0.0.0.0:5000"
DIRECTOR_ENABLE_DARK_THEME=false
DIRECTOR_ENABLE_HISTORY_MODE=false
DIRECTOR_REFRESH_INTERVAL=30000

# ---------- API ----------
DIRECTOR_WORKFLOWS_PER_PAGE=1000
DIRECTOR_AUTH_ENABLED = false

# These settings are designed to be used with the "director dlassets" command,
# the DIRECTOR_STATIC_FOLDER will be used if you set DIRECTOR_ENABLE_CDN to false.
DIRECTOR_ENABLE_CDN=true
DIRECTOR_STATIC_FOLDER=${DIRECTOR_HOME}/static

# ---------- Sentry ----------
DIRECTOR_SENTRY_DSN=""
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:6379            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN

@vldbnc Is this issue solved?. If not can you share the network request details from browser's developer console?

Hello,

Yes indeed, you will encounter some problems by setting DIRECTOR_API_URL to http://0.0.0.0:8080/api, here is why:
when you start your server with this command:
director webserver -b 0.0.0.0:8080
You bind your webserver to 0.0.0.0:8080, which will allow the server to be reachable from both your local IP, your WAN IP or whatever.

However, the URL you set in DIRECTOR_API_URL is not a bind URL, this a string that will be replaced "on the fly" by the API which will be fed to your browser to tell it to fetch data from this URL. That means the API will tell your browser to fetch data on http://0.0.0.0:8080/api which is not a valid URL because this is not a reachable endpoint.

The 0.0.0.0:8080 is just to tell the webserver to bind to all your IPs (LAN or WAN), but 0.0.0.0 is not real reachable IP which can be accessed by a browser.

That means you need to put here either your WAN IP, or a LAN IP, depending on what you want to serve to which machines. This part is up to you and depends on your network constraints/configuration.

Closing due to inactivity of the initial author.