Skip to content
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

Celery v5 not starting #1084

Closed
matias-tecnosoul opened this issue Aug 21, 2020 · 18 comments
Closed

Celery v5 not starting #1084

matias-tecnosoul opened this issue Aug 21, 2020 · 18 comments
Labels
is: bug python status: pinned This issue or pull request won't stale

Comments

@matias-tecnosoul
Copy link

I've pulled the git today and installed it on a fresh Ubuntu 18.04 Lxc container (as I'm already doing with other LT installs).
However when I arrive to the configuration checklist after starting the services I get a "Looks like something went wrong!" saying that Celery is not running.
When I do a systemctl restart libretime-celery it seems to start but then I get an error message in the status:

# systemctl status libretime-celery
● libretime-celery.service - LibreTime Celery Service
   Loaded: loaded (/etc/systemd/system/libretime-celery.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2020-08-21 11:46:26 -03; 2min 6s ago
  Process: 5692 ExecStart=/usr/local/bin/celery worker -A airtime-celery.tasks:celery --time-limit=1800 --concurrency=1 --config=celeryconfig -l INFO (code=ex
 Main PID: 5692 (code=exited, status=2)

Aug 21 11:46:26 elektrona-space systemd[1]: libretime-celery.service: Service hold-off time over, scheduling restart.
Aug 21 11:46:26 elektrona-space systemd[1]: libretime-celery.service: Scheduled restart job, restart counter is at 5.
Aug 21 11:46:26 elektrona-space systemd[1]: Stopped LibreTime Celery Service.
Aug 21 11:46:26 elektrona-space systemd[1]: libretime-celery.service: Start request repeated too quickly.
Aug 21 11:46:26 elektrona-space systemd[1]: libretime-celery.service: Failed with result 'exit-code'.
Aug 21 11:46:26 elektrona-space systemd[1]: Failed to start LibreTime Celery Service.

Also I see in syslog:

Aug 21 11:50:31 elektrona-space celery[5794]: Error: no such option: -A
Aug 21 11:50:31 elektrona-space systemd[1]: libretime-celery.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 21 11:50:31 elektrona-space systemd[1]: libretime-celery.service: Failed with result 'exit-code'.

So I try the command in /etc/systemd/system/libretime-celery.service
ExecStart=/usr/local/bin/celery worker -A airtime-celery.tasks:celery --time-limit=1800 --concurrency=1 --config=celeryconfig -l INFO

and indeed I get a "no such option: -A" error:

#/usr/local/bin/celery worker -A airtime-celery.tasks:celery --time-limit=1800 --concurrency=1 --config=celeryconfig -l INFO
Usage: celery worker [OPTIONS]
Try 'celery worker --help' for help.
Error: no such option: -A

I checked Celery version:

# celery --version
5.0.0b1 (cliffs)

In other LT installs I checked and have an older Celery version.

celery --version
4.4.6 (cliffs)

So, could it be a Celery v5 issue??
Any hints?
thanks...

LibreTime version:
5ac18aa

Installation method:

  • OS: Ubuntu in a LXC container
  • OS Version: 18.04.5 LTS
  • Method: ./instal script
@Robbt
Copy link
Member

Robbt commented Aug 21, 2020

I would suspect that it is an issue with Celery v5, I have seen newer versions of celery cause issues like this before. Since celery v5 isn't stable I'd check with that project and see if the deprecated the -A argument. I'm not familiar enough with it to know off the top of my head what it does.

@matias-tecnosoul
Copy link
Author

matias-tecnosoul commented Aug 22, 2020

As far as I can understand Celery is installed by Libretime install script but not from an ubuntu package, right?
If so, the version installed comes from LT git, and therefore there should be other users experiencing the same issue.
In the meanwhile, is there a way to downgrade Celery??
thanks

@matias-tecnosoul
Copy link
Author

What I mean by "not from a ubuntu package" is that I see a Celery folder inside the Libretime git folder:
/tmp/libretime/python_apps/airtime-celery
and when I try to find who owns the Celery bin I get:

# dpkg-query -S /usr/local/bin/celery
dpkg-query: no path found matching pattern /usr/local/bin/celery

Is anyone else working with the LT git version having similar issues??
thanks again...

@paddatrapper
Copy link
Contributor

airtime-celery is a celery script. We install the celery engine from pip: https://github.com/LibreTime/libretime/blob/master/python_apps/airtime-celery/setup.py#L51

@eskapiste
Copy link

eskapiste commented Aug 23, 2020

same thing here, i cant make it work

●libretime-celery.service - LibreTime Celery Service
Loaded: loaded (/etc/systemd/system/libretime-celery.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-08-23 19:16:58 EET; 5min ago
Process: 3275 ExecStart=/usr/local/bin/celery worker -A airtime-celery.tasks:celery --time-limit=1800 --concurrency=1 --config=celeryconfig -l INFO (code=exited, status=2)
Main PID: 3275 (code=exited, status=2)

other services are ok.
is there any way to solve it?
or downgrade to previous version of celery?

@matias-tecnosoul
Copy link
Author

if we roll back the LT git version, are we going to downgrade Celery as well? or it will still be obtained from the same place (and therefore get the same version not working now)?

@paddatrapper
Copy link
Contributor

No. You need to specify the version of celery in the setup.py file I linked before. Then re-run python3 ./setup.py install --no-init-script from within the airtime-celery directory

@eskapiste
Copy link

i might be noob, but i cant understand how to. i changed 0.1 to 4.4.6, and then started setuo.py
still have 5.0.0

@gr0ebi
Copy link

gr0ebi commented Aug 23, 2020

set Version back to "0.1" and change Line 51 to
install_requires=["soundcloud", "celery==4.4.7", "kombu==4.6.10", "configobj"],

@eskapiste
Copy link

eskapiste commented Aug 23, 2020

it seems like it is running now, but now i got this problem with AUTH. same things happen when i try to upload files via GUI control panel.

● libretime-celery.service - LibreTime Celery Service
Loaded: loaded (/etc/systemd/system/libretime-celery.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-08-23 22:57:23 EET; 2s ago
Main PID: 3273 (celery)
Tasks: 1 (limit: 2338)
CGroup: /system.slice/libretime-celery.service
└─3273 /usr/bin/python3 /usr/local/bin/celery worker -A airtime-celery.tasks:celery --time-limit=1800 --concurrency=1 --config=celeryconfig -l INFO

Aug 23 22:57:24 tapatown celery[3273]: return self.on_inbound_frame(frame)
Aug 23 22:57:24 tapatown celery[3273]: File "/usr/local/lib/python3.6/dist-packages/amqp-2.6.1-py3.6.egg/amqp/method_framing.py", line 55, in on_frame
Aug 23 22:57:24 tapatown celery[3273]: callback(channel, method_sig, buf, None)
Aug 23 22:57:24 tapatown celery[3273]: File "/usr/local/lib/python3.6/dist-packages/amqp-2.6.1-py3.6.egg/amqp/connection.py", line 521, in on_inbound_method
Aug 23 22:57:24 tapatown celery[3273]: method_sig, payload, content,
Aug 23 22:57:24 tapatown celery[3273]: File "/usr/local/lib/python3.6/dist-packages/amqp-2.6.1-py3.6.egg/amqp/abstract_channel.py", line 145, in dispatch_method
Aug 23 22:57:24 tapatown celery[3273]: listener(*args)
Aug 23 22:57:24 tapatown celery[3273]: File "/usr/local/lib/python3.6/dist-packages/amqp-2.6.1-py3.6.egg/amqp/connection.py", line 651, in _on_close
Aug 23 22:57:24 tapatown celery[3273]: (class_id, method_id), ConnectionError)
Aug 23 22:57:24 tapatown celery[3273]: amqp.exceptions.AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.

@gr0ebi
Copy link

gr0ebi commented Aug 24, 2020

Did you use the correct python3 install command that @paddatrapper wrote?

No. You need to specify the version of celery in the setup.py file I linked before. Then re-run python3 ./setup.py install --no-init-script from within the airtime-celery directory

@eskapiste
Copy link

Did you use the correct python3 install command that @paddatrapper wrote?

No. You need to specify the version of celery in the setup.py file I linked before. Then re-run python3 ./setup.py install --no-init-script from within the airtime-celery directory

yes. it seems that everything ok with celery. i guess there is problem with something else, not celery.

Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.

@klaus13
Copy link

klaus13 commented Aug 27, 2020

Hi, I got the same issue. System is Xubuntu 18.04.5 Celery service don't want to start up and I see that Replay Gain don't work too. After setup Libretime-Master, I had also no access to the localhost Apach2 server. Faust helped me and I got access with this command line: sudo chown -R www-data:www-data /usr/share/airtime/php/airtime_mvc/
That's maybe not the best solution but it works. To be sure that my problem is true I made 2 new installations today ! The same issue in each one. Thank you for research to fix this issues.

@LordFader
Copy link

Ubuntu 18.04.5 LTS fresh install.
Got this issue to.
Is there a user friendly way to solve this after the installation?
Or is something we need to do during the installation process?

Sorry I'm just a simple user of Libretime I'm not a developer soo.. I got some limitations!
If there is a way to solve this... It will be nice.

  • Download a new install?
  • Change a file after install?
  • Add any kind of "code" in a specific file location?
  • Instructions over CLI after install?

Thank you.

@stale
Copy link

stale bot commented Jun 11, 2021

This issue has been automatically marked as stale because it has not had activity in the last 5 months. It will be closed if no activity occurs in the next month.
Please chat to us on discourse or ask for help on our chat if you have any questions or need further support with getting this issue resolved.
You may also label an issue as pinned if you would like to make sure that it does not get closed by this bot.

@triangle-stream
Copy link

triangle-stream commented Sep 20, 2022

Just adding my experience in this, it could be helpful for someone.

Today I installed latest beta on a fresh new Ubuntu 20.04.
The worker service failed to start and I was able to solve the issue by correcting these behaviours:

  • checked that the worker.log file exists (not there, I just created it and setted the correct user ownership (libretime) in order avoid creation issues;
  • service was not able to start;
  • changed the libretime-worker.service ExecStart from /usr/bin/sh to /bin/sh;
  • service successfully started.

@jooola
Copy link
Contributor

jooola commented Sep 20, 2022

@triangle-stream Please open a dedicated issue for your problem.

@jooola
Copy link
Contributor

jooola commented Sep 20, 2022

Celery upgrade to >=5.0.0 is handled in #1800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug python status: pinned This issue or pull request won't stale
Projects
None yet
Development

No branches or pull requests

9 participants