-
Notifications
You must be signed in to change notification settings - Fork 211
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
library conflict with docker version #132
Comments
hi @jchartrand. There are a few different ways to run cert-issuer from a docker container. Can you post what build command you used to build the container? |
@yancyribbens
I followed the instructions in the cert-issuer README.
So, for the docker container:
git clone https://github.com/blockchain-certificates/cert-issuer.git && cd cert-issuer
docker build -t bc/cert-issuer:1.0 .
docker run -it bc/cert-issuer:1.0 bash
And then to issue:
issuer=`bitcoin-cli getnewaddress`
sed -i.bak "s/<issuing-address>/$issuer/g" /etc/cert-issuer/conf.ini
bitcoin-cli dumpprivkey $issuer > /etc/cert-issuer/pk_issuer.txt
cp /cert-issuer/examples/data-testnet/unsigned_certificates/3bc1a96a-3501-46ed-8f75-49612bbac257.json /etc/cert-issuer/data/unsigned_certificates/
bitcoin-cli generate 101
bitcoin-cli sendtoaddress $issuer 5
cert-issuer -c /etc/cert-issuer/conf.ini
At which point I get the error.
I’ve been able to work around this by doing pretty much the same thing that the Docker file does for the merkletools/pysha library incompatibility — rewrite the offending dependency requirement to specify the newer library.
Here is how the Docker file rewrites the merketools dependency (from https://github.com/blockchain-certificates/cert-issuer/blob/43af5ffff2b62e518778e8259f4a234167e769eb/Dockerfile#L32):
sed -i.bak s/==1\.0b1/\>=1\.0\.2/g /usr/lib/python3.*/site-packages/merkletools-1.0.2-py3.*.egg-info/requires.txt
Which is also described in this issue:
#102
And so, for my case, I changed two files:
1. /usr/lib/python3.6/site-packages/connexion-2.2.0.dist-info/METADATA
Changing line 20 from:
Requires-Dist: jsonschema (<3,>=2.5.1)
to:
Requires-Dist: jsonschema (<3.0.2,>=2.5.1)
2. /usr/lib/python3.6/site-packages/openapi_spec_validator-0.2.6.dist-info/METADATA
Changing line 19 from:
Requires-Dist: jsonschema (<3)
to:
Requires-Dist: jsonschema (<3.2)
I could create a sed for each, add them to the Docker file (like is done for the merkletools incompatibility) and submit as a PR, but my guess is that someone who knows more about Python could instead install the right version of jsonschema to satisfy the <3 requirements of connexion and openapi_spec_validator. And, I’ve no idea what other problems I might have created by changing the library requirements. All I know is that I can now issue a certificate on regtest.
James
… On Mar 9, 2019, at 9:05 AM, Yancy Ribbens ***@***.***> wrote:
hi @jchartrand. There are a few different ways to run cert-issuer from a docker container. Can you post what build command you used to build the container?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@jchartrand thanks for the update. That would be great if you put in a PR to fix the existing Dockerfile, however, In general, that dockerfile is very old and outdated. You could instead use one of the newer docker files. The main reason I created the newer Docker files is that |
hi @yancyribbens , Thanks for your feedback. I have the same problem and I have the latest Dockerfile (not Dockerfile.web) but I still get the same error : bash-4.3# cert-issuer -c /etc/cert-issuer/conf.ini During handling of the above exception, another exception occurred: Traceback (most recent call last): Any feedback or suggestion is highly appreciated . Thanks |
Thanks for the reports, I ran into this myself too. Setting |
Okay this should do the trick if anyone wanted to review/validate real quick: #137 |
#132 - Forcing jsonscheme package to below 3.0 to remove dep conflict
Merged, if that doesn't fix the issuer, please open ticket back up. |
Hie AnthonyRonning thank you for the solution it worked but now I'm facing a problem when I issue my certificates using the regtest mode, there are no certificates in my blockchain directory may you please help. |
… to remove dep conflict
I've followed the instructions for running the cert-issuer from the docker container, and all is well until I actually invoke the 'cert-issuer' command, at which point I get an error (pasted below) that seems to suggest library incompatibilities, but I don't know enough about Python to fiddle with the dependencies. It seems like I need to either update connexion or install an earlier version of jsonschema. Any suggestions would be much appreciated.
bash-4.3# cert-issuer -c /etc/cert-issuer/conf.ini
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 583, in _build_master
ws.require(requires)
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (jsonschema 3.0.1 (/usr/lib/python3.6/site-packages), Requirement.parse('jsonschema<3.0.0,>=2.5.1'), {'connexion'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/cert-issuer", line 6, in
from pkg_resources import load_entry_point
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 3191, in
@_call_aside
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 3175, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 3204, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 585, in _build_master
return cls._build_from_requirements(requires)
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3.6/site-packages/pkg_resources/init.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (jsonschema 3.0.1 (/usr/lib/python3.6/site-packages), Requirement.parse('jsonschema<3.0.0,>=2.5.1'), {'connexion'})
bash-4.3#
The text was updated successfully, but these errors were encountered: