Recently, if I do 2-3 builds in succession on Jenkins, my Karma task fails for the following reason:
Running "karma:jenkins" (karma) task
[32m13 02 2017 16:46:00.876:INFO [karma]: [39mKarma v1.3.0 server started at http://localhost:9018/
[32m13 02 2017 16:46:00.878:INFO [launcher]: [39mLaunching browser PhantomJS with unlimited concurrency
[32m13 02 2017 16:46:00.885:INFO [launcher]: [39mStarting browser PhantomJS
[32m13 02 2017 16:46:01.345:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: [39mConnected on socket /#lF481tq-G7blX6hpAAAA with id 85942733
[33m13 02 2017 16:46:11.346:WARN [PhantomJS 2.1.1 (Linux 0.0.0)]: [39mDisconnected (1 times), because no message in 10000 ms.
This is happening for me for both Karma: 1.3.0 AND 1.4.1. Same PhantomJS version on both builds. NPM version: 3.10.10
I've tried specifying the host, the address, and extending the timeout. I'm out of solutions, unfortunately.
Related
I try to run unit-tests on CI in my project, but for some reason, I get the error Please set env variable CHROME_BIN.
So, I add environment: - CHROME_BIN=/usr/bin/google-chrome, but it still doesn't work. I also try setting the browser to ChromeHeadless in the karma.config file by using config.set({browsers: ['ChromeHeadless']}). Does anyone have an idea what might be the issue?
Here is code of my test job:
test:
docker:
- image: cimg/node:16.19.0-browsers
environment:
- CHROME_BIN=/usr/bin/google-chrome
steps:
- checkout
- run: npm install
- run:
command: npm test
Here is error from CI:
#!/bin/bash -eo pipefail
npm test
> api-data#0.0.0 test
> ng test
- Generating browser application bundles (phase: setup)...
✔ Browser application bundle generation complete.
07 01 2023 23:22:42.949:WARN [karma]: No captured browser, open http://localhost:9876/
07 01 2023 23:22:42.959:INFO [karma-server]: Karma v6.4.1 server started at http://localhost:9876/
07 01 2023 23:22:42.959:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
07 01 2023 23:22:42.961:INFO [launcher]: Starting browser Chrome
07 01 2023 23:22:43.020:ERROR [launcher]: Cannot start Chrome
Can not find the binary /usr/bin/google-chrome
Please set env variable CHROME_BIN
07 01 2023 23:22:43.020:ERROR [launcher]: Chrome stdout:
07 01 2023 23:22:43.020:ERROR [launcher]: Chrome stderr:
I'm trying to use Lighthouse in GitLab CI to run a scan against a remote website after a deploy. The job keeps throwing an error.
My job configuration looks like this:
lighthouse:
stage: scan
image: markhobson/node-chrome
script:
- npm install -g lighthouse lighthouse-plugin-field-performance --unsafe-perm
- lighthouse $URL --plugins=lighthouse-plugin-field-performance --chrome-flags=”--headless --no-sandbox” --verbose
I've also tried with image: buildkite/puppeteer. In both instances I get a similar error when I try to invoke Lighthouse, which looks like this:
Wed, 09 Oct 2019 20:22:42 GMT ChromeLauncher:verbose created /tmp/lighthouse.KXhqWF0
Wed, 09 Oct 2019 20:22:42 GMT ChromeLauncher:verbose Launching with command:
"/usr/bin/google-chrome-stable" --disable-translate --disable-extensions --disable-background-networking --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-first-run --remote-debugging-port=44495 --disable-setuid-sandbox --user-data-dir=/tmp/lighthouse.KXhqWF0 about:blank
Wed, 09 Oct 2019 20:22:42 GMT ChromeLauncher:verbose Chrome running with pid 36 on port 44495.
Wed, 09 Oct 2019 20:22:42 GMT ChromeLauncher Waiting for browser.
Wed, 09 Oct 2019 20:22:42 GMT ChromeLauncher Waiting for browser...
Wed, 09 Oct 2019 20:22:43 GMT ChromeLauncher Waiting for browser.....
Wed, 09 Oct 2019 20:22:43 GMT ChromeLauncher Waiting for browser.......
Wed, 09 Oct 2019 20:22:44 GMT ChromeLauncher Waiting for browser.........
Wed, 09 Oct 2019 20:22:44 GMT ChromeLauncher Waiting for browser...........
etc
Wed, 09 Oct 2019 20:23:07 GMT ChromeLauncher:error connect ECONNREFUSED 127.0.0.1:44495
Wed, 09 Oct 2019 20:23:07 GMT ChromeLauncher:error Logging contents of /tmp/lighthouse.KXhqWF0/chrome-err.log
Wed, 09 Oct 2019 20:23:07 GMT ChromeLauncher:error
(google-chrome-stable:36): Gtk-WARNING **: cannot open display:
[1009/202244.656645:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
Unable to connect to Chrome
I'm not entirely sure what I need to do at this point. I'm questioning whether or not to try a more basic node image and try installing what I need manually, which I tried originally and found that managing Chrome/Chromium with Lighthouse was not quite as straight-forward as I wanted. Any thoughts or suggestions?
You could try using this image which has both everything installed ready to execute a report https://hub.docker.com/r/femtopixel/google-lighthouse/
Trying to upgrade local Neo4j instances and getting errors on start.
Ubuntu 16.04: Trying to upgrade local instances of Neo4j databases which are currently at 3.3.1.
Installed Neo4j Desktop thinking I could do it with that and found the lowest version it upgrades from is 3.4. I now can't remove that. Ubuntu software fails (I just click remove, restart and Neo4j Desktop is still there). dpkg --list doesn't list neo4j desktop, so I can't use "apt-get remove" to remove it.
Uninstalled 3.3.1 and installed 3.3.9 (latest version of 3.3.x). Started Neo4j and ran fine, updating the database stores to 3.3.9.
Uninstalled 3.3.9 and installed 3.5.7.
Expecting Neo4j to start normally with "sudo service neo4j start", but now getting the following:
neo4j.service - Neo4j Graph Database
Loaded: loaded (/lib/systemd/system/neo4j.service; disabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Tue 2019-07-09 14:00:22 BST; 58s ago
Process: 1417 ExecStart=/usr/share/neo4j/bin/neo4j console (code=exited, status=1/FAILURE)
Main PID: 1417 (code=exited, status=1/FAILURE)
Jul 09 14:00:22 doug-ubuntu systemd[1]: neo4j.service: Main process exited, code=exited, status=1/FAILURE
Jul 09 14:00:22 doug-ubuntu systemd[1]: neo4j.service: Unit entered failed state.
Jul 09 14:00:22 doug-ubuntu systemd[1]: neo4j.service: Failed with result 'exit-code'.
Jul 09 14:00:22 doug-ubuntu systemd[1]: neo4j.service: Service hold-off time over, scheduling restart.
Jul 09 14:00:22 doug-ubuntu systemd[1]: Stopped Neo4j Graph Database.
Jul 09 14:00:22 doug-ubuntu systemd[1]: neo4j.service: Start request repeated too quickly.
Jul 09 14:00:22 doug-ubuntu systemd[1]: Failed to start Neo4j Graph Database.
Jul 09 14:00:22 doug-ubuntu systemd[1]: neo4j.service: Unit entered failed state.
Jul 09 14:00:22 doug-ubuntu systemd[1]: neo4j.service: Failed with result 'start-limit-hit'.
Checked that I am running JVE 1.8:
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-0ubuntu1.16.04.1-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)
Unsure how to proceed. Any ideas welcome please. Thank you!
Found the answer by running "journalctl -e -u neo4j" to view the full error log. Turns out that it was an APOC jar that was installed for 3.3.x but not compatible with 3.5.x. Removing the jar file solved it.
I had scheduled pulling in Jenkins every 5 minutes: */5 * * * *.
I committed changes to SVN, I can see them in SVN history (logs).
Jenkins starting the build, but it shows: Revision: x
No changes. And everything what was configured is running.
After 5 minutes Jenkins starts another run, with message: Revision: x+1
Changes
just for test Jenkins deploy (detail)
by UserName
After, for test purposes I have changed to * * * * * to run every minute, and the results were such:
Jenkins runs:
Success > Console Output#176 Nov 29, 2018 2:14 PM
Success > Console Output#175 Nov 29, 2018 2:13 PM
Success > Console Output#174 Nov 29, 2018 2:11 PM
Success > Console Output#173 Nov 29, 2018 2:10 PM
Success > Console Output#172 Nov 29, 2018 2:09 PM
Success > Console Output#171 Nov 29, 2018 2:08 PM
Success > Console Output#170 Nov 29, 2018 2:07 PM
Success > Console Output#169 Nov 29, 2018 2:06 PM
---Commit goes here
Success > Console Output#168 Nov 29, 2018 1:01 PM
from 2.06 he see that there is changes, he run job, but it really didn't see what changes was there, and only at 2:14 it wrote SVN commit message.
also in Recent Changes logs:
Changes
176 (Nov 29, 2018 2:14:19 PM)
just for test Jenkins deploy — UserName / detail
168 (Nov 29, 2018 1:01:36 PM)
It is strange behavior, could someone have idea, where could be the issue?
Based on the conversation, We have found out the culprit was the Time Difference of the 2 servers(Jenkins and SVN) approx 7-8 mins was the issue.
Why does this happen ?
Jenkins realized that a new version was available, but couldn't check it out
as long as its own time was smaller than the new versions time.
A similar issue is described here:
Why up-to-date files committed to SVN will not be immediately pulled out by Hudson to build
I have an app setup with Rails 3.1, Mongo 1.4.0, Mongoid 2.2.4.
What I am experiencing is this:
Mongo::ConnectionFailure: Failed to connect to a master node at localhost:27017
I've had this problem before, but it went away on a computer restart... this time it does not.
I don't understand, I didn't do anything. I just put my computer in sleep mode, went home and woke it up, then there it was.
Here is the output of sudo mongod
Fri Nov 25 21:47:14 [initandlisten] MongoDB starting : pid=1963 port=27017 dbpath=/data/db/ 64-bit host=xxx.local
Fri Nov 25 21:47:14 [initandlisten] db version v2.0.0, pdfile version 4.5
Fri Nov 25 21:47:14 [initandlisten] git version: 695c67dff0ffc361b8568a13366f027caa406222
Fri Nov 25 21:47:14 [initandlisten] build info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Fri Nov 25 21:47:14 [initandlisten] options: {}
Fri Nov 25 21:47:14 [initandlisten] journal dir=/data/db/journal
Fri Nov 25 21:47:14 [initandlisten] recover : no journal files present, no recovery needed
Fri Nov 25 21:47:15 [websvr] admin web console waiting for connections on port 28017
Fri Nov 25 21:47:15 [initandlisten] waiting for connections on port 27017
And I am able to connect with mongoin terminal.
After 2 hours of Googling I hope the competence of SOs community are able to figure this out.
Please, if you need more information about my app-setup just ask.
Thanks!
What you see is that the connection times out... that happens either after a long period of inactivity, or if you put your computer to sleep.
You can change / increase the timeout value, but this way you can't get rid of the connection timing out eventually.
Some MongoDB drivers allow to set :timeout => false , but Mongoid seems to still have problems with that
(see last 3 links in the list)
Hope this helps.
See also:
Mongodb server goes down, how to prevent Rails app from timing out?
MongoDB: What is connection pooling and timeout?
https://github.com/mongodb/mongo-ruby-driver
How can I query mongodb using mongoid/rails without timing out?
http://groups.google.com/group/mongoid/browse_thread/thread/b5c94e7047b42f8a
https://github.com/mongoid/mongoid/issues/455
Try to change localhost to 127.0.0.1!