Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: positional arguments are not supported

[program:sam_reports_uwsgi]
command=uwsgi --ini /var/www/phis-ng/server_config/staging_wsgi.ini
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile=/var/log/sam_reports/stdout.log
stderr_logfile=/var/log/sam_reports/stderr.log
user=ubuntu
directory=/var/www/phis-ng/src/imam

This is the conf file I have for supervisord but when I try to run supervisord staging_supervisor.conf in the folder it is located, it gives me this error:

Error: positional arguments are not supported

I can't see what I am doing wrong comparing it against what I've found via Google and supervisord docs. I'm using supervisord 3.0.

like image 391
user1086337 Avatar asked Mar 17 '14 20:03

user1086337


3 Answers

Replacing ENTYRPOINT with CMD is kind of slick solution, because when container runs with a command, e.g. docker run -it IMAGE /bin/bash, CMD is ignored. It may work for small Dockerfiles, but in bigger with many layers it could be very hard to debug. But I found a solution to use ENTRYPOINT with supervisord avoiding error positional arguments are not supported error. Just put supervisord command in shell script .sh, copy that to container and then use ENTRYPOINT on that file, e.g.:

run_supervisord.sh

#!/bin/bash
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf

Dockerfile:

COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY image_scripts/run_supervisord.sh /opt/bin/run_supervisord.sh
ENTRYPOINT ["bash", "/opt/bin/run_supervisord.sh"]
like image 131
Taz Avatar answered Nov 17 '22 04:11

Taz


Make sure supervisord running as a daemon and try supervisorctl for each program instead.

For ubuntu, create /etc/supervisord/conf.d/some_app.conf file which contains [program:some_app] section.

Then, start it.

supervisorctl reload
supervisorctl start some_app

Confirm it's running

supervisorctl status

That's all.

like image 40
Fujimoto Youichi Avatar answered Nov 17 '22 05:11

Fujimoto Youichi


Change:

ENTRYPOINT ["/usr/bin/supervisord"]

to

CMD ["/usr/bin/supervisord"]

Unfortunately cannot yet explain why that helps.

like image 4
Andrey.Kozyrev Avatar answered Nov 17 '22 04:11

Andrey.Kozyrev