No php output when using Xdebug DBGp proxy - proxy

When using Xdebug directly from VSCode using one of two PHP extension (xdebug.php-debug, devsense.phptools-vscode) for debugging everything works as expected. But I have a shared environment where an Apache/PHP/Xdebug setup/instance is to be used by multiple developers.
With both extension everything works well when being used directly receiving the Xdebug connection. I have a breakpoint at the last line of code and although the whole HTML content was completely sent by PHP the browser it is still waiting to do anything - although ob_end_flush() (output buffering) was already called. Stepping over the last line of code the HTML content arrives at the browser. The Xdebug log is finishing in the same way.
[Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="14" status="stopping" reason="ok"></response>
...
[Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="22" status="stopped" reason="ok"></response>
When I now set this up using DBGp proxy the two PHP extension behave different. One is blocking the HTML output forever for all request been started and if I kill the apache processes I get a proxy log
21:01:28.652 [warn] [server] Handler response error: Error reading response: Error reading length: EOF
21:01:28.652 [info] [server] Closing server connection from 127.0.0.1:60104
21:01:28.653 [warn] [server] Handler response error: Error reading response: Error reading length: EOF
21:01:28.653 [info] [server] Closing server connection from 127.0.0.1:35422
21:01:28.653 [warn] [server] Handler response error: Error reading response: Error reading length: EOF
21:01:28.653 [info] [server] Closing server connection from 127.0.0.1:43594
21:01:28.653 [warn] [server] Handler response error: Error reading response: Error reading length: EOF
21:01:28.653 [info] [server] Closing server connection from 127.0.0.1:56398
21:01:28.659 [warn] [server] Handler response error: Error reading response: Error reading length: EOF
21:01:28.659 [info] [server] Closing server connection from 127.0.0.1:40030
while the other is delivering the HTML output and says in the proxy log the same moment
22:02:02.316 [warn] [server] Handler response error: Error reading response: Error reading length: EOF
22:02:02.317 [info] [server] Closing server connection from 127.0.0.1:33160
In both cases the Xdebug log says the same: status stopped, reason ok.
So I wonder whether the way the request seems to completely end in both cases reading an EOF and closing the server connection is really a warning because it's unexpected or whether this is the normal behaviour. And then of course it's an issue of the one PHP extension seeming not to tell the proxy and server they can end their connection (I assume this is the client's job which here is the proxy).
I checked all configuration options from Xdebug, the VSCode PHP extension and DBGp proxy to increase logging but I could not find out more than what I have described above. I tried setting the connection either via the VSCode extension or manually issuing echo -e "proxyinit -p 39001 -k jni-vscode -m 1\0" | nc 127.0.0.1 9001 with no success. The EOF warning stays and for the devsense.phptools-vscode plugin there is no php output to the browser. If anyone has a clue why I would appreciate a hint.
Thanks,
Jürgen
PS: Killing dbgpProxy makes apache deliver all the content with access_log entry showing it took 3064 seconds to fulfill the request.

Related

How do you hide Socket.io error messages in C++?

So I get error messages like this printed to the console from Socket.io:
[2023-02-09 17:53:43] [info] asio async_resolve error: asio.system:11001 (No such host is known.)
[2023-02-09 17:53:43] [info] Error getting remote endpoint: asio.system:10009 (The file handle supplied is not valid.)
[2023-02-09 17:53:43] [error] handle_connect error: No such host is known.
[2023-02-09 17:53:43] [info] asio async_shutdown error: asio.ssl:336462100 (uninitialized)
I just need to hide them from the console but cannot figure out how to do it. I've tried using off_error, set logs quiet, and try/catch but none worked.
Does anyone know how to solve this?

Some problems on QUIC-GO example server

The situation is, I wanna establish a QUIC connection based on quic-go from local to ECS server. The related tests using localhost are done both on local and remote device. That is:
#local: .$QUIC-GO-PATH/example/client/main -insecure -keylog ssl.log -qlog trial.log -v https://127.0.0.1:6121/demo/tile
#local: .$QUIC-GO-PATH/example/main -qlog -tcp -v
These tests are completed.
Now is the problem,when I start local-remote connection an error occurred:
#remote: .$QUIC-GO-PATH/example/main -qlog -tcp -v
#local: .$QUIC-GO-PATH/example/client/main -insecure -keylog ssl.log -qlog trial.log -v https://$REMOTE_IPADDR:6121/demo/tile
timeout: no recent network activity
When I go through a wireshark examination, it seems like the CRYPTO handshake never finishes:
Wireshark
Also client Qlog file atteched here:
Qlog file
Codes are all the same with https://github.com/lucas-clemente/quic-go
Help!
This problem has been solved.
Code $QUIC-GO-PATH/example/main.go has binded the port as a default onto 127.0.0.1:6121, which led to the problem that the server cannot get reached by client outside, just get this on server running:
-bind 0.0.0.0:6121

How to submit wget jobs through a bash script to condor?

I have a problem submitting wget jobs to condor.
I can use wget to download a file from a url using command line.
$ wget https://wordpress.org/latest.zip
--2019-01-24 16:43:42-- https://wordpress.org/latest.zip
Resolving wordpress.org... 198.143.164.252
Connecting to wordpress.org|198.143.164.252|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11383968 (11M) [application/zip]
Saving to: “latest.zip”
100%[======================================>] 11,383,968 --.-K/s in 0.09s
2019-01-24 16:43:43 (117 MB/s) - “latest.zip” saved [11383968/11383968]
But if I save the command to a bash script file "test.sh", like this:
#!/bin/sh
wget https://wordpress.org/latest.zip
And then submit it to condor:
#!/usr/bin/env condor_submit
Executable = test.sh
Universe = vanilla
output = tmp.out
error = tmp.error
Log = tmp.log
Queue 1
It will have error as "Connection time out."
--2019-01-24 16:53:50-- https://wordpress.org/latest.zip
Resolving wordpress.org... 198.143.164.252
Connecting to wordpress.org|198.143.164.252|:443... failed: Connection timed out
But test.sh works well from command line as follows:
$./test.sh
I changed "tesh.sh" to:
#!/bin/sh
wget --debug --verbose https://wordpress.org/latest.zip
And the output is:
Setting --verbose (verbose) to 1
DEBUG output created by Wget 1.12 on linux-gnu.
--2019-01-24 17:25:58-- https://wordpress.org/latest.zip
Resolving wordpress.org... 198.143.164.252
Caching wordpress.org => 198.143.164.252
Connecting to wordpress.org|198.143.164.252|:443... Closed fd 3
failed: Connection timed out.
I suspect the problem is with "https": the SSL/TLS handshake is failing.
If you connect to an HTTPS site with a web browser, you use the browser's trust store (very often, this is one-in-the-same as your desktop's Windows trust store).
SUGGESTIONS:
Verify your "test.sh" works from the command line.
Modify your script to run wget --debug --trace ..., and check the output.
If only for troubleshooting purposes, try --no-check-certificate, too.
Look here for more details:
GNU Wget 1.18 Manual
ADDENDUM:
If you run wget --debug --verbose ..., you should see something like this:
$ wget --debug --verbose https://wordpress.org/latest.zip
Setting --verbose (verbose) to 1
Setting --verbose (verbose) to 1
DEBUG output created by Wget 1.19.4 on linux-gnu.
Reading HSTS entries from /home/xxxxx/.wget-hsts
URI encoding = ‘UTF-8’
Converted file name 'latest.zip' (UTF-8) -> 'latest.zip' (UTF-8)
--2019-01-24 15:49:12-- https://wordpress.org/latest.zip
Resolving wordpress.org (wordpress.org)... 198.143.164.252
Caching wordpress.org => 198.143.164.252
Connecting to wordpress.org (wordpress.org)|198.143.164.252|:443... connected.
Created socket 3.
Releasing 0x000055afcdc64650 (new refcount 1).
Initiating SSL handshake.
Handshake successful; connected socket 3 to SSL handle 0x000055afcdc64750
certificate:
subject: CN=*.wordpress.org,OU=Domain Control Validated
issuer: CN=Go Daddy Secure Certificate Authority - G2,OU=http://certs.godaddy.com/repository/,O=GoDaddy.com\\, Inc.,L=Scottsdale,ST=Arizona,C=US
X509 certificate successfully verified and matches host wordpress.org
---request begin---
GET /latest.zip HTTP/1.1
User-Agent: Wget/1.19.4 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: wordpress.org
Connection: Keep-Alive
...
If you DON'T see ANY of this ... I'd contact your network administrator about a firewall or proxy that might be blocking your Condor app.

Bug CleverBeagle Pup 2.0 Meteor GraphQL deployment on Heroku

1) In the first time, when I deployed the origin code to heroku server with git clone https://github.com/cleverbeagle/pup
The launching application didn't work.
I managed to correct this with to copy the content of 'settings-development.json' file and paste in Heroku => myProject => Setttings => Reveal Config Vars => Key : METEOR_SETTINGS and Value : I pasted here the content.
thanks to :
- https://github.com/cleverbeagle/pup/issues/9
- https://github.com/cleverbeagle/pup/issues/197
So, now, the app is showing on server.
2) On Chrome console, I have this error :
50d72c91808ef7fba57f920b67d152d2d57698eb.js?meteor_js_resource=true:9 WebSocket connection to 'ws://localhost:4001/graphql' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
so I changed this in METEOR_SETTINGS
"graphQL": {
"httpUri": "http://localhost:3000/graphql",
"wsUri": "ws://localhost:4001/graphql"
},
to
"graphQL": {
"httpUri": "https://myproject.herokuapp.com:3000/graphql",
"wsUri": "wss://myproject.herokuapp.com:4001/graphql"
},
Note without https and wss, the app is not showing
3) Now on Chrome Console, I have :
this warning :
50d72c91808ef7fba57f920b67d152d2d57698eb.js?meteor_js_resource=true:9 WebSocket connection to 'wss://myproject.herokuapp.com:4001/graphql' failed: WebSocket is closed before the connection is established.
and after several warning above, I have this error :
50d72c91808ef7fba57f920b67d152d2d57698eb.js?meteor_js_resource=true:9 WebSocket connection to 'wss://myproject.herokuapp.com:4001/graphql' failed: WebSocket opening handshake timed out
By using the origin source code from Pup, I can signup on server but I cannot create a new document.
Any help, please ?
Thank you
EDIT 15 JAN 2019
**4) I remove Port like this : **
"httpUri": "https://myproject.herokuapp.com/graphql",
"wsUri": "wss://myproject.herokuapp.com/graphql"
Now, I can create New document on https://myproject.herokuapp.com/documents
but I still have this warning :
fe6fa1ac83e19aa2513ac3f97293600e8dc99e8e.js?meteor_js_resource=true:9
WebSocket connection to 'wss://myproject.herokuapp.com/graphql'
failed: WebSocket is closed before the connection is established.
and this error :
WebSocket connection to 'wss://myproject.herokuapp.com/graphql'
failed: Error during WebSocket handshake: Unexpected response code:
503
any idea ?
Thanks

"Failed to call HTTP server" error after upgrading SonarQube from 6.0 to 6.7.2

I have upgraded a SonarQube server from 6.0 to 6.7.2. Everything is fine, except that, after logging in as user "admin" and navigating to tab Administration, clicking on subtab System yields an error message
An error has occurred: please contact your administrator.
In file web.log:
2018.03.06 11:38:24 ERROR web[AWH6436/ICo3FeIjAAAz][o.s.s.w.WebServiceEngine] Fail to process request http://<HOST NAME>:20295/sonarqube/api/system/info
java.lang.IllegalStateException: Failed to call HTTP server of process [key='ce', ipcIndex=3, logFilenamePrefix=ce]
at org.sonar.ce.http.CeHttpClientImpl.call(CeHttpClientImpl.java:171)
at org.sonar.ce.http.CeHttpClientImpl.retrieveSystemInfo(CeHttpClientImpl.java:60)
at org.sonar.server.platform.ws.StandaloneSystemInfoWriter.write(StandaloneSystemInfoWriter.java:53)
at org.sonar.server.platform.ws.InfoAction.handle(InfoAction.java:64)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:86)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
...
Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://10.145.61.55
The IP address is that of the server. There is no mention of any port in the error message, I don't know if this has any relation with the error.
It seems that the Web component cannot access the Compute Engine component. However nothing particular was found in file ce.log which ends with a trace Compute Engine is operational.
I followed the short migration guide in https://docs.sonarqube.org/display/SONAR/Upgrading.
Environment: Linux, JDK 8, Oracle DB
Does anyone as a clue? Many thanks in advance.
For whoever who might stumble on the same issue: it was an error in my proxy configuration. Increasing the logging level by setting sonar.log.level=DEBUG in file sonar.properties yielded the following new traces in file web.log:
2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] sun.net.www.MessageHeader#668ee27b5 pairs: {GET http://127.0.0.1:40413/systemInfo HTTP/1.1: null}{User-Agent: SonarQube 6.7.2.37468 # AWHmcYEU8aGLjZ5sPfjj Java/1.8.0_60}{Host: 127.0.0.1:40413}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Proxy-Connection: keep-alive}
2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] sun.net.www.MessageHeader#527214044 pairs: {null: HTTP/1.1 301 Moved Permanently}{Server: BlueCoat-Security-Appliance}{Location: http://10.145.61.55}{Connection: Close}
2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] Redirected from http://127.0.0.1:40413/systemInfo to http://10.145.61.55
2018.03.07 11:52:04 ERROR web[AWIAFTpArQRjrTzMAAAg][o.s.s.w.WebServiceEngine] Fail to process request http://<HOST NAME>:20295/sonarqube/api/system/info
The proxy was redirecting the Compute engine URL http://127.0.0.1:40413/systemInfo to http://10.145.61.55.
The solution was to add 127.0.0.1 to http.nonProxyHosts in file sonar.properties.

Resources