Gradle Daemon doesn't start properly and fills up the whole memory - gradle

A while ago, I noticed that If I leave my pc open for a bit (Until the gradle daemon terminates timeouts), IntelliJ keeps trying to start a new instance of Gradle. Thus,
I have to restart my whole machine..
Getting Spammed With this:-
Last gradle process just crashes with the error: Address already in use: Cannot bind.
And now gradle is all over my pc:-

Check your network configuration. Such an issue usually occurs when there is firewall/antivirus or sometimes VPN connection may re-configure the network setup on machine. See case 1 and case 2.

Related

allow OS shutdown to timeout without failing Packer build

I have an OS which doesn't shut down properly when I run it in one particular hypervisor (KVM) even though it works on all other hypervisors. Instead, what it does is sync all data to disk and then hang indefinitely with the message "Hit any button to reboot" until you issue a hard shutdown from the hypervisor.
I'm trying to automate a no-touch installation of this OS from an .iso file into a .box file using Packer. However, the Packer run fails every time because it hits the shutdown_timeout (from the QEMU builder) while the OS is hung waiting for input. I'm looking for a workaround -- it seems like either of the following could work (and maybe there are other ways), but I can't figure out any way to do them! Some ideas I've searched for were:
tell Packer to do a hard shutdown after a certain amount of time
tell Packer that hitting this timeout isn't an error and it should just do a hard shutdown and continue with the provisioner steps
Upon rereading the docs, I found the answer:
shutdown_command (string) - The command to use to gracefully shut down the machine once all the provisioning is done. By default this is an empty string, which tells Packer to just forcefully shut down the machine.
D'oh!

Running Redis on Windows as service

I have followed all the suggestions I can find.
I am running the current version on redis on windows 2008
I can run fin from command line
I can install the service but it doesnt run
I do...
redis-server --service-install redis.windows.conf
and get "redis successfully installed as a service"
Then I try to start the service doing...
redis-server --service-start redis.windows.conf --loglevel verbose
and get Redis service failed to start
I have made sure I have the .net framework 4.5.2 installed, I have tried with the firewall off and have played with security on the folder.
Anyone have any ideas?
(Merry Christmas all)
Start redis server from the command line instead of as a service and it will display a more useful error message. If you are just using the default configuration it is most likely a problem with the maxmemory/maxheap configuration.
C:\redis>redis-server.exe redis.windows.conf
[1576] 04 Feb 10:32:54.172 #
The Windows version of Redis allocates a memory mapped heap for sharing with
the forked process used for persistence operations. In order to share this
memory, Windows allocates from the system paging file a portion equal to the
size of the Redis heap. At this time there is insufficient contiguous free
space available in the system paging file for this operation (Windows error
0x5AF). To work around this you may either increase the size of the system
paging file, or decrease the size of the Redis heap with the --maxheap flag.
Sometimes a reboot will defragment the system paging file sufficiently for
this operation to complete successfully.
Please see the documentation included with the binary distributions for more
details on the --maxheap flag.
Redis can not continue. Exiting.
In my case the default commandline config did not have logging enabled and the service one did. And no place where it complains about that.
Try creating the directory ./Logs.
Old question, but I came across it while trying to get a Win7x64 install working using binaries Redis-x64-2.8.2101. Couldn't get it to start despite fiddling with various options, no meaningful error given when run with the config, and only an apparently spurious disk space error when run natively.
There appears to be a issue on the github related, linked here for future benefit: https://github.com/MSOpenTech/redis/issues/267

SonarQube server won't start

I've been using SonarQube for a year now and once I had been through all the installation process, I never got any problem... Until now.
I'm just trying to analyze a Maven Project (like I did several times before). To do so, I need to run the server first (port 9000). But when I launch "StartSonar.bat" (I'm on Windows), I get a huge log and finally the wrapper stops.
I think there is something wrong with the port 9000 although I'm not sure because I'm not that advanced with analysing logs and everything.
Here's a link to download the log I get
Thanks for your help!
The log states "Address already in use: bind" which means that some other tool already runs on that port. Choose another one should already do the trick.
Or there is a zombie-process still running (no clean shutdown). But you should see a process in the task manager - just kill that one. Usually a reboot should solve that too.
Run netstat -abo on the Windows command line to see which ports are used, by which programs they are used and their process IDs (PID). With the PID you can find the process in Task Manager and kill it there if necessary.

TeamCity\Selenium\Watir-Webdriver - Element location errors when running on Build Agent

I've been having a persistent reliability issue when running Cucumber\Watir-Webdriver (Ruby) tests on a TeamCity build agent.
When running the 96-step suite against the CI web app server from a local machine, all tests run green, but running the same tests against the same environment using a Build Agent produces a rash of intermittent errors such as:
Selenium::WebDriver::Error::NoSuchElementError: Unable to locate element:
Using the WW and PageObject waiting methods just produces intermittent timeouts such as:
Watir::Wait::TimeoutError: timed out after 30 seconds
It's incredibly hard to debug this as it's an intermittent problem with a lead time of about 20 minutes for feedback. In order to improve it, we've upped the RAM on the build agent's host and increased the heap memory available to the Build Agent's process to 4G using the TEAMCITY_SERVER_MEM_OPTS environment variable. This doesn't seem to have helped.
Is it running at the same resolution?
My team ran into an issue where the build server was running at a different (smaller) resolution than our machines, so it would fail to find an element due to the smaller resolution. The element would be outside the browser window.
We solved this by setting the browser's size to a specific value every time the driver is created so if it would fail on the build machine it would fail on ours as well.

Killing processes on Windows 7

I'm debugging plugins on Windows 7 and of course the plugin host (Cubase5.exe) occasionally crashes because of errors in the plugin. On XP or Vista, I could always restart it immediately and continue working. But on Windows 7, even though Cubase appears to close, it is still visible in Task Manager and I cannot kill it by any means. After a minute or two, it disappears by itself. In the mean time, I can't work because the plugin DLL is still locked by the process.
Does anyone know why this happens on Windows 7? I've already tried disabling Automatic Error Reporting but that didn't help. I've tried attaching cdb to Cubase, but I get:
Cannot debug pid 5252, NTSTATUS 0xC0000001
"{Operation Failed} The requested operation was unsuccessful."
Debuggee initialization failed, NTSTATUS 0xC0000001
"{Operation Failed} The requested operation was unsuccessful."
I tried following the instructions here but it appears this is only possible if I connect a second machine to my computer to debug it remotely.
I finally found the solution, using this article:
http://blogs.technet.com/b/markrussinovich/archive/2005/08/17/unkillable-processes.aspx
This required installing the Windows Debugging Tools for Windows (nice name) and LiveKd, but by following the steps outlined I was able to track which driver was causing the process to hang: it turned out to be the 64-bit driver for the M-Audio Oxygen 8 V2 controller I'm using. Unfortunately no driver update is available.
Anyway, if anyone encounters a similar problem, this is the way to solve it.
Have you tried Process Explorer by Mark Russinovich? It is really useful for "killing":)
If you have error reporting enabled, it's possible that werfault.exe has Cubase open to write a minidump for crash reporting purposes.
This is just a stab in the dark but it might be your problem.
One thing you can try is to check with Process Monitor what Cubase is doing. Set a filter so that everything with a process name containing "cubase" will be recorded. It could be that you are facing some timeout issue when Cubase wants to exit.
you can end the process the service is running under. You can find this process by going to the Services tab of the Task Manager, right-clicking, and selecting Go To Process(you need to click the Show processes from all users button.). Note that one process may host multiple services (especially if it's svchost.exe), and ending the process will kill all those services. Also, this is an unclean exit, and may cause data corruption depending on what the service(s) was doing when you killed it.
Depending on which specific service you are trying to stop, there may be a cleaner way to simulate failure.

Resources