<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fatjon Lala</title>
    <description>The latest articles on DEV Community by Fatjon Lala (@busymo).</description>
    <link>https://dev.to/busymo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1228924%2F0f2c64ec-dbef-4ddc-8003-186859d12905.png</url>
      <title>DEV Community: Fatjon Lala</title>
      <link>https://dev.to/busymo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/busymo"/>
    <language>en</language>
    <item>
      <title>Celery worker on Kubernetes error (permission denied)</title>
      <dc:creator>Fatjon Lala</dc:creator>
      <pubDate>Fri, 08 Dec 2023 09:55:54 +0000</pubDate>
      <link>https://dev.to/busymo/celery-worker-on-kubernetes-error-permission-denied-1616</link>
      <guid>https://dev.to/busymo/celery-worker-on-kubernetes-error-permission-denied-1616</guid>
      <description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;I am trying to setup airflow on Kubernetes but without using the helm charts, rather using simple deployment scripts. I have successfully managed to run webserver, scheduler, and triggerer and connect to each other and also to the postgreSQL db. &lt;/p&gt;

&lt;p&gt;Currently, trying to setup the celery worker, but I am getting some permission denied error from the &lt;strong&gt;billiard&lt;/strong&gt; library as following:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[2023-12-08 09:36:50,561: CRITICAL/MainProcess] Unrecoverable error: FileNotFoundError(2, 'No such file or directory')&lt;br&gt;
Traceback (most recent call last):&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/celery/worker/worker.py", line 202, in start&lt;br&gt;
    self.blueprint.start(self)&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/celery/bootsteps.py", line 116, in start&lt;br&gt;
    step.start(parent)&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/celery/bootsteps.py", line 365, in start&lt;br&gt;
    return self.obj.start()&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/celery/concurrency/base.py", line 130, in start&lt;br&gt;
    self.on_start()&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/celery/concurrency/prefork.py", line 109, in on_start&lt;br&gt;
    P = self._pool = Pool(processes=self.limit,&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/celery/concurrency/asynpool.py", line 464, in __init__&lt;br&gt;
    super().__init__(processes, *args, **kwargs)&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/billiard/pool.py", line 1045, in __init__&lt;br&gt;
    self._create_worker_process(i)&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/celery/concurrency/asynpool.py", line 482, in _create_worker_process&lt;br&gt;
    return super()._create_worker_process(i)&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/billiard/pool.py", line 1141, in _create_worker_process&lt;br&gt;
    on_ready_counter = self._ctx.Value('i')&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/billiard/context.py", line 179, in Value&lt;br&gt;
    return Value(typecode_or_type, *args, lock=lock,&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/billiard/sharedctypes.py", line 81, in Value&lt;br&gt;
    lock = ctx.RLock()&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/billiard/context.py", line 108, in RLock&lt;br&gt;
    return RLock(ctx=self.get_context())&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/billiard/synchronize.py", line 206, in __init__&lt;br&gt;
    SemLock.__init__(self, RECURSIVE_MUTEX, 1, 1, ctx=ctx)&lt;br&gt;
  File "/home/airflow/.local/lib/python3.9/site-packages/billiard/synchronize.py", line 70, in __init__&lt;br&gt;
    sl = self._semlock = _billiard.SemLock(&lt;br&gt;
FileNotFoundError: [Errno 2] No such file or directory&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As there is no directory mentioned (following some github issues), I doubt that it could be with /dev/shm related directory to which I have provided access for the user running the celery worker. Has anyone had the same problem? If so, can you share some hints on possible solution to it? Note that the default behaviour of our Kubernetes is read-only, meanwhile we mount a emptyDir for the /dev/shm, in order to write-read there. Thanks in advance!&lt;/p&gt;

</description>
      <category>airflow</category>
      <category>kubernetes</category>
      <category>celery</category>
      <category>billiard</category>
    </item>
  </channel>
</rss>
