~sircmpwn/sr.ht-discuss

2 2

[meta.sr.ht] JSONDecodeError

Details
Message ID
<8876736ccfb1a1c3affcfa70d1a62e47a93041f9.camel@aquilenet.fr>
DKIM signature
missing
Download raw message
Hi. I installed the meta.sr.ht-0.53.30-r0 package on Alpine 3.13 but
the service does not start.

Here is (the interesting parts of) my configuration:

   [sr.ht]
   site-name = Foobar
   site-info = https://forge.foo.bar
   site-blurb = Forge Foobar
   environment = production
   owner-name = Team Foobar
   owner-email = admin@yaal.fr
   privacy-policy =
   service-key = xxxxxyyyyyyy
   redis-host = redis://localhost:6379
   [mail]
   smtp-host = mail.foo.bar
   smtp-port =
   smtp-user =
   smtp-password =
   smtp-from = forge@foo.bar
   error-to = admin@foo.bar
   error-from = forge@foo.bar
   pgp-privkey =
   pgp-pubkey =
   pgp-key-id =
   [webhooks]
   private-key = xxxxxxyyyyyy
   [meta.sr.ht]
   origin = https://meta.forge.foo.bar
   debug-host = 127.0.0.1
   debug-port = 5000
   connection-string = postgresql://metasrht@localhost/metasrht
   migrate-on-upgrade = yes
   welcome-emails = no
   api-origin = http://localhost:5100
   [meta.sr.ht::api]
   max-complexity = 200
   max-duration = 3s
   internal-ipnet = 127.0.0.0/8,::1/128,192.168.0.0/16,10.0.0.0/8
   [meta.sr.ht::settings]
   registration = no
   onboarding-redirect = https://foo.bar
   user-invites = 5
   [meta.sr.ht::auth]
   auth-method = builtin
   [meta.sr.ht::auth::unix-pam]
   email-default-domain = foo.bar
   create-users = yes
   user-group =
   admin-group = wheel
   [meta.sr.ht::aliases]
   foo = bar
   [meta.sr.ht::billing]
   enabled = false
   stripe-public-key =
   stripe-private-key =

Here is the output:
   
   [2021-05-25 10:37:51 +0000] [22473] [ERROR] Exception in worker process
   Traceback (most recent call last):
     File "/usr/lib/python3.8/site-packages/gunicorn/arbiter.py", line
   583, in spawn_worker
       worker.init_process()
     File "/usr/lib/python3.8/site-packages/gunicorn/workers/base.py",
   line 119, in init_process
       self.load_wsgi()
     File "/usr/lib/python3.8/site-packages/gunicorn/workers/base.py",
   line 144, in load_wsgi
       self.wsgi = self.app.wsgi()
     File "/usr/lib/python3.8/site-packages/gunicorn/app/base.py", line
   67, in wsgi
       self.callable = self.load()
     File "/usr/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line
   49, in load
       return self.load_wsgiapp()
     File "/usr/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line
   39, in load_wsgiapp
       return util.import_app(self.app_uri)
     File "/usr/lib/python3.8/site-packages/gunicorn/util.py", line 358,
   in import_app
       mod = importlib.import_module(module)
     File "/usr/lib/python3.8/importlib/__init__.py", line 127, in
   import_module
       return _bootstrap._gcd_import(name[level:], package, level)
     File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
     File "<frozen importlib._bootstrap>", line 991, in _find_and_load
     File "<frozen importlib._bootstrap>", line 975, in
   _find_and_load_unlocked
     File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
     File "<frozen importlib._bootstrap_external>", line 848, in
   exec_module
     File "<frozen importlib._bootstrap>", line 219, in
   _call_with_frames_removed
     File "/usr/lib/python3.8/site-packages/metasrht/app.py", line 59, in
   <module>
       app = MetaApp()
     File "/usr/lib/python3.8/site-packages/metasrht/app.py", line 24, in
   __init__
       from metasrht.blueprints.oauth2 import oauth2
     File "/usr/lib/python3.8/site-
   packages/metasrht/blueprints/oauth2.py", line 34, in <module>
       "scopes": r.json()["scopes"],
     File "/usr/lib/python3.8/site-packages/requests/models.py", line 900,
   in json
       return complexjson.loads(self.text, **kwargs)
     File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
       return _default_decoder.decode(s)
     File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
       obj, end = self.raw_decode(s, idx=_w(s, 0).end())
     File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
       raise JSONDecodeError("Expecting value", s, err.value) from None
   json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
   [2021-05-25 10:37:51 +0000] [22473] [INFO] Worker exiting (pid: 22473)
   Discovering APIs...
   Found meta.sr.ht
   Found man.sr.ht
   [2021-05-25 10:37:51 +0000] [22469] [INFO] Shutting down: Master
   [2021-05-25 10:37:51 +0000] [22469] [INFO] Reason: Worker failed to
   boot.
   
Did I miss something?

Thank you for your help
Details
Message ID
<bfaf8c24-5dce-63b4-ff80-c5256d8ea494@ignaskiela.eu>
In-Reply-To
<8876736ccfb1a1c3affcfa70d1a62e47a93041f9.camel@aquilenet.fr> (view parent)
DKIM signature
pass
Download raw message
On 2021-05-25 13:56, Éloi Rivard wrote:
> Hi. I installed the meta.sr.ht-0.53.30-r0 package on Alpine 3.13 but
> the service does not start.
 >
> Did I miss something?

Any logs from the api service? I think they should be in
/var/log/meta.sr.ht-api.log
Details
Message ID
<76e7637c6b8e18c36cda061f34ea467116b14d6b.camel@aquilenet.fr>
In-Reply-To
<bfaf8c24-5dce-63b4-ff80-c5256d8ea494@ignaskiela.eu> (view parent)
DKIM signature
missing
Download raw message
> Any logs from the api service? I think they should be in
> /var/log/meta.sr.ht-api.log

meta.sr.ht-api.log seems ok, but there seems to be issues with celery

meta.sr.ht-api.log

   2021/05/25 10:37:31 Running on :5100
   2021/05/25 10:37:31 Prometheus listening on :35551
   2021/05/25 10:37:33 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:51856 - 200 66B in 854.554µs
   2021/05/25 10:37:37 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:51892 - 200 66B in 58.445µs
   2021/05/25 10:37:42 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:51932 - 200 66B in 60.361µs
   2021/05/25 10:37:46 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:51974 - 200 66B in 63.66µs
   2021/05/25 10:37:50 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:52008 - 200 66B in 81.52µs
   2021/05/25 10:37:54 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:52042 - 200 66B in 77.023µs
   2021/05/25 10:37:59 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:52080 - 200 66B in 60.004µs
   2021/05/25 10:38:03 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:52114 - 200 66B in 97.417µs
   2021/05/25 10:38:07 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:52148 - 200 66B in 53.439µs
   2021/05/25 10:38:11 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:52182 - 200 66B in 45.29µs
   2021/05/25 10:38:16 "GET http://localhost:5100/query/api-meta.json
   HTTP/1.1" from 127.0.0.1:52228 - 200 66B in 90.99µs
   
meta.sr.ht-webhooks.log
      
   -------------- celery@forge@foo.bar v5.0.5 (singularity)
   --- ***** -----
   -- ******* ---- Linux-4.19.0-11-amd64-x86_64-with 2021-05-25
   10:38:17
   - *** --- * ---
   - ** ---------- [config]
   - ** ---------- .> app:         webhooks:0x7f4c03608280
   - ** ---------- .> transport:   redis://localhost:6379//
   - ** ---------- .> results:     disabled://
   - *** --- * --- .> concurrency: 8 (prefork)
   -- ******* ---- .> task events: OFF (enable -E to monitor tasks in
   this worker)
   --- ***** -----
    -------------- [queues]
                   .> celery           exchange=celery(direct)
   key=celery
   
   
   [tasks]
     . srht.webhook.celery.async_request
   
   [2021-05-25 10:38:17,181: CRITICAL/MainProcess] Unrecoverable error:
   FileNotFoundError(2, 'No such file or directory')
   Traceback (most recent call last):
     File "/usr/lib/python3.8/site-packages/celery/worker/worker.py",
   line 203, in start
       self.blueprint.start(self)
     File "/usr/lib/python3.8/site-packages/celery/bootsteps.py", line
   116, in start
       step.start(parent)
     File "/usr/lib/python3.8/site-packages/celery/bootsteps.py", line
   365, in start
       return self.obj.start()
     File "/usr/lib/python3.8/site-
   packages/celery/concurrency/base.py", line 129, in start
       self.on_start()
     File "/usr/lib/python3.8/site-
   packages/celery/concurrency/prefork.py", line 107, in on_start
       P = self._pool = Pool(processes=self.limit,
     File "/usr/lib/python3.8/site-
   packages/celery/concurrency/asynpool.py", line 460, in __init__
       super().__init__(processes, *args, **kwargs)
     File "/usr/lib/python3.8/site-packages/billiard/pool.py", line
   1046, in __init__
       self._create_worker_process(i)
     File "/usr/lib/python3.8/site-
   packages/celery/concurrency/asynpool.py", line 477, in
   _create_worker_process
       return super()._create_worker_process(i)
     File "/usr/lib/python3.8/site-packages/billiard/pool.py", line
   1142, in _create_worker_process
       on_ready_counter = self._ctx.Value('i')
     File "/usr/lib/python3.8/site-packages/billiard/context.py", line
   181, in Value
       return Value(typecode_or_type, *args, lock=lock,
     File "/usr/lib/python3.8/site-packages/billiard/sharedctypes.py",
   line 83, in Value
       lock = ctx.RLock()
     File "/usr/lib/python3.8/site-packages/billiard/context.py", line
   110, in RLock
       return RLock(ctx=self.get_context())
     File "/usr/lib/python3.8/site-packages/billiard/synchronize.py",
   line 207, in __init__
       SemLock.__init__(self, RECURSIVE_MUTEX, 1, 1, ctx=ctx)
     File "/usr/lib/python3.8/site-packages/billiard/synchronize.py",
   line 71, in __init__
       sl = self._semlock = _billiard.SemLock(
   FileNotFoundError: [Errno 2] No such file or directory
Reply to thread Export thread (mbox)