Elastic Beanstalk /ondeck not updating /current and still showing 404? - ruby-on-rails

I currently have a Rails 4.0.3 repo with Ruby 2.1.1. I am trying to deploy this on my EB environment. Everything seems to be working fine, no errors are thrown when I run:
eb start
git aws.push
But If I SSH into my server, I see that my /var/app/ondeck has not updated with my git repository even if I run git aws.push --environment myenv.
I see the current git revision hash on my dashboard when I aws.push, but the repo code never gets to the server...
The other issue is that fact that my /var/app/current is still empty. Any ideas?
After running a git aws.push, the only thing that gets logged is:
2014-04-02 05:45:02,567 [INFO] (5874 MainThread) [clearStaleLogPublishingRecords.py-38] [root clearStaleLogPublishingRecords main] Clearing stale log publish records publish log task with batch id ef7dd76a-ba29-11e3-bf20-12313913dae2
2014-04-02 05:45:02,568 [INFO] (5874 MainThread) [clearStaleLogPublishingRecords.py-48] [root clearStaleLogPublishingRecords main] Successfully cleared stale log publishing records
2014-04-02 05:50:01,874 [INFO] (5887 MainThread) [publishLogs.py-61] [root publishLogs main] Starting publish log task with batch id a1e453b6-ba2a-11e3-86ba-12313913dae2
2014-04-02 05:50:01,991 [INFO] (5887 MainThread) [publishLogs.py-86] [root publishLogs main] Log publication is disabled
After running eb update nothing gets put to the logs.
These also help describe the issue:
https://forums.aws.amazon.com/thread.jspa?messageID=336101
https://forums.aws.amazon.com/thread.jspa?messageID=357003
However, I have the latest command line eb, and have tried detaching the HEAD from the git repo and then checking out the master and pushing again, still no luck :(
Also tried "upload and deploy" a zip version from the control panel, nothing got updated.
2014-04-02 08:12:22,185 [ERROR] (1895 MainThread) [directoryHooksExecutor.py-34] [root directoryHooksExecutor error] Script failed with returncode 1
2014-04-02 08:12:22,246 [INFO] (1872 MainThread) [command.py-130] [root command execute] Command returned: (code: 1, stdout: Error occurred during build: Command hooks failed
, stderr: None)
2014-04-02 08:12:22,248 [DEBUG] (1872 MainThread) [commandWrapper.py-60] [root commandWrapper main] Command result: {'status': 'FAILURE', 'results': [{'status': 'FAILURE', 'config_sets': ['Infra-EmbeddedPreBuild', 'Hook-PreAppDeploy', 'Infra-EmbeddedPostBuild'], 'returncode': 1, 'events': [], 'msg': 'Error occurred during build: Command hooks failed\n'}], 'api_version': '1.0'}

I switched to a Ruby 2.0 running Rails 4.0.3 on the oregon datacenter (west-2), and it seems to be pushing fine. I do think it had something to do with a hook failing. For instance, if you have additional hooks or commands that require GIT, and git isn't installed on the server, it will fail silently or scream... That seems to have been what was going on here.

Related

How to fix springboot error Failed to retrieve RMIServer stub: javax.naming.CommunicationException error during JRMP connection establishment

I am having issue with springboot maven project and cassandra in docker.
I want to execute mvn verify and in pre-integration-test to start cassandra docker and api server, execute test and then in post-integration-test to stop server but I am facing error Could not contact Spring Boot application: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment;
I have created github repo so you can easily reproduce error.
Steps to reproduce:
git clone https://github.com/gandra/docker-cassandra-with-initial-seed.git
cd docker-cassandra-with-initial-seed
mvn verify
this will produce error like this:
[INFO]
[INFO] --- spring-boot-maven-plugin:2.2.2.RELEASE:start (api-server-start) # docker-cassandra-with-initial-seed ---
[INFO] Attaching agents: []
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.501 s
[INFO] Finished at: 2021-01-21T18:39:05+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.2.RELEASE:start (api-server-start) on project docker-cassandra-with-initial-seed: Could not contact Spring Boot application: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[ERROR] java.io.EOFException]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Any idea how to fix.
p.s.
I am working on mac and this solution would work on mac and linux as well.
Code https://github.com/gandra/docker-cassandra-with-initial-seed is fixed and now working.
Basically 2 thing are changed:
Removed port mapping 9001 from docker-cassandra.sh.
Added sleep 20 seconds in cassandra_start function in docker-cassandra.sh in order to give time cassandra to properly boot up. Not nice but at least working.
Now followiung code should work with 1 integration test executing successfully:
git clone https://github.com/gandra/docker-cassandra-with-initial-seed.git
cd docker-cassandra-with-initial-seed
mvn verify
If you are using Windows, there was an issue solved in 2020 that is a little bit tricky to find (here the complete thread on Github if you want to read the full story).
Just to recap, the solution is to fix the jmxPort. For example:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jmxPort>9011</jmxPort>
</configuration>
[...]
The problem here is that he tries to use a port that is already in use.
I had a similar problem with spring boot (not with cassandra).
Two ways i see to solving this:
First way:
Find the program that is using that port (in my case it was "Intel(R) Graphics Command Center" on port 9001). (you can use netstat /a /b in command prompt) or use tcpview (external free program)
disable the program
Profit
Second way
configuring the jmx port in your pom on the spring-boot-maven-plugin
(Answer from sixro)
BUT, i don't like this way because you basically force the others in your project to use your workaround, while the issue is on your machien.

Selenide / Jenkins: java.lang.IllegalStateException: No webdriver is bound to current thread:

I have some tests written in Selenide/Java.
Also I have local Jenkins on my Windows, tests are running under this Jenkins perfectly, but i have problem with tests from same repository running on external Jenkins (Linux)
Logs from Jenkins:
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running [1mTests[m
ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2
1491 [main] INFO com.github.javafaker.Faker - Using default locale en
Jul 08, 2019 2:36:49 PM com.codeborne.selenide.drivercommands.LazyDriver getAndCheckWebDriver
INFO: No webdriver is bound to current thread: 1 - let's create a new webdriver
Jul 08, 2019 2:36:49 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
2687 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver
3700 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Latest version of chromedriver is 76.0.3809.25
3704 [main] INFO io.github.bonigarcia.wdm.Downloader - Downloading https://chromedriver.storage.googleapis.com/76.0.3809.25/chromedriver_linux64.zip
4066 [main] INFO io.github.bonigarcia.wdm.Downloader - Extracting binary from compressed file chromedriver_linux64.zip
4194 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as /var/lib/jenkins/.m2/repository/webdriver/chromedriver/linux64/76.0.3809.25/chromedriver
Starting ChromeDriver 76.0.3809.25 (a0c95f440512e06df1c9c206f2d79cc20be18bb1-refs/branch-heads/3809#{#271}) on port 28990
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Jul 08, 2019 2:36:52 PM com.codeborne.selenide.drivercommands.LazyDriver getAndCheckWebDriver
INFO: No webdriver is bound to current thread: 1 - let's create a new webdriver
Starting ChromeDriver 76.0.3809.25 (a0c95f440512e06df1c9c206f2d79cc20be18bb1-refs/branch-heads/3809#{#271}) on port 30572
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[ERROR] [1;31mTests [0;1mrun: [0;1m3[m, [1;31mFailures: [0;1;31m3[m, Errors: 0, Skipped: 0, Time elapsed: 5.878 s[1;31m <<< FAILURE![m - in [1mTests[m
[ERROR] test001_logowanie_programs(Tests) Time elapsed: 3.105 s <<< FAILURE!
java.lang.IllegalStateException: No webdriver is bound to current thread: 1. You need to call open(url) first.
at Tests.test001_logowanie_programs(Tests.java:38)
[ERROR] test002_logowanie_evaluation(Tests) Time elapsed: 0.058 s <<< FAILURE!
java.lang.IllegalStateException: No webdriver is bound to current thread: 1. You need to call open(url) first.
at Tests.test002_logowanie_evaluation(Tests.java:50)
[ERROR] test003_fail(Tests) Time elapsed: 0.159 s <<< FAILURE!
java.lang.IllegalStateException: No webdriver is bound to current thread: 1. You need to call open(url) first.
at Tests.test003_fail(Tests.java:67)
[INFO]
[INFO] Results:
[INFO]
[ERROR] [1;31mFailures: [m
[ERROR] [1;31m Tests.test001_logowanie_programs:38 » IllegalState No webdriver is bound to cu...[m
[ERROR] [1;31m Tests.test002_logowanie_evaluation:50 » IllegalState No webdriver is bound to ...[m
[ERROR] [1;31m Tests.test003_fail:67 » IllegalState No webdriver is bound to current thread: ...[m
[INFO]
[ERROR] [1;31mTests run: 3, Failures: 3, Errors: 0, Skipped: 0[m
[INFO]
[ERROR] There are test failures.
Please refer to /var/lib/jenkins/jobs/nawa_selenide/workspace/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[JENKINS] Recording test results
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.071 s
[INFO] Finished at: 2019-07-08T14:36:56+02:00
[INFO] Final Memory: 31M/330M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/lib/jenkins/jobs/nawa_selenide/workspace/pom.xml to com/nawa/1.0-SNAPSHOT/nawa-1.0-SNAPSHOT.pom
channel stopped
Finished: UNSTABLE
On every test we have: java.lang.IllegalStateException: No webdriver is bound to current thread:
Do You have experience with similar situation?
Why on local machine tests are done correctly, but on main Jenkins in company there are only failures caused by No webdriver is bound to current thread?
Only operating system is difference.
This is problem with jenkins configuration under Linux?
When I run the tests locally, using Jenkins (with Maven), I get the same message, but the WebDriver is actually created and runs my test cases.
My maven goals are: mvn clean test -Puat
Declaration of Chrome in tests:
#BeforeClass
public void setUp() throws Exception {
Configuration.holdBrowserOpen = false;
Configuration.browser = "chrome";
Configuration.timeout = 10000;
Configuration.headless = true;
SelenideLogger.addListener("AllureSelenide", new AllureSelenide().screenshots(true).savePageSource(true));
objReader.environmentPropertiesLoader();
}
_______________edit
Now i check Start Xvfb before the build, and shut it down after in Jenkins job Build Environment, i read that is very important, maybe xvfb is the cause, i dont know, now in console i have
java.io.IOException: Cannot run program "Xvfb": error=2, No such file or directory
Did anyone answer? You need to call open Url as the error says.
driver.open(URL HERE) at the end of your setup method.
this is my solution:
after open(), store current webDriver, and before use - restore webDriver
WebDriver webDriver;
// constructor
public SelenideCommand() {
Configuration.holdBrowserOpen = true;
Selenide.open("https://www.instagram.com/");
webDriver = WebDriverRunner.getWebDriver();
}
public void login(String userName, String password) {
WebDriverRunner.setWebDriver(webDriver);
Selenide.element(Selectors.byName("username")).setValue(userName);
Selenide.element(Selectors.byName("password")).setValue(password);
Selenide.elements(Selectors.byTagName("button")).get(1).click();
}

Elasticbeanstalk Deployment Fails

I am trying to deploy a docker based environment that is using 1-1 application load balancer in AWS elasticbeanstalk. I am getting the below error message. It seemed to deploy very well before but for unknown reasons the new deploys fail.
2019-01-31 18:52:23 INFO Environment update is starting.
2019-01-31 18:53:03 INFO Deploying new version to instance(s).
2019-01-31 18:53:12 INFO Successfully pulled node:10.15.0
2019-01-31 18:57:34 INFO Successfully built aws_beanstalk/staging-app
2019-01-31 18:57:42 ERROR Failed to start nginx, abort deployment
2019-01-31 18:57:44 ERROR [Instance: i-0d4b3811324b90c27] Command failed on instance. Return code: 1 Output: nginx: [emerg] no host in upstream ":8080" in /etc/nginx/conf.d/elasticbeanstalk-nginx-docker-upstream.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
Failed to start nginx, abort deployment.
Hook /opt/elasticbeanstalk/hooks/appdeploy/enact/01flip.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2019-01-31 18:57:45 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2019-01-31 18:57:45 ERROR Unsuccessful command execution on instance id(s) 'i-0d4b3811324b90c27'. Aborting the operation.
2019-01-31 18:57:45 ERROR Failed to deploy application.
This issue was caused of an Uncaught error in my Node js application. Issue is not with Beanstalk.

Why does Jenkins hang when I try to build with the gradle-release plugin?

I set up the release plugin on my Grails project and successfully ran it on my localhost.
When I try to set up the same build in Jenkins, the build hangs indefinitely. The last thing in the output before it hangs is the checkCommitNeeded step.
Anything I can do to figure out what's going wrong?
I have set -Prelease.useAutomaticVersion=true and the two version params in switches, as mentioned in the plugin docs.
Update
On the researchgate Gitter, Christian Gonzalez mentioned that Jenkins is detecting another commit caused by the release plugin, and getting itself stuck in a loop. For Git, an additional behavior can be added to ignore changes committed by the plugin. However, my project is using SVN.
Update
Below is a snippet of the output from adding -d
11:12:48.907 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':checkCommitNeeded'.
11:12:48.908 [INFO] [org.gradle.api.Project] Running [svn, status] in [/var/lib/jenkins/jobs/MyTeam/jobs/MyProject/jobs/MyProject-release/workspace]
11:12:48.924 [INFO] [org.gradle.api.Project] Running [svn, status] produced output: []
11:12:48.926 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':checkCommitNeeded'
11:12:48.926 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :checkCommitNeeded (Thread[Daemon worker,5,main]) completed. Took 0.02 secs.
11:12:48.926 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry] Worker root.3 completed (0 in use)
11:12:48.926 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry] Worker root.4 started (1 in use).
11:12:48.926 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :checkUpdateNeeded (Thread[Daemon worker,5,main]) started.
11:12:48.927 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :myproject:checkUpdateNeeded
11:12:48.927 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':checkUpdateNeeded'
11:12:48.927 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':checkUpdateNeeded' is up-to-date
11:12:48.927 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Executing task ':checkUpdateNeeded' (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
11:12:48.927 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':checkUpdateNeeded'.
11:12:48.928 [INFO] [org.gradle.api.Project] Running [svn, status, -q, -u] in [/var/lib/jenkins/jobs/MyTeam/jobs/MyProject/jobs/MyProject-release/workspace]
11:12:51.477 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:12:51.479 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:12:51.480 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:12:51.481 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
11:13:01.477 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:13:01.477 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:13:01.478 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:13:01.480 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
11:13:11.477 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] DaemonExpirationPeriodicCheck running
11:13:11.477 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
11:13:11.477 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:13:11.479 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
...
The last 4 lines are repeated over and over.
I faced the same issue. For me, the reason was that I did the wrong setup configuration for the project. Example: wrong GitHub URL (without .git extension) added, incorrect Poll SCM config, etc.
Fix for me was to restart the Jenkins server & correct the changes under 'Manage' for your project & again build.

jhipster - error executing task :bower

I am having an issue building my app based off jhipster, using gradle. It fails on task :bower. The exact error I get is:
./gradlew bower --debug
20:23:46.154 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':bower'.
20:23:46.174 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'command 'node''. Working directory: /workplace/zupus Command: node /workplace/zupus/node_modules/bower/bin/bower install
20:23:46.174 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Environment for process 'command 'node'': {PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/jav a-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin, CMD_DURATION=7.19s, XAUTHORITY=/home/brendan/.Xauthority, __fish_help_dir=/usr/share/doc/fish, XMODIFIERS=#im=i bus, XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/, GDMSESSION=ubuntu, MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path, TEXTDOMAINDIR=/usr/share/locale/, GTK _IM_MODULE=ibus, DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-2jqL9U4Ofh, DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path, XDG_CURRENT_DESKTOP=Unity, SSH_AGENT_PID=2238, COLORTERM=gn ome-terminal, QT4_IM_MODULE=xim, UPSTART_SESSION=unix:abstract=/com/ubuntu/ups tart- session/1000/2169, SESSION_MANAGER=local/brendan-home:#/tmp/.ICE-unix/2337,unix/brendan-home:/tmp/.ICE-unix/233 7, LOGNAME=brendan, JOB=dbus, PWD=/workplace/zupus, IM_CONFIG_PHASE=1, DERBY_HOME=/usr/lib/jvm/java-8-oracle/db, LANGUAGE=en_US, WINDOWID=75497483, SHELL=/usr/bin/fish, __fish_bin_di r=/usr/bin, INSTANCE=, J2SDKDIR=/usr/lib/jvm/java-8-oracle, OLDPWD=/wor kplace/zupus, GNOME_DESKTOP_SESSION_ID=this-is-deprecated, J2REDIR=/usr/lib/jvm/java-8-oracle/jre, GTK_MODULES=overlay-scroll bar:unity-gtk-module, CLUTTER_IM_MODULE=xim, TEXTDOMAIN=im-config, XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0, COMPIZ_BIN_PATH=/usr/bin/, SESSIONTYPE=gnome-session , LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41: sg =30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*. taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;3 1: *.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*. deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpi o= 01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm= 01;35:*. pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.sv gz =01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.m kv=01;35:* .webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.a sf =01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl =01;35:*. dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx= 01 ;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3= 00;36:*. mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:, SSH_AGENT_LAUNC HE R=upstart, SHLVL=1, __fish_sysconfdir=/etc/fish, COMPIZ_CONFIG_PROFILE=ubuntu, QT_IM_MODULE=ibus, JAVA_HOME=/usr/lib/jvm/java-8-oracle, TERM=xterm, XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt , XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg, LANG=en_US .UTF-8, XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0, GNOME_KEYRING_CONTROL=/run/user/1000/keyring-k4czcd, XDG_S ES SION_ID=c2, SELINUX_INIT=YES, DISPLAY=:0, NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript, GDM_LANG=en_US, UBUNTU_MENUPROXY=1, XDG_ GR EETER_DATA_DIR=/var/lib/lightdm-data/brend an, DESKTOP_SESSION=ubuntu, GPG_AGENT_INFO=/run/user/1000/keyring-k4czcd/gpg:0:1, SESSION=ubuntu, USER=brendan, XDG_MENU_PREFIX=gnome-, VTE _V ERSION=3409, XDG_SEAT=seat0, SSH_AUTH_SOCK =/run/user/1000/keyring-k4czcd/ssh, NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat, QT_QPA_PLATFORMTHEME=appmenu-qt5, XDG_RUNTIME_DIR=/run/user/1000, XDG_VT NR =7, HOME=/home/brendan, __fish_datadir=/us r/share/fish, GNOME_KEYRING_PID=2165 }
20:23:46.175 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
20:23:46.175 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process start ed: command 'node'.
20:23:46.179 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
20:23:46.179 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are h a ndled...
20:23:46.179 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started proces s 'command 'node''
20:23:46.187 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
20:23:46.188 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'node'' fi nished with exit value 1 (state: FAILED)
20:23:46.188 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] F in ished executing task ':bower'
20:23:46.188 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :bower FAILED
20:23:46.189 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :bower (Thread[mai n,5,main]) completed. Took 0.036 secs.
20:23:46.189 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor ] Task worker [Thre ad[main,5,main]] finished, busy: 0.899 secs, idle: 0.001 secs
20:23:46.194 [ERROR] [org.gradle.BuildExceptionReporter]
20:23:46.194 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception .
20:23:46.194 [ERROR] [org.gradle.BuildExceptionReporter]
20:23:46.194 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
20:23:46.194 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':bower'.
20:23:46.195 [ERROR] [org.gradle.BuildExceptionReporter] > Process 'command 'node'' finished wit h non-zero exit value 1
20:23:46.195 [ERROR] [org.gradle.BuildExceptionReporter]
20:23:46.195 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
20:23:46.195 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
20:23:46.195 [LIFECYCLE] [org.gradle.BuildResultLogger]
20:23:46.196 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
20:23:46.196 [LIFECYCLE] [org.gradle.BuildResultLogger]
20:23:46.197 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 3.275 secs
I have a feeling it has to do with global vs local npm installs, but I'm scratching my head about how to fix it or even find the error. I'm hoping someone else can save me from more hours of frustration.
Thanks
Fixed this eventually, if anyone else stumbles across this the answer was that I had to uninstall node (i.e. sudo apt-get remove node) and leave nodejs in place. You should see this:
user#user /w/zupus> which node
/usr/bin/node
user#user /w/zupus> which nodejs
/usr/bin/nodejs
This is my quick and dirty fix on Mac OS:
I just ran npm install bower as sudo
sudo npm install -g bower
I used windows 7 and got this error. I was able to fix this issue by installing Git. Make sure that you close the current command prompt window and try again.
just do npm install bower in project root directory where bower.json file should present.

Resources