bcgov / aries-vcr

Hyperledger Aries Verifiable Credential Registry (VCR) is a set of application level software components designed to accelerate the adoption of trustworthy entity to entity communications.
Apache License 2.0
78 stars 67 forks source link

Create storage failed #469

Closed zbbgit closed 3 years ago

zbbgit commented 4 years ago

The log show "Create storage failed" when run ./manage start seed=my_unique_seed_00000000000000000 , so how to resolve this problem。

vcr-agent_1 | 2020-03-18 08:21:46,626 indy.libindy.native.indystrgpostgres ERROR src/lib.rs:190 | Create storage failed: IOError("IO error during storage operation: database error") vcr-agent_1 | 2020-03-18 08:21:46,628 aries_cloudagent.commands.start ERROR Exception during startup: vcr-agent_1 | Traceback (most recent call last): vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/wallet/indy.py", line 17 1, in create vcr-agent_1 | credentials=json.dumps(self._wallet_access), vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/indy/wallet.py", line 61, in create_walle t vcr-agent_1 | create_wallet.cb) vcr-agent_1 | indy.error.WalletStorageError vcr-agent_1 | vcr-agent_1 | During handling of the above exception, another exception occurred: vcr-agent_1 | vcr-agent_1 | Traceback (most recent call last): vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/commands/start.py", line 77, in init vcr-agent_1 | await startup vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/commands/start.py", line 27, in start_app vcr-agent_1 | await conductor.start() vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/core/conductor.py", line 141, in start vcr-agent_1 | public_did = await wallet_config(context) vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/config/wallet.py", line 16, in wallet_config vcr-agent_1 | wallet: BaseWallet = await context.inject(BaseWallet) vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/config/injection_context .py", line 126, in inject vcr-agent_1 | return await self.injector.inject(base_cls, settings, required=required) vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/config/injector.py", lin e 77, in inject vcr-agent_1 | result = await provider.provide(ext_settings, self) vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/config/provider.py", lin e 83, in provide vcr-agent_1 | self._instance = await self._provider.provide(config, injector) vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/config/provider.py", lin e 106, in provide vcr-agent_1 | instance = await self._provider.provide(config, injector) vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/wallet/provider.py", lin e 40, in provide vcr-agent_1 | await wallet.open() vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/wallet/indy.py", line 23 1, in open vcr-agent_1 | await self.create(self._auto_remove) vcr-agent_1 | File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aries_cloudagent/wallet/indy.py", line 18 1, in create vcr-agent_1 | raise WalletError(str(x_indy)) vcr-agent_1 | aries_cloudagent.wallet.error.WalletError vcr-agent_1 | } vcr-agent_1 | Shutting down

WadeBarnes commented 4 years ago

I'm assuming you're running into startup timing issues.

Look for the logs from the wallet container. Is it starting up before or after that agent container?

If you ./manage stop, and ./manage start seed=my_unique_seed_00000000000000000 after this error do things start up Ok?

zbbgit commented 4 years ago

I'm assuming you're running into startup timing issues.

Look for the logs from the wallet container. Is it starting up before or after that agent container?

If you ./manage stop, and ./manage start seed=my_unique_seed_00000000000000000 after this error do things start up Ok?

But i just do it as follow reference: https://github.com/bcgov/aries-vcr/blob/master/docs/create-new-credential-registry.md

1、git clone https://github.com/bcgov/von-network.git cd von-network ./manage build ./manage start

2、 git clone https://github.com/bcgov/aries-vcr.git indy-catalyst cd indy-catalyst/docker ./manage build ./manage start seed=my_seed_000000000000000000000123

swcurran commented 4 years ago

@zbbgit - Wade is agreeing that it should be working, but to determine if it is a timing issue, try re doing what you have done and when you get the error, ctrl-c to get to the command line and run the commands above to see if that eliminates the error. Because the first time would have done some of the initialization, it may shorten the timing, allowing things to come up cleanly. If that's not it, we keep look at what could be happening.

zbbgit commented 4 years ago

@zbbgit - Wade is agreeing that it should be working, but to determine if it is a timing issue, try re doing what you have done and when you get the error, ctrl-c to get to the command line and run the commands above to see if that eliminates the error. Because the first time would have done some of the initialization, it may shorten the timing, allowing things to come up cleanly. If that's not it, we keep look at what could be happening.

Thank you for your reply, i have tried the command many times, and no error show on the screen, but using the application :http://localhost:8080/, something is wrong :

vcr-api_1 | ERROR 2020-03-19 03:14:27,805 pysolr 114 140169214953216 Solr responded with an error (HTTP 502): [Reason: None] vcr-api_1 | Proxy error: 502 Server dropped connection.

The following error occurred while trying to access http://vcr-solr:8983/solr/credential_registry/select/?q=create_timestamp%3A%28%5B%222020-02-18T03%3A14%3A11.046693Z%22+TO+%2A%5D%29&fl=%2A+score&df=document&start=0&rows=1&fq=django_ct%3A%28api_v2.credential%29&wt=json:

Generated Thu, 19 Mar 2020 11:14:27 CST by Polipo on polipo:8123. vcr-api_1 | Failed to query Solr using 'create_timestamp:(["2020-02-18T03:14:11.046693Z" TO *])': Solr responded with an error (HTTP 502): [Reason: None] vcr-api_1 | Proxy error: 502 Server dropped connection. 502 Server dropped connection

The following error occurred while trying to access http://vcr-solr:8983/solr/credential_registry/select/?q=create_timestamp%3A%28%5B%222020-02-18T03%3A14%3A11.046693Z%22+TO+%2A%5D%29&fl=%2A+score&df=document&start=0&rows=1&fq=django_ct%3A%28api_v2.credential%29&wt=json:

Generated Thu, 19 Mar 2020 11:14:27 CST by Polipo on polipo:8123. vcr-api_1 | Traceback (most recent call last): vcr-api_1 | File "/home/indy/.pyenv/versions/3.6.8/lib/python3.6/site-packages/haystack/backends/solr_backend.py", line 138, in search vcr-api_1 | raw_results = self.conn.search(query_string, **search_kwargs) vcr-api_1 | File "/home/indy/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pysolr.py", line 742, in search vcr-api_1 | response = self._select(params, handler=search_handler) vcr-api_1 | File "/home/indy/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pysolr.py", line 437, in _select vcr-api_1 | return self._send_request('get', path) vcr-api_1 | File "/home/indy/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pysolr.py", line 412, in _send_request vcr-api_1 | raise SolrError(error_message % (resp.status_code, solr_message)) vcr-api_1 | pysolr.SolrError: Solr responded with an error (HTTP 502): [Reason: None]

WadeBarnes commented 4 years ago

Do you see any logs from vcr-solr indicting any startup issues or errors? Has vcr-solr full started when you are getting these errors?

WadeBarnes commented 4 years ago

@zbbgit, Did you ever resolve your issues?

esune commented 3 years ago

Closing this as issue has become stale.