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

make error #9

Open
mrvarmazyar opened this issue Aug 13, 2020 · 2 comments
Open

make error #9

mrvarmazyar opened this issue Aug 13, 2020 · 2 comments

Comments

@mrvarmazyar
Copy link

Hi,

I'm getting the following error:

gunicorn --reload --access-logfile=- -b '0.0.0.0:16652' --worker-class gevent \
        -e CONFIG=./configs/config.dev.yaml oncall_admin.gunicorn:application
[2020-08-13 21:10:48 +0000] [19394] [INFO] Starting gunicorn 19.7.1
[2020-08-13 21:10:48 +0000] [19394] [INFO] Listening at: http://0.0.0.0:16652 (19394)
[2020-08-13 21:10:48 +0000] [19394] [INFO] Using worker: gevent
[2020-08-13 21:10:48 +0000] [19398] [INFO] Booting worker with pid: 19398
[2020-08-13 21:10:49 +0000] [19398] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/arbiter.py", line 578, in spawn_worker
    worker.init_process()
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/workers/ggevent.py", line 190, in init_process
    super(GeventWorker, self).init_process()
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/workers/base.py", line 126, in init_process
    self.load_wsgi()
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/workers/base.py", line 135, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/util.py", line 352, in import_app
    __import__(module)
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gevent-1.1.2-py2.7-linux-x86_64.egg/gevent/builtins.py", line 93, in __import__
    result = _import(*args, **kwargs)
  File "/root/oncall-admin/src/oncall_admin/gunicorn.py", line 1, in <module>
    from oncall_admin.api import get_app
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gevent-1.1.2-py2.7-linux-x86_64.egg/gevent/builtins.py", line 93, in __import__
    result = _import(*args, **kwargs)
  File "/root/oncall-admin/src/oncall_admin/api.py", line 4, in <module>
    import ujson
  File "/root/oncall-admin/env/local/lib/python2.7/site-packages/gevent-1.1.2-py2.7-linux-x86_64.egg/gevent/builtins.py", line 93, in __import__
    result = _import(*args, **kwargs)
  File "build/bdist.linux-x86_64/egg/ujson.py", line 7, in <module>
  File "build/bdist.linux-x86_64/egg/ujson.py", line 6, in __bootstrap__
ImportError: /root/.cache/Python-Eggs/ujson-1.35-py2.7-linux-x86_64.egg-tmp/ujson.so: undefined symbol: Buffer_AppendShortHexUnchecked
[2020-08-13 21:10:49 +0000] [19398] [INFO] Worker exiting (pid: 19398)
[2020-08-13 21:10:49 +0000] [19394] [INFO] Shutting down: Master
[2020-08-13 21:10:49 +0000] [19394] [INFO] Reason: Worker failed to boot.
Makefile:4: recipe for target 'serve' failed
make: *** [serve] Error 3

How can I fix it?

@Linearhero
Copy link

Linearhero commented Aug 13, 2020

Looking up the Import Error,
ImportError: /root/.cache/Python-Eggs/ujson-1.35-py2.7-linux-x86_64.egg-tmp/ujson.so: undefined symbol: Buffer_AppendShortHexUnchecked, and I found the following bug report: https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1856753

Perhaps try the suggested action of installing the "python-ujson" package. Depending on your distro it will be one of the following commands:
sudo yum install python-ujson
sudo apt install python-ujson

Aside from that, the only thing I can say is perhaps try installing your pip packages without using root, as that can sometimes result in issues with trying to accessing required modules and scripts if you aren't also running your make command with an account that has sudo access.

Also, here is my working Oncall-admin dockerfile, in case it helps:

#Updated: ELJ 08/13/2020
FROM python:2-alpine

#Install packages required for building and running
RUN apk add \
git \
curl \
build-base \
openldap-dev

#Install pip dependancies
RUN pip install pip wheel setuptools awscli

#Copy in Oncall-admin Repo files (from local copy)
COPY oncall-admin/ /opt/oncall-admin

#Set WORKDIR
WORKDIR /opt/oncall-admin

#Run setup.py
RUN python setup.py develop

#Pull config from AWS and run (This is just a preference so config changes can be made without having to rebuild the container, just restart the container and it will pull the latest version of your config)
CMD aws s3 cp s3://**(AWS S3 PATH REDACTED)**/admin-config.yaml /opt/oncall-admin/configs/config.yaml && \
make

@bitpavel
Copy link

Hello, ultrajson version has to be upgraded in order to fix this issue:
ultrajson/ultrajson#346
https://github.com/CanalTP/kirin/pull/326/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants