hawtio remote connect - proxy option not available? - hawtio

Situation:
I would like to connect hawtio to a jolokia agent that is not directly accessible from my browser. I have previously set the proxy flag on the connect / remote tab in such situations. However in this setup there is no such option. Is it removed? Or does it require special configuration to be available?
Details:
The connect -> discovery function is able to detect and show the agents with url.
OS: MacOS Yosemite
hawtio version: 1.4.54
jolokia version: 1.3.1
Browsers: Chrome 46.0.2490.71 (64-bit) / Firefox 41.0.2 / Safari 9.0.1 (10601.2.7.2)
Further background:
This is part of a docker-compose setup that contains a dedicated hawtio container and several applications that expose the jolokia agent to the hawtio container (and not to the world). As noted above the agent discovery seems to work. However pressing the play button does not work, either it opens a new tab that simply connects to the hawtio VM or it fails.
I am of course open to other solutions:-)
Thanks

I notice that when I connect via link from local tab, discovery tab or remote tab all requests to the target VM go via a local proxy anyway. I assume proxy is now default for connections. Example of proxy URL as seen in Chrome dev tools:
http://localhost:8181/hawtio/proxy/http://127.0.0.1:60760/jolokia/?maxDepth=7&maxCollectionSize=500&ignoreErrors=true&canonicalNaming=false
The proxy flag is therefore no longer necessary.

Related

How Do You Enable HTTP/3 on IIS?

The new HTTP/3 protocol is supposed to be faster and more secure than HTTP/2. How do I enable it on Windows Server running IIS websites?
As of this writing, HTTP/3 is only supported on Windows Server 2022. If you are on any previous version, I'm afraid you are out of luck.
Assuming you are on Windows Server 2022, here is how you enable it.
Step 1: Update the Windows Registry
Copy and paste the following text into a new .reg file. You can call it something like "enable-http-3.reg"
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Server]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters]
"EnableHttp3"=dword:00000001
"EnableAltSvc"=dword:00000001
Once saved, execute it on your Windows Server 2022 by double-clicking it, or by using reg.exe.
Step 2: Enable TLS Cipher
Note: Based on feedback from other users, this step may be optional. However, I needed to enable it on my installation.
Open PowerShell as Administrator to enable the TLS_CHACHA20_POLY1305_SHA256 cipher suite. Execute the following command in PowerShell:
Enable-TlsCipherSuite -Name TLS_CHACHA20_POLY1305_SHA256 -Position 0
Step 3: Allow UDP Connections on Port 443
HTTP/3 uses QUIC protocol which uses incoming UDP connections on port 443. You'll need to allow connections if you're using a firewall. Here is how the rule might look in Windows Firewall:
Step 4: Add HTTP/3 Response Headers to IIS
HTTP/3 requires some special response headers within IIS. Select either the website, or the machine within IIS and select "HTTP Response Headers."
Create a new response header with the name alt-svc and the value h3=":443"; ma=86400; persist=1.
That's it! Now test to make sure HTTP/3 is working in your browser. Many modern browsers li support HTTP/3 so you shouldn't need any configuration changes. However, one thing to note is that HTTP/3 only works on HTTPS connections, so if you're loading a website using HTTP, it will not work. Make sure to configure websites in IIS to use HTTPS protocol.
You will know when HTTP/3 is working via the browser's dev tools. Open developer tools, click on the network tab and note the protocol column. Chrome 108.0.5359.94 screenshot:
Firefox 107.0.1 screenshot:
Troubleshooting Tips
Reboot Windows 2022 server
Make sure the website is loaded via HTTPS! Do you see the lock icon in the browser?
Completely close the browser (all tabs) and restart it before loading the website
Disable the browser cache via browser developer tools when testing
Completely clear the browser cache and reboot the client machine(s).
More resources and references:
https://4sysops.com/archives/increase-iis-performance-with-http3-in-windows-server-2022/
https://blog.workinghardinit.work/2021/10/11/iis-and-http-3-quic-tls-1-3-in-windows-server-2022/
https://techcommunity.microsoft.com/t5/networking-blog/enabling-http-3-support-on-windows-server-2022/ba-p/2676880

How to configure Xdebug for multiple users on a local machine?

I have a new installation of Centos 7 running cPanel and WHM on an AWS EC2 instance. All software is the latest versions.
I used WHM to setup 5 users, which in turn creates linux users with their own home directory and their own public_html directories. Then I have enabled MATE Desktop and Tigervnc so each developer can connect to the machine in a vnc session.
So basically this setup is 5 linux users with their own apache vhosts, running their IDE on the same local server.
I then installed Xdebug using pecl and now I want to setup VSCode on each persons account to use Xdebug. I am also using opcache.
When trying to use VSCode, it seems like we can get the debugger to work, but there is no output in the console of VSCode. I installed the php-debugger extension in VSCode.
Also we seem to have a problem with VSCode not able to handle include/require statements. It always says that they cannot be found. But the files are indeed there and indeed have the correct permissions to be read/written.
I am not really sure how to configure Xdebug and VSCode to get them to work for all local developers with VSCode. Will what I am doing even work? Do I need remote connections? Do I need a DBGp proxy? Does Xdebug only allow one debugging session at a time? Do I need to install Xdebug for each user?
Can anyone provide some directions on how to set this up?
Thanks
Will what I am doing even work?
Likely :-)
Do I need remote connections?
On the Xdebug side, it does not matter whether it's "remote" or on the same machine, in both cases a TCP/IP connection is used. The "remote" in "remote debugger" was always a bad choice of words by the Xdebug developer (me).
Do I need a DBGp proxy?
You don't need it. What you need to be able to do is to have each user initiate a debugging session to their own IDE. As everything runs on the same machine, you can't just reuse ports. Xdebug always connects to the same configured port (9003 by default).
There are two alternatives:
Use a the DBGp proxy to direct incoming connections from the Xdebug port to registered IDEs. Each of these IDEs will have registered their key with the proxy, so the proxy knows where to forward the request to. You will need to use a browser extension so that each developer can set their own unique IDE key as the Xdebug session (cookie) value.
Use Xdebug Cloud, which would handle the complicated proxy set-up for you, and the developers only have to set their IDE Key (or now, Cloud key) through the browser extension again, as well as in their IDE. Only PhpStorm supports this for now. There is configuration documentation available.
Does Xdebug only allow one debugging session at a time?
No. Xdebug supports one debugging connection per PHP request, but IDEs might not accept more than one incoming connection. Both PhpStorm and VS Code's Debug Plugin don't have this problem.
Do I need to install Xdebug for each user?
No. Xdebug is installed as part of PHP, and as you've only got one PHP installation, having Xdebug available as part of the is enough.

Can't connect to apex, after succsessiful instalation

I've installed Oracle Apex on local machine, following this steps - LINK
I used Embedded PL/SQL Gateway (EPG) Configuration.
And when I try to connect on http://localhost:8080/apex I get - unable to connect firefox message. I checked firewall is inactive
Assuming you've followed all the steps and you're installing on windows, check if the OracleJobScheduler service is running (it will be postfixed with the instance name). You can do this by searching for Component Services in the windows search bar, then open the Services (Local). If the scheduler job service is not running then start it, wait a few moments, and try to re-connect.

Netbeans 8.0.1 does not recognize that GlassFish 4.1 is running

On Linux (Gentoo) if I start GlassFish from Netbeans/Services area, the server will started, the admin site is reachable, but in Netbeans I get the following error message:
GlassFish Server 4.1 start failed.
Please check server admin user name and password properties.
Also please check the server log file for other possible causes.
and I can neither start again, nor terminate.
Any idea?
Well, I had the same situation but on Mac. After I updated to macOS Sierra. In my case was a block on the sites that use system proxy settings, where localhost, 127.0.0.1, are blocked.
Perhaps, your case es similar, but a proxy setting on you Linux (GENTO).
For mac this is the solution AppServer issues from Netbeans
Step 1: (Try to search for the same on Linux) Go to system preference >Network>Select your wifi connection>Advanced>select
proxies tab. There check 3 options 1) Auto proxy Discovery 2)Automatic
Proxy configuration 3) web proxy(http)
Step 2: Go to Netbeans>preferences>General> select use system proxy> reload> test connection You may get connection successful. If
connection gets successful, Now Clean & build your Applications in
netbeans and press run .
I hope this help you and give you an idea.

Unable to start debugging in VS2015 for Azure web app

I'm using VS2015 Update 1 to try and debug my site which I've uploaded in Debug mode to an Azure web app (NOT a vm). I am working from my work domain.
I've been following instructions similar to found here https://samlman.wordpress.com/2015/02/27/another-cool-way-to-remotely-debug-azure-web-sites/
I have:
Published my website in Debug configuration
Enabled Remote Debugging from the management console
Made sure my VS edition is set to 2015
Enabled Websockets (from trying to connect via websockets)
Checked that the firewall allows VS remote debugger, remote debugger monitor and remote debugger discovery through.
Checked the website is up and running (set it to always on just in case)
I have tried right clicking my app service in Server Explorer and "Attach Debugger".
I then tried to connect using Debug > Attach to process and using the qualifier mysite.azurewebsites.net as instructed on various blogs. Even tried transport as Websocket, Remote as well as Default.
All methods get me the following:
I then used Fiddler to see if I could find the answer from web traffic but no joy with that.
Would appreciate any suggestions to get me around this problem!
Edit
Under scm -
There was another firewall I wasn't aware of on the domain that was blocking the debugger.
Edit:
Ports requested
outbound:
UDP 3702
TCP 4020
TCP 4021
Port assignments are given here on MSDN page

Resources