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

cffi.api.CDefError: 'point_conversion_form_t' has no values explicitly defined: refusing to guess which integer type it is meant to be (unsigned/signed, int/long) #1721

Closed
devent opened this issue Oct 12, 2016 · 6 comments

Comments

@devent
Copy link

devent commented Oct 12, 2016

Hello, I try to install Graphite/Carbon in a Docker Container.
The installation works fine, but if I start Carbon I get the following error.
Any help is appreciated. Regards.

Error:

cffi.api.CDefError: 'point_conversion_form_t' has no values explicitly defined: refusing to guess which integer type it is meant to be (unsigned/signed, int/long)
Traceback (most recent call last):
  File "/opt/graphite/bin/carbon-cache.py", line 32, in <module>
    run_twistd_plugin(__file__)
  File "/opt/graphite/lib/carbon/util.py", line 60, in run_twistd_plugin
    from twisted.internet import epollreactor
  File "/usr/lib/python2.7/dist-packages/twisted/internet/epollreactor.py", line 24, in <module>
    from twisted.internet import posixbase
  File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 24, in <module>
    from twisted.internet import error, udp, tcp
  File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 29, in <module>
    from twisted.internet._newtls import (
  File "/usr/lib/python2.7/dist-packages/twisted/internet/_newtls.py", line 21, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/tls.py", line 41, in <module>
    from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
  File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/rand.py", line 11, in <module>
    from OpenSSL._util import (
  File "/usr/lib/python2.7/dist-packages/OpenSSL/_util.py", line 4, in <module>
    binding = Binding()
  File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 89, in __init__
    self._ensure_ffi_initialized()
  File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 113, in _ensure_ffi_initialized
    libraries=libraries,
  File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/utils.py", line 80, in build_ffi
    extra_link_args=extra_link_args,
  File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 437, in verify
    lib = self.verifier.load_library()
  File "/usr/local/lib/python2.7/dist-packages/cffi/verifier.py", line 114, in load_library
    return self._load_library()
  File "/usr/local/lib/python2.7/dist-packages/cffi/verifier.py", line 225, in _load_library
    return self._vengine.load_library()
  File "/usr/local/lib/python2.7/dist-packages/cffi/vengine_cpy.py", line 174, in load_library
    lst = list(map(self.ffi._get_cached_btype, lst))
  File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 409, in _get_cached_btype
    BType = type.get_cached_btype(self, finishlist)
  File "/usr/local/lib/python2.7/dist-packages/cffi/model.py", line 61, in get_cached_btype
    BType = self.build_backend_type(ffi, finishlist)
  File "/usr/local/lib/python2.7/dist-packages/cffi/model.py", line 507, in build_backend_type
    base_btype = self.build_baseinttype(ffi, finishlist)
  File "/usr/local/lib/python2.7/dist-packages/cffi/model.py", line 525, in build_baseinttype
    % self._get_c_name())
cffi.api.CDefError: 'point_conversion_form_t' has no values explicitly defined: refusing to guess which integer type it is meant to be (unsigned/signed, int/long)

Partial docker:

FROM debian:8.6

# Configuration variables.
ENV DEBIAN_FRONTEND noninteractive
ENV GRAPHITE_VERSION master
ENV GUNICORN_VERSION 19.6.0

# Install tools and xmlstarlet to configure the Tomcat XML files.
RUN set -x \
    && apt-get update --quiet \
    && apt-get install --quiet --yes --no-install-recommends \
        # python
        gcc \
        python-dev \
        python-pip \
        python-ldap \
        python-django \
        python-twisted \
        python-django-tagging \
        python-simplejson \
        python-memcache \
        python-pysqlite2 \
        python-tz \
        # postgresql
        libpq-dev python-psycopg2 \
        # supervisor
        supervisor \
        # nginx
        nginx-light \
    && rm -rf /var/lib/apt/lists/*

# Install cairocffi.
RUN set -x \
    && pip install cairocffi

# Install whisper.
RUN set -x \
    && export PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" \
    && pip install "https://github.com/graphite-project/whisper/tarball/master"

# Install carbon.
RUN set -x \
    && export PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" \
    && pip install "https://github.com/graphite-project/carbon/tarball/master"

# Install graphine.
RUN set -x \
    && export PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/" \
    && pip install "https://github.com/graphite-project/graphite-web/tarball/master"

# Install gunicorn.
RUN set -x \
    && pip install gunicorn==$GUNICORN_VERSION

@obfuscurity
Copy link
Member

This is not a Carbon issue per se, but an upstream problem with pyOpenSSL. See pyca/pyopenssl#392 and pyca/cryptography#2501. You should be able to get around this by explicitly removing python-openssl (which IIRC is installed by something unrelated) or forcing it to use a newer version with the pyca fix.

@jack17529
Copy link

I too had this error , is there any work around , i am not able to do so.

@deniszh
Copy link
Member

deniszh commented Oct 22, 2016

@jack17529 : try to add

# Install pyopenssl
RUN set -x \
    && pip install pyopenssl

just before # Install cairocffi.

@devent
Copy link
Author

devent commented Oct 22, 2016

You can also just leave out python-twisted.
python-twisted pulls in python-openssl, which will break pyOpenSSL.
My Docker file was based on an outdated Graphite docker file from someone else.

@deniszh
Copy link
Member

deniszh commented Oct 22, 2016

But 'python-twisted` is required for carbon.

@devent
Copy link
Author

devent commented Oct 26, 2016

Here is my Dockerfile for reference. Works 100%. :)
https://github.com/devent/graphite_carbon_docker/blob/master/Dockerfile

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

4 participants