Strapi v4 + Postgres + heroku = Error “Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?” - strapi

I get this error when I run npm run develop command .

Related

Browsershot not wroking on Laravel queue

I have an issue where as I am taking screenshots of responses using Browsershot which works fine when using dispatchSync. But as soon as I switch over to dispatch and use the queue (redis) the jobs fail with the following output;
Working directory: /var/www/html
Output:
================
Error Output:
================
Error: Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT
I might also mention this is running through a Docker container.

Circle Ci - Start react server and test via cypress

I'm running cypress on a server started in cirleci script. Though cypress can't seam to find the local server that I just started. Here's my scripts / setup. I've also tried the cypress circlci-orb and get the same error, so was trying run things myself to help debug. Here's the script details:
- run:
name: 'Run app tests'
command: |
cd app
yarn install --frozen-lockfile
yarn lint
yarn cypress:ci
package.json script:
"cypress:ci": "CYPRESS_BASE_URL=http://localhost:3000 yarn start & wait-on http-get://localhost:3000 && cypress run"
Error:
$ craco start
ℹ 「wds」: Project is running at http://192.168.208.3/
ℹ 「wds」: webpack output is served from
ℹ 「wds」: Content not from webpack is served from /root/project/app/public
ℹ 「wds」: 404s will fallback to /
Starting the development server...
.....
react startup output
......
Cypress tests are kicked off and get the following error
We attempted to make an http request to this URL but the request failed without a response.
We received this error at the network level:
> Error: connect ECONNREFUSED 127.0.0.1:3000
The solution: Up your resource class! In your circleci/config.yml
jobs:
continuous-integration:
resource_class: large
It was non obvious as there were no memory/resource warnings, but according to the circle ci team:
When the machine runs out of memory processes are killed which could include the server.
That server was the cra-server i was trying to start. I upped the resource class and voilà it ran and was found by cypress! In our case we bumped it from a medium to a large class, but may be different for you.
Here's the available resource classes you can use:
https://circleci.com/product/features/resource-classes/

"Error trying to start business network. Error: No valid responses from any peers." in hyperledger-composer

Afer using hyperledger-composer for several months, now suddenly the following problem is happening:
Whenever I want to start a business network, using the command:
composer network start --networkName mynetwork --networkVersion 0.0.1 --card PeerAdmin#hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw
... I get (after waiting for an eternity) the following error message:
Error: Error trying to start business network. Error: No valid
responses from any peers. Response from attempted peer comms was an
error: Error: REQUEST_TIMEOUT Command failed
I uninstalled the whole hyperledger-composer development environment and then reinstalled everything. I still get the same error message.
Does anybody know what the hell is going on here?
P.S.: here's the result of running "composer archive list -a mynetwork#0.0.1.bna":
Listing Business Network Archive from mynetwork#0.0.1.bna
Identifier:mynetwork#0.0.1
Name:mynetwork
Version:0.0.1
Ok, I re-installed the developer environment again AND restarted my computer. Now it works again.

Composer-Rest-Server not connecting

I am testing a a business network I created, I ran the Composer-rest-server and all worked fine, then shut the server as suggested in the developers guide , then I proceeded use the yo hyperledger composer to create the skeleton of the angular app, however, now the angular app is showing in the local browser, however, the composer-rest- server is not.
Expected Behavior:
I should start the composer-rest- server in localhost:3000 and the angular app as well
Actual Behavior:
I get this message;
scovering types from business network definition ...
Connection fails: Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
It will be retried for the next request.
Exception: Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
at _checkRuntimeVersions.then.catch (/home/node/.nvm/versions/node/v6.11.2/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:696:34)
Your Environment
composer-cli#0.11.3
generator-hyperledger-composer#0.11.3
composer-rest-server#0.11.3
Docker version 17.06.0-ce, build 02c1d87
docker-compose version 1.13.0, build 1719ceb
The Problem
If you kill your fabric instance using ./stopFabric that you started using the ./startFabric command then all the containers that were apart of the business network were killed as well and therefore you need to reinstall the .bna and start the network again. (the development flow provided is purposely volatile for rapid development)
The Solution
1.) Type docker ps to see all of your running containers. You should see none if you are getting that error because your peer is not responding to pings
2.) Open a separate terminal and navigate to where you have fabric-dev-servers in the terminal and run ./fabricStart. This will start all the containers like your network Certificate Authority, the peer, the orderer, etc.
3.) Return to your project in another terminal. Do Step 1 & 2 found at the developer tutorial (you likely won't need to do step 3 since you likely already imported the network administrator identity going through the tutorial)
4.) Run composer network ping --card admin#tutorial-network. The ping should go through.
5.) Run docker ps. You should see 4 containers running
6.) Run composer-rest-server and follow the steps from the tutorial.
7.) Run cd tutorial-network-app to switch to where your angular application is (or wherever you generated it with the yo command)
8.) Navigate to http://localhost:3000 and everything should work.
Any other questions or problems just reply here and I can help.
The expected behaviour is that the REST server is already running (the the generator uses Loopback to spin up a REST server already (that's why you shut down the previous REST server)). Its described here https://hyperledger.github.io/composer/unstable/tutorials/developer-guide.html under 'Generate your Skeleton Web Application'.
After you created the application - following completion of the yo hyperledger-composer questions (and after providing the answers) you run your application using npm start from within the generated application directory. Your app is accessible at http://localhost:4200.

composer-rest-server doesnt connect (failed to obtain cds for digitalproperty-network)

Installed playground with the steps from:
Using playground locally
Trying for 2 days now to get the composer-rest-server starting.
Steps done:
Changed all the ca/peer/orderer urls from "localhost" to their specific docker IPs in the ~/.composer-connection-profiles/hlfv1/connection.json, otherwise i just get a connection timeout when starting the composer-rest-server
Deployed the "digitalproperty-network" with composer
Got myself a new identity via composer and the secret
Now when i run:
> composer-rest-server -p hlfv1 -n digitalproperty-network -i baderth -s omgDBCimVAbB -N always
Im just getting:
Discovering types from business network definition ...
Error: failed to obtain cds for digitalproperty-network - transaction
not found digitalproperty-network/mychannel
at /usr/lib/node_modules/composer-rest-server/node_modules/fabric-client/node_modules/grpc/src/node/src/client.js:434:17 code: 2, metadata: Metadata { _internal_repr: {} } }
Same error also shown in the latest file in the /logs directory.
I have no clue what "transaction not found digitalproperty-network/mychannel" means and what i should provide the rest server with if not the digitalproperty-network, which i deployed.
You should follow the install instructions for setting up a Development Environment, and then the Developer Guide:
https://hyperledger.github.io/composer/installing/development-tools.html
https://hyperledger.github.io/composer/tutorials/developer-guide.html

Resources