Error when running 'embark run' - ethereum

When run the command 'embark run'. I got the error message:
Running "deploy_contracts:development" (deploy_contracts) task
Warning: ==== can't connect to localhost:8101 check if an ethereum node is running Use --force to continue.
Error: ==== can't connect to localhost:8101 check if an ethereum node is running
Could you please give me some help about it?

Before you can run embark, you have to run an ethereum rpc simulator, simply run:
$ embark simulator
Or Alternatively, you can run a REAL ethereum node for development purposes:
$ embark blockchain
By default embark blockchain will mine a minimum amount of ether and will only mine when new transactions come in. This is quite usefull to keep a low CPU. The option can be configured at config/blockchain.yml
You will see a geth node starting in the terminal. Then, open another terminal and type:
$ embark run
This will automatically deploy the contracts, update their JS bindings and deploy your DApp to a local server at http://localhost:8000
Note that if you update your code it will automatically be re-deployed, contracts included. There is no need to restart embark, refreshing the page on the browser will do.
See also newest embark tagged questions on Ethereum Stack Exchange for future reference.

In your embark project directory:
run $ embark blockchain and leave this running on your terminal.
Open a new terminal, cd <yourProject> and run $ embark run
You will now be up and running on your local host at http://localhost:8000

Related

truffle migrate --network "name_of_my_network" is hanging forever

I'm trying to migrate my new truffle configs to test a smartcontract in a private network. But when I try to migrate it, I get stuck here:
1_initial_migration.js gets hanging on "Replacing Migrations" forever
Can somebody please help me solving it?
I think I've had this problem. I suspect Ganache is in a bad state. And I swear truffle doesn't incrementally build correctly sometimes. So when in doubt, fully restart Ganache, rebuild with --all and redeploy with --reset .
That is:
Exit Ganche
Check Task Manager, ps, or equivalent and terminate all rogue instances of Ganache that might still be running. Ganache tends to start several child processes. So make sure they aren't lingering around before you restart it.
Restart Ganache with a new workspace.
Recompile with this: truffle compile --all
Redeploy with: truffle deploy --reset
Weird bugs tend to go away when I completely do a full reset as described by these steps. In on case, I just rebooted because port 7575 was locked by something.

gitlab ci shell runner reports profile loading problem

I'm trying to setup the gitlab ci shell runner. I've used the docker runner before successfully but now I'd like to use another docker container within my testing routine and therefore switched to the shell runner.
After registering I'm running into an exception:
ERROR: Job failed (system failure): prepare environment: exit status 1. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
So, I went through the linked material but that didn't cure the problem. Now, I verified that the gitlab-runner user exists and it has access to docker (needed to run the docker test container). Also the gitlab-runner user is part of the docker group. I can also --login, fire up the /bin/bash without problems.
Still, all I get from the runner side is the the enigmatic message above. What other checkups to I need to do to track down this issue?
The careful reader will find the answer:
"A common failure is when you have a .bash_logout that tries to clear
the console."

Elastic Beanstalk stops at EbExtensionPostBuild

I am having a problem deploying an EB instance with a custom .ebextensions file. This is the relevant part in that file:
container_commands:
01_migrate:
command: 'python db_migrate.py'
02_npm_build:
command: 'npm install && npm run prod'
As you can see, these commands are for migrating my PostgreSQL database (via a Flask backend) and building my React .jsx files.
If I leave these commands out, the deployment completes perfectly well. However, once I put them in, looking at the eb-activity.log it stalls at this part forever (as far as I can tell):
[2017-04-10T02:39:24.106Z] INFO [3023] - [Application deployment app-613e-170409_223418#1/StartupStage0/EbExtensionPostBuild] : Starting activity...
I also get this message on the Health overview in the console (this is after 1 day):
Performing application deployment (running for 1 day).
I have also tried to deploy it without those container_commands, and then including it back after the successful initial deployment. Then I get the same error message as before in eb-activity.log, and I also get this message on the Health overview:
Incorrect application version "app-2a3d-170409_214923" (deployment 1). Expected version "app-2a3d-170409_214923" (deployment 1).
Which is very strange because those two versions referenced are the same versions. I don't know what this means!
I found a solution.
Remove all you container_commands from .ebextensions/
Go ssh to instance, kill process with.
sudo killall python
Then Deploy new version without container_commands.
And start debuging all your container_commands, one by one on ssh..
Have fun.

Truffle migrate Server Error (on truffle init demo)

I'm a DAPP beginner, and am trying to get up and running with the Truffle framework. I've been walking through the Truffle docs, but it doesn't work out of the box for me.
Create directory, cd into it, and run 'truffle init'
Run 'truffle compile'
Run testrpc in a second terminal window, same project directory
Run 'truffle migrate'
This is the error I get from truffle:
Running migration: 1_initial_migration.js
Deploying Migrations...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: Server error
at Object.module.exports.InvalidResponse (/usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/errors.js:35:16)
at /usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/requestmanager.js:86:36
I get this with Node v5 & v6.
Truffle v2.1.1.
Web3 and ether-pudding are installed as truffle dependencies.
TestRPC/0.8.7/darwin/python2.7.12.
Thanks for the help-
Are you sure you did run testrpc in a second window and let it run? This is important as testrpc in that case is yoir blockchain. If it does not run you will get similar errors as what you describe.
To keep it simple, I also suggest as a start that you do not run another client while running testrpc (geth, parity, mist, ... )
So in short, do a reboot, start testrpc, make sure it does not display errors, then run the truffle migrate command while testrpc still runs in the background.
Truffle migrate does run correctly. I've reposted my issue with testrpc here:
Testrpc error: 'no loggers could be found for logger 'jsonrpc.manager'

Jenkins doesn't launch the application under test on chromebrowser

I ran into an issue with Jenkins which I've never seen before and I thought I'll get some advice. Jenkins wouldn’t launch the AUT on the chrome browser for running selenium tests.
Steps that I followed:
A Jenkins Master and Slave are setup on the same machine. Not as a windows service, but I launch them manually via command prompt
I setup a project on the Slave node with 2 build steps. One for the MSBuild (I dowloaded the plugin) to build the solution and the second step for executing the windows batch command that will start the tests
I also have a TFS plugin to fetch the server version of the solution to build on Jenkins
So when I build the job on Jenkins Slave,
The solution gets built successfully without any errors
Then for the next build step, Jenkins executes the windows batch command and loads the .dll file. Says “starting execution..”
Chromedriver launches. It opens up the chrome browser
But the chrome browser wouldn’t launch the AUT. It just tries to load it and stays intact indefinitely until my Jenkins job times out
With all this happening, my CPU utilization is at 100%. The browser that runs the Jenkins UI on the local host and Java.exe*32 consumes it to the fullest
I ran the exact same MSTest.exe command (that I entered in the build step) in command prompt when Jenkins is not running and it launches the AUT successfully and tests ran
I ran the exact same MSTest.exe command (that I entered in the build step) in command prompt when Jenkins is running. It again spikes the CPU to 100% and AUT never launches
Any thoughts?
I was also running into this issue and solved it as follows.
Basically the jenkins slave has to be started from the startup through a batch job.
Here is the step by step process.
Node URL : http://host:port/computer/nodeName/
Go to the node "Node URL"
Click on "Mark this node temporarily offline"
Go the the machine where slave is running.
Open command prompt in admin mode.
cd to the location where jenkins is installed
Execute jenkins-slave uninstall
Go to services (type services in run) and stop the jenkins slave running
Restart the machine.
cd C:\Users\myUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Create a new batch job (name say LaunchJenkinsSlave.bat) with following content
>
java -jar C:/Jenkins/slave.jar -jnlpUrl http://host:port/computer/nodeName/slave-agent.jnlp -secret yourSecret
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes
<<
fyi : You can refer jenkins-slave.xml in your Jenkins install location for yourSecret, nodeName, host ect if you forgot.
Restart your machine.
Observation : Jenkins slave will be started automatically
12. Go to the "Node URL"
and bring the node back online.
Hope this helps.