Closed jaychan-q closed 4 years ago
Also found an interesting thing.
When i start aardvark api server without any parameters, it runs on port 8000 with localhost binding. When i run this command it returns results
curl localhost:8000/api/1/advisors
Not sure why it does not return any data when binded with 0.0.0.0 on port 5000
I found the issue. When running as systemd service i had not specified the working folder where the config.py file was present. Hence the above error. In case if anyone wants to set it as systemd service
[Unit]
Description=Example systemd service.
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=1
User=root
StartLimitBurst=5
StartLimitInterval=10
WorkingDirectory=/root #specify the path of config.py file
ExecStart= /usr/local/bin/aardvark start_api -b 0.0.0.0 #by default will run listen on port 8000
[Install]
WantedBy=multi-user.target
I have created the aardvark db (sqlite) and ran the update command to fetch the data. The data is populated as well
healthcheck is passing as well
But when i try to fetch data from api i get this error
I see the table present as well as values in it. Can you please assist further. Thanks