I am trying to run a python script on Jenkins - I already tried it in jupyter and it works fine there.
When I try running it in Jenkins, I don't get any error message unfortunately, I get an infinite wheel rotating.
The console output circle at the top is gray, and I get the following circling wheel:
Since I don't see any error message - I am not really sure where to start. I don't think it is a matter of being more patient since it takes ~5 minutes to run it all in Jupyter, but left it running overnight in Jenkins and the script still hadn't finished the next day. It isn't an authorization error, since I've had those before and I get an error message on what to fix.
In case this is relevant - the progress bar seems to be almost done, but in red:
Any ideas on what could be going wrong?
Related
Jenkins - Test Results Analyzer - Every recent test shows as FAIL even though it passed because the previous test run failed, Is there a way to show the latest test result? For example, I have a WDIO test that has 4 test cases - Test Case 4 in my Run number 1. Now, when I run again - say Run 2, the status for the entire script shows as 'FAILED' even though all the 4 test cases under it passed. So, is there a way we can show the latest/specific run status in the High level status? As this high level status says fail, even though all the scripts under it passed, does not give me a clear picture. Thanks and appreciate any help.
I tried the options in the Tools - Test results analyzer and still the same. I tried searching online too but not much anywhere on this issue. Thanks.
Sometimes, when one of our longer builds is running (around 2 hours), Jenkins will start displaying the "Jenkins is going to shutdown ..." message. And no, this has not been done by an admin (me).
When I last saw this, I checked the console output of the running job, and it was still churning through it's tests and was running normally. It was not hung.
Then later, I checked again, and the console had the "BUILD SUCCESSFUL" message, followed by "Pausing (Preparing for shutdown)" - and it just sat there.
So I clicked on the kill job button, and killed it. and got the "Aborted by ..." message.
Then 15 seconds later it displayed "Click here to forcibly terminate running steps". I did that. It then displayed "Terminating withAnt".
Then 15 seconds later, it displayed "Click here to forcibly kill entire build". Which I did - and Jenkins return to normal operation and cleared the "going to shutdown" message.
WHAT IS GOING ON!
One related note: Due to getting too much "state" bleedthrough on our JUNits, we recently added the forkmode="perTest" setting to the Ant JUnit task. This has resulted in random tests failing with a "vm exited unexpectedly" message. It happens randomly for different tests. (which is a PITA since we can no longer count on Test Failed status in jenkins meaning anything.) And no, I'm not sure if that has always happened when the Jenkins job has the termination problem.
Well, I think I figured this out.
The system was running low on disk space. So SOME jobs that used more were triggering this problem - and others would run without a problem.
When I finally received a low-disk space error in one of the logs, I did some cleaning (found a bunch of files that were supposed to have been deleted.). Since then, this error has stopped occuring.
NOPE! Still happening
I've created a scraper using watir/mechanize and chrome driver, it works perfectly in development.
It was not working in production, chrome driver was crashing, so I had to add those lines at the beginning of my scraper (found them on another topic on stackoverflow)
args = %w[--disable-infobars --disable-dev-shm-usage --headless --no-
sandbox --disable-gpu]
options = {
binary: ENV['GOOGLE_CHROME_BIN'],
prefs: { password_manager_enable: false,
credentials_enable_service: false },
args: args
}
browser = Watir::Browser.new(:chrome, options: options)
It now works great in production, even with my background job (I basically trigger the background job that is scraping by clicking on a button).
I also have another background job, a Cron job this time, which scrapes automatically once every two weeks.
But for some reason, this one does not work. I got the same error message I had before adding all the lines above
Selenium::WebDriver::Error::UnknownError: unknown error: Chrome failed
to start: crashed (unknown error: DevToolsActivePort file doesn't
exist)
(The process started from chrome location /app/.apt/o...)
Sometimes I don't get this error message and the scraper starts with the Cron job (without me changing anything) but it just can't locate the elements I want (whereas it works everytime with the other background job, not using Cron and it is the exact same content)
Do you have any idea why there is a different behaviour when I am using a Cron job?
I would understand if I had the same error everywhere, but I don't get why it is only crashing or struggling to find my elements only when I am using Cron.
And last question: why are my errors changing all the time? Usually, I fix something and it works for a very long time, but with Selenium/ChromeDriver it just seems I have to update my code every 3 days!
Thanks a lot!
I've been working for a few days on an electron application. When I was done working for the day yesterday, the program was working and running just fine. I came in this morning to start working on it again, and now all of a sudden partway through the program it just whitescreens now. I have not changed anything from the time of working on it last (last known working) to current time.
I do not see any errors being logged to the powershell console after running npm start (Program does not work packaged either), and when I use inspect element it just says:
DevTools was disconnected from the page.
Once page is reloaded, DevTools will automatically reconnect.
But it just sits on this white page forever.
This page has quite a lot of code (531 lines), but I am completely unable to pinpoint the problem because there are no errors logged. That said, I began taking pieces out of my code trying to get it to work, and I was able to narrow it down to the code below.
What can I do to fix my application?
This is the code I narrowed it down to, when I comment out this code, the page runs fine.
var audio = require('win-audio').speaker;
weirdly enough, this is one of the first pieces of code that I had written in this page of the application, and it has worked until just today.
I just found out that if I plug in some speakers, the program no longer whitescreens. But this isn't really a good fix, because this program will be ran on hundreds of computers a day that may or may not have speakers.
UPDATE::
Ok, I think I have fixed it. To try it out:
Download my fork at: https://github.com/11AND2/win-audio
In your terminal change dir (cd) into the directory e.g. "cd C:\...\win-audio"
run command "npm run install" - this rebuilds the module
To test it run "node sample.js" and activate/disable your audio devices
If at any point you want to check if the device is alive just run
var audio = require('win-audio').speaker;
var _vol_alive = audio.get();
if (_vol_alive === -999) {
console.log("this device is dead :-(");
}
in your application. Please note that I have not changed the API at all so there should be no need to change your application code.
Please give me a heads up if the fix works for you so I can create a pull request for the fix. I am not the creator of this plugin, all my changes are public domain.
DEPRECATED::
Ok, I have found a fix for you. Would it be ok if:
var audio = require('win-audio').speaker;
returns -1 if no device is found?
So you could do:
if (audio !== -1) {
audio.set(30);
}
Please give me a short heads up and I will post the implementation route.
I am running Jenkins from cmd, not as a service, because I need to do GUI testing. It works fine when I start it up and I can do everything I want. But I schedule a task around 4am. and when I come back Jenkins didn't last till 4am. From the console, it seems to just quit at 12am.
First I thought it's computer environment problem. But it still happens after I change my computer to never sleep, and I put the hard drive to never sleep as well. I locked my computer around 7pm. But it seems to continue running until 12am.
Any idea on what is happening?
Look at Jenkins logs. They're somewhere either in the directory where jenkins.jar was or in a subdirectoy, look for jenkins*out* and jenkins*err* files with right time stamp. I can't check exact location and names right now, sorry.
Seems you were running jenkins from C:\, congrats for cluttering your C drive root ;). To help clean it up, copy jenkins.war to C:\jenkins\ or something and run it again to see what all it creates under there, so you know what to clean up.
Also, running it from C drive root might have somehow interfered with some Windows maintenance task or something, which caused it to abort.