debug: [Step Debug] Could not connect to debugging client. Tried: host.docker.internal:9003 (through xdebug.client_host/xdebug.client_port) :-( - ddev

I'm attempting to run a code coverage report on my DDEV site with ./vendor/bin/paratest -p8 --phpunit=./bin/simple-phpunit --coverage-html=public/coverage --coverage-clover=clover.xml
I can turn on xdebug fine with ddev xdebug on, but then when running the above command I get the Xdebug: [Step Debug] Could not connect to debugging client. Tried: host.docker.internal:9003 (through xdebug.client_host/xdebug.client_port) :-( error.
I'm on version v1.21.3 of DDEV and this was working previously, so at some point in the last couple of versions this has stopped working for me.
Not sure on the steps to deguv this, so any help is much appreciated!

When you use ddev xdebug on it enabled xdebug for PHP projects. paratest is a php app, so xdebug tries to connect to your IDE when you run it. You can certainly enable listening on your IDE to solve this if you want step-debugging enabled.
If you don't want step-debugging enabled with what you're doing, try using XDEBUG_MODE=coverage. docs. So maybe you want something like:
ddev exec 'XDEBUG_MODE=coverage paratest -p8 --phpunit=./bin/simple-phpunit --coverage-html=public/coverage --coverage-clover=clover.xml'

Related

Angular cli stopped live recompiling when saving changes

I tried few solutions on my Mac for solving DNS_PROBE_FINISHED_NXDOMAIN error, and since that my Angular projects are running, but when I save changes, it is not auto recompiling(looks like the watch is not responding).
The steps that I did before it started were:
- renew DHCP lease in the TCP/IP of network settings tab.
- adding DNS server address.
- running this command in the terminal: dscacheutil -flushcache.
EDIT - When I run ng serve --watch the recompiling works, but without the --watch it is not working.
Problem solved!
after running once the ng serve -- watch running only the ng-serve started to work again!
Hope I manage to help someone with this issue and solution...

Start Jenkins local server on Mac

I am trying to integrate CI/CD using Jenkins. I have properly set Jenkins up on my mac by installing Java JDK and all. The localhost url was also accessible. I was able to manage plugins using http://localhost:8081 url.
But I accidentally closed the terminal window and the Jenkins was stopped. The url stopped working. It now shows error
This site can’t be reached
localhost refused to connect.
I tried to run the Jenkins from terminal using this command
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
also this command:
sudo launchctl start /Library/LaunchDaemons/org.jenkins-ci.plist
The terminal asks for password, but the url still does not work. I even tried unloading the Jenkins using this command:
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
Then again loading and starting command. But its not working.
Any help would be appreciated. Thanks
This is how I solved the above problem
Go to Jenkins directory
/Users/me/Downloads/Jenkins
Then run Jenkins on any port (default 8080 or any other)
java -jar jenkins.war --httpPort=8081
And the localhost is working now.
This was a stupid situation.

Running dusk tests on Homestead for Windows

I'm using homestead on windows 10 and installed laravel 5.4 when I'm trying to run dusk tests I get the following error:
1) Tests\Feature\ViewProductListingTest::user_can_view_product_listing
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY"}}
Failed to connect to localhost port 9515: Connection refused
Has anybody had any luck getting around this?
Thanx.
I encountered this very problem today. I spent like 2 hours researching and finally resolved it by following the steps posted on this comment.
I ran the original basic test and it passed. I'll try to run more complex test and hopefully the solution still works.
It seems to me that the Homestead lacks some necessary software(Chrome, xvfb etc.) to run browser tests with Laravel Dusk. That's what that comment is trying to install.
Hope this helps!
I ran into this issue before and was not able to completely resolve it.
The connection refused error occured for me because the execution scripts for dusk in /vendor/laravel/dusk/bin were not set executable inside Homestead.
So i used a chmod 777 on those scripts.
After that it complained that if couldn't find an executable chrome binary, so i installed google-chrome in Homestead.
After I installed google chrome, the tests ran, but timed out before they could finish which i am researching now.
I ran into the same issue (but I'm on macOS Sierra). If you can, instead of running Dusk from the Homestead VM, run it from your host machine. Just make sure the DB_HOST value in your .env file is set to the hostname you use to access the site in your browser.
So for example, if you configured the Homestead site to be accessible at mycoolsite.app, use that as your DB_HOST value.
I know this is more of a workaround for situations where your host machine might be able to run it OK, but it's working for me at the moment if you can give it a try.

Restart SonarQube Server remotely

I implemented SonarQube on the server, and I do most of the configurations remotly. Hence whenever a plugin is installed, a restart of SonarQube is required and every time I have to explicitly (manually) restart the SonarQube server.
Is there a way to restart SonarQube remotely?
For example, like jenkins through http://sonar_url/restart.
Since SonarQube 5.4, you can restart it directly from the UI (Administrators should be able to request a server restart from web console) or using the WS /api/system/restart (WS /api/system/restart should trigger a true restart of SQ).
POST api/system/restart
Since 4.3 Restart server.
Available only on development mode (sonar.web.dev=true).
Ruby on Rails extensions are not reloaded
Regards,
Michel
In my SonarQube instance (v5.6), I use the below curl command to restart SonarQube server
curl -u username:password -X POST https://SONAR_INSTANCE/api/system/restart

Has anybody run Xvfb on EC2 with CentOS?

I am trying to get javascript-enabled cucumber running on CentOS in EC2 by following this tutorial: http://makandra.com/notes/1391-how-to-hide-your-selenium-browser-window-with-headless However, the scenarios that require javascript just fail without any exception message.
In order to debug, I just went to see if Xvfb is working correctly with according to this tutorial: http://blog.kabisa.nl/2010/05/24/headless-cucumbers-and-capybaras-with-selenium-and-hudson/
I tested the command:
Xvfb :99 -ac -screen 0 1024x768x16
I got the error msg like this:
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/ip-10-116-82-44:99
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
I googled for solutions about of these errors. I haven't found a good solution for this yet. If I run the same command again, I get:
Fatal server error:
Server is already active for display 99
If this server is no longer running, remove /tmp/.X99-lock
and start again.
So the server is supposed to be up and running already. However, when I tried to run this in followups:
DISPLAY=:99.0 firefox http://www.google.com
The console just hangs there, until I contol + C to kill it.
Is there anyone who knows what's going on here?
Thanks in advance.
It seems that it's okay. Your console didn't hang - it is firefox is working - you just don't see it:)
Edit: I think you can connect there with ssh -X and you'll see firefox window if it is working. (Only if you're running linux/mac on your dev machine)

Resources