Issue with ApacheHttpClient 4.3.3 with Microsoft TMG Proxy + HTTP Post + SSL - apache

I'm having a problem with sending a POST request to Salesforce's web2lead servlet through Microsoft TMG and httpclient 4.3.3. If I try the request using Ctnlm as a proxy, it works fine (that proxies through TMG). Also, if I simply make a GET request to www.google.com through the Proxy, it's working fine. Here is the code that I'm trying to use:
HttpHost httpTargetHost = new HttpHost("www.salesforce.com", 443, "https");
HttpPost httpPost = new HttpPost("/servlet/servlet.WebToLead");
NTCredentials ntCreds = new NTCredentials("proxyUser", "proxyPassword", "workstation", "DOMAIN");
CredentialsProvider credsProvider = new BasicCredentialsProvider();
credsProvider.setCredentials(new AuthScope("proxyHost","proxyPort"), ntCreds );
HttpClientBuilder clientBuilder = HttpClientBuilder.create();
clientBuilder.useSystemProperties();
clientBuilder.setProxy(new HttpHost("proxyHost","proxyPort"));
clientBuilder.setDefaultCredentialsProvider(credsProvider);
clientBuilder.setProxyAuthenticationStrategy(new ProxyAuthenticationStrategy());
CloseableHttpClient client = clientBuilder.build();
CloseableHttpResponse response = client.execute(httpTargetHost, httpPost);
In the response, I'm getting this:
2015-01-16 17:33:31,158 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:113) - http-outgoing-0 << HTTP/1.1 407 Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
2015-01-16 17:33:31,158 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:116) - http-outgoing-0 << Via: 1.1 PROXYHOST
2015-01-16 17:33:31,159 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:116) - http-outgoing-0 << Proxy-Authenticate: Negotiate
2015-01-16 17:33:31,159 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:116) - http-outgoing-0 << Proxy-Authenticate: Kerberos
2015-01-16 17:33:31,159 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:116) - http-outgoing-0 << Proxy-Authenticate: NTLM
2015-01-16 17:33:31,160 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:116) - http-outgoing-0 << Connection: close
2015-01-16 17:33:31,160 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:116) - http-outgoing-0 << Proxy-Connection: close
2015-01-16 17:33:31,160 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:116) - http-outgoing-0 << Pragma: no-cache
2015-01-16 17:33:31,160 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:116) - http-outgoing-0 << Cache-Control: no-cache
2015-01-16 17:33:31,161 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:116) - http-outgoing-0 << Content-Type: text/html
2015-01-16 17:33:31,161 [main] DEBUG org.apache.http.headers(LoggingManagedHttpClientConnection.java:116) - http-outgoing-0 << Content-Length: 2699
2015-01-16 17:33:31,164 [main] DEBUG org.apache.http.impl.auth.HttpAuthenticator(HttpAuthenticator.java:77) - Authentication required
Thanks for any help you can provide.
Regards,
Eric

The error message says quite clearly:
Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied.
You need some kind of authorization which you don't provide. This problem is not specific to Apache HTTPClient. Please check with the administrator of the Forefront TMG installation what kind if authorization (and which credentials) you need. It might be the kind of authorization you've tried and only the credentials are wrong or it might be some other kind of authorization required.

Related

Gatling: WebSocketHandshakeException: Invalid handshake response getStatus: 400 Bad Request

I'm trying to open ws connection, but get the error:
val openConnection = exec( ws("Connect -> WS").wsName("user").connect("wss://socket.develop.test.com?access_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9"))
Then, I get:
09:49:53.343 [DEBUG] i.g.h.c.i.DefaultHttpClient - Installing SslHandler for wss://socket.develop.test.com?access_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9
09:49:53.381 [DEBUG] i.n.h.s.u.InsecureTrustManagerFactory - Accepting a server certificate: CN=Kubernetes Ingress Controller Fake Certificate, O=Acme Co
09:49:53.418 [DEBUG] i.n.h.c.h.w.WebSocketClientHandshaker13 - WebSocket version 13 client handshake key: YndmXwIGgZseWyRlmXBoyw==, expected response: H2YGNn6p+DyLyudnc1JCluHjj7E=
09:49:53.419 [DEBUG] i.g.h.c.i.WebSocketHandler - ctx.write msg=DefaultFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: EmptyByteBufBE)
GET ?access_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9
HTTP/1.1
accept: */*
upgrade: websocket
connection: upgrade
sec-websocket-key: YndmXwIGgZseWyRlmXBoyw==
host: socket.develop.test.com
origin: https://socket.develop.test.com
sec-websocket-version: 13
09:49:53.423 [DEBUG] i.n.h.s.SslHandler - [id: 0xfa53644a, L:/192.168.150.134:54082 - R:socket.develop.test.com/78.47.16.48:443] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
09:49:53.450 [DEBUG] i.g.h.c.i.WebSocketHandler - Read msg=HttpObjectAggregator$AggregatedFullHttpResponse(decodeResult: success, version: HTTP/1.1, content: CompositeByteBuf(ridx: 0, widx: 163, cap: 163, components=1))
HTTP/1.1 400 Bad Request
Server: openresty/1.15.8.1
Date: Tue, 10 Mar 2020 06:49:53 GMT
Content-Type: text/html
Content-Length: 163
Connection: close
09:49:53.452 [DEBUG] i.g.h.c.i.WebSocketHandler - Crash
io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: Invalid handshake response getStatus: 400 Bad Request
at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13.verify(WebSocketClientHandshaker13.java:267)
In gatling.conf, I set also:
enableSni = false
useOpenSsl = false
enableHostnameVerification = false
If I try to open connection with any WS clients like SmartWebsocketClient - everything is ok, but by means of gatling I can't to open connection. Any ideas to fix it?
wss://domain?access_token... is not a valid URL. The path component must start with a / and not a ?. This means that the request is invalid which can explain the response of 400 Bad Request.
The URL must be at least wss://domain/?access_token... (i.e. a / before the ?) but maybe the rest of the URL is unexpected by the server too. Please check the actual requirements of the server.
This is a bug in Netty that doesn't properly compute WebSocket handshake request url when path is empty.
I've just contributed a patch: https://github.com/netty/netty/pull/10095.
Sibling issue in Gatling: https://github.com/gatling/gatling/issues/3876

Cannot create FF/Chrome session on Selenium Standalone

Machine Details
AME="Amazon Linux AMI"
VERSION="2017.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2017.03"
PRETTY_NAME="Amazon Linux AMI 2017.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2017.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
I am new to selenium stand alone. I have downloaded the latest java version, stand alone using NPM, XVFB and am trying to create sessions after turning on the standalone using the following command:
sudo xvfb-run --server-args="-screen 0, 1366x768x24" selenium-standalone start -- -debug
Please also note that I have attempted this using a Hub and Node also trying to run Selenium tests using C# on my local client.
When I try to create a Chrome session I receive this error (The polling will continue for a few seconds):
DEBUG - Waiting for [http://localhost:29837/status]
DEBUG - Polling http://localhost:29837/status
/usr/lib/node_modules/selenium-standalone/.selenium/chromedriver/2.32-
x64-chromedriver: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
DEBUG - Polling http://localhost:29837/status
DEBUG - Polling http://localhost:29837/status
DEBUG - Polling http://localhost:29837/status
ERROR - org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)
^C/usr/bin/xvfb-run: line 171: kill: (6252) - No such process
When trying to create a Firefox session:
14:30:26.416 INFO - Binding default provider to: org.openqa.selenium.chrome.ChromeDriverService
14:30:26.418 INFO - Found handler: org.openqa.selenium.remote.server.BeginSession#44e7a749
14:30:26.418 INFO - /session: Executing POST on /session (handler: BeginSession)
14:30:26.442 DEBUG - Memory-based payload for: {desiredCapabilities={browserName=firefox}}
14:30:26.453 INFO - Capabilities are: Capabilities {browserName=firefox}
14:30:26.457 INFO - Capabilities {browserName=firefox} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
14:30:26.458 INFO - Capabilities {browserName=firefox} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
1506349826497 geckodriver INFO geckodriver 0.18.0
1506349826501 geckodriver INFO Listening on 127.0.0.1:5611
DEBUG - CookieSpec selected: default
DEBUG - Auth cache not set in the context
DEBUG - Connection request: [route: {}->http://localhost:5611][total kept alive: 0; route allocated: 0 of 2000; total allocated: 0 of 2000]
DEBUG - Connection leased: [id: 0][route: {}->http://localhost:5611][total kept alive: 0; route allocated: 1 of 2000; total allocated: 1 of 2000]
DEBUG - Opening connection {}->http://localhost:5611
DEBUG - Connecting to localhost/127.0.0.1:5611
DEBUG - Connection established 127.0.0.1:59276<->127.0.0.1:5611
DEBUG - http-outgoing-0: set socket timeout to 10800000
DEBUG - Executing request POST /session HTTP/1.1
DEBUG - Target auth state: UNCHALLENGED
DEBUG - Proxy auth state: UNCHALLENGED
DEBUG - http-outgoing-0 >> POST /session HTTP/1.1
DEBUG - http-outgoing-0 >> Content-Type: application/json; charset=utf-8
DEBUG - http-outgoing-0 >> Content-Length: 49
DEBUG - http-outgoing-0 >> Host: localhost:5611
DEBUG - http-outgoing-0 >> Connection: Keep-Alive
DEBUG - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_131)
DEBUG - http-outgoing-0 >> Accept-Encoding: gzip,deflate
DEBUG - http-outgoing-0 >> "POST /session HTTP/1.1[\r][\n]"
DEBUG - http-outgoing-0 >> "Content-Type: application/json; charset=utf-8[\r][\n]"
DEBUG - http-outgoing-0 >> "Content-Length: 49[\r][\n]"
DEBUG - http-outgoing-0 >> "Host: localhost:5611[\r][\n]"
DEBUG - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
DEBUG - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_131)[\r][\n]"
DEBUG - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
DEBUG - http-outgoing-0 >> "[\r][\n]"
DEBUG - http-outgoing-0 >> "{"desiredCapabilities":{"browserName":"firefox"}}"
DEBUG - http-outgoing-0 << "HTTP/1.1 500 Internal Server Error[\r][\n]"
DEBUG - http-outgoing-0 << "Connection: close[\r][\n]"
DEBUG - http-outgoing-0 << "Content-Type: application/json; charset=utf-8[\r][\n]"
DEBUG - http-outgoing-0 << "Cache-Control: no-cache[\r][\n]"
DEBUG - http-outgoing-0 << "Content-Length: 1337[\r][\n]"
DEBUG - http-outgoing-0 << "Date: Mon, 25 Sep 2017 14:30:27 GMT[\r][\n]"
DEBUG - http-outgoing-0 << "[\r][\n]"
DEBUG - http-outgoing-0 << "{"value":{"error":"session not created","message":"Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line","stacktrace":"stack backtrace:\n 0: 0x5787ed - backtrace::backtrace::trace::h59229d13f6a8837d\n 1: 0x578942 - backtrace::capture::Backtrace::new::h23089c033eded8f0\n 2: 0x44da3d - geckodriver::marionette::MarionetteHandler::create_connection::h6f7058fccafe4367\n 3: 0x425c32 - <webdriver::server::Dispatcher<T, U>>::run::h8f5348b8f5f7c053\n 4: 0x40b22c - std::panicking::try::do_call::hb67c6fb6bcd96195\n 5: 0x5dc20a - panic_unwind::__rust_maybe_catch_panic\n at /checkout/src/libpanic_unwind/lib.rs:98\n 6: 0x41b943 - <F as alloc::boxed::FnBox<A>>::call_box::h4100941edc372034\n 7: 0x5d48a4 - alloc::boxed::{{impl}}::call_once<(),()>\n at /checkout/src/liballoc/boxed.rs:650\n - std::sys_common::thread::start_thread\n at /checkout/src/libstd/sys_common/thread.rs:21\n - std::sys::imp::thread::{{impl}}::new::thread_start\n at /checkout/src/libstd/sys/unix/thread.rs:84"}}"
DEBUG - http-outgoing-0 << HTTP/1.1 500 Internal Server Error
DEBUG - http-outgoing-0 << Connection: close
DEBUG - http-outgoing-0 << Content-Type: application/json; charset=utf-8
DEBUG - http-outgoing-0 << Cache-Control: no-cache
DEBUG - http-outgoing-0 << Content-Length: 1337
DEBUG - http-outgoing-0 << Date: Mon, 25 Sep 2017 14:30:27 GMT
DEBUG - http-outgoing-0: Close connection
DEBUG - Connection discarded
DEBUG - Connection released: [id: 0][route: {}->http://localhost:5611][total kept alive: 0; route allocated: 0 of 2000; total allocated: 0 of 2000]
On trying to run this command to install the latest Stable Google Chrome:
sudo yum -y localinstall google-chrome-stable_current_x86_64.rpm
Or
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
I get this error:
Error: Package: google-chrome-stable-61.0.3163.100-1.x86_64 (/google-chrome-stable_current_x86_64)
Requires: libgdk-3.so.0()(64bit)
Error: Package: google-chrome-stable-61.0.3163.100-1.x86_64 (/google-chrome-stable_current_x86_64)
Requires: libXss.so.1()(64bit)
Error: Package: google-chrome-stable-61.0.3163.100-1.x86_64 (/google-chrome-stable_current_x86_64)
Requires: libatk-1.0.so.0()(64bit)
Error: Package: google-chrome-stable-61.0.3163.100-1.x86_64 (/google-chrome-stable_current_x86_64)
Requires: libgdk_pixbuf-2.0.so.0()(64bit)
Error: Package: google-chrome-stable-61.0.3163.100-1.x86_64 (/google-chrome-stable_current_x86_64)
Requires: libgconf-2.so.4()(64bit)
Error: Package: google-chrome-stable-61.0.3163.100-1.x86_64 (/google-chrome-stable_current_x86_64)
Requires: libgtk-3.so.0()(64bit)
Error: Package: google-chrome-stable-61.0.3163.100-1.x86_64 (/google-chrome-stable_current_x86_64)
Requires: xdg-utils
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Has anyone come across this issue and have anyway to solve this? Please let me know if you have any questions.
I was not able to install the libraries on the Linux AMI but what I ended up doing was installing it on a Ubuntu instance. This made for a pretty simple install using the following doc:
https://www.npmjs.com/package/selenium-standalone
HOWEVER, I received a binary error with my Ubuntu linux as well. The issue was that I did not have the browser installed on my Linux Machine and I was able to do so using the instructions here:
https://askubuntu.com/questions/510056/how-to-install-google-chrome
Works well with FireFox too:
#install firefox browser
sudo apt-get install firefox

Glassfish Server Hell - GZip JSON - No Stacktrace Printed

I never liked these heavy weight servers like Glassfish, Weblogic etc., but I had to do some implementation by exposing some of the endpoints through http served via Glassfish. In one particular case, I have to send to the Glassfish server a Post request that takes a GZipped input, decompresses it and send a GZipped response back. Here is what I have so far:
On the Glassfish Server:
#Path("/")
class MyService extends BaseService {
#POST
#Path("/myService")
#Consumes(Array("application/json"))
#Produces(Array("application/json"))
#GZIP
def myService(#GZIP json: String): Response = {
println("Message received") // Not getting printed as well!!!
Response.status(200).header("Content-Encoding", "gzip").entity(JsonMarshall.deserialize(json)).build()
}
}
I'm using the JBoss rest easy API's to expose myService endpoint. In my client, I set the necessary headers (snippet shown below)
post.addHeader("Content-Encoding", "gzip")
post.addHeader("Accept-Encoding", "gzip, deflate")
But when I run my client, here is what I see as response:
[main] INFO ServerPingTest - Calling URL http://localhost:8080/glassfish-server/myService
[main] INFO ServerPingTest - --- RESPONSE HEADERS ---
[main] INFO ServerPingTest - X-Powered-By: Servlet/3.1 JSP/2.3 (GlassFish Server Open Source Edition 4.0 Java/Oracle Corporation/1.7)
[main] INFO ServerPingTest - Server: GlassFish Server Open Source Edition 4.0
[main] INFO ServerPingTest - Content-Language:
[main] INFO ServerPingTest - Content-Type: text/html
[main] INFO ServerPingTest - Date: Tue, 11 Mar 2014 16:39:17 GMT
[main] INFO ServerPingTest - Content-Length: 1217
[main] ERROR ServerPingTest - Error occurred when ping testing !!!!! Please see the stacktrace below!
java.util.zip.ZipException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:78)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:90)
......
......
This is what I see on the server;
[#|2014-03-11T17:39:17.557+0100|SEVERE|glassfish 4.0||_ThreadID=21;_ThreadName=Thread-4;_TimeMillis=1394555957557;_LevelValue=1000;|
[http-listener-1(3)] WARN org.jboss.resteasy.core.SynchronousDispatcher - Failed executing POST /myService|#]
I also do not see any stack trace. Can anyone please help as to what went wrong?
Looks like I have managed to solve this. I did the following:
Used the latest version of the rest easy API (version 3.0.6.Final) against using an older version 2.2.1 (See this post http://sourceforge.net/p/resteasy/mailman/resteasy-developers/thread/BDED22DA-ACDC-47F5-9B14-30A202B52981#redhat.com/)
I added an additional header on my client (post.addHeader("Content-Type", "application/json"))
Bang it worked!

Error 400 Bad Request using CardDav with iCal4j with Zimbra

I'm trying to download the vcard list from my zimbra account using iCal4j.
I tried with this code.
It correctly fetches the collections but it doesn't download any vCard.
If i debug the getCollections method, i can see a HTTP/1.1 400 Bad Request error.
Can anyone help ?
Regards
Stefano
CardDavStore kerioStore = new CardDavStore("//MacTI/MKS2Exchange", new URL("https://xxx.xxx.xxx"), PathResolver.ZIMBRA);
kerioStore.connect("xxx.xxx#xxx.xxx", "supersecret".toCharArray());
for (CardDavCollection collection: kerioStore.getCollections()) {
for (VCard card: collection.getComponents()) {
System.out.println(card.toString());
}
}
This is the HTTP request trace:
DEBUG [main] HttpMethodBase.shouldCloseConnection(1024) | Resorting to protocol version default close connection policy
DEBUG [main] HttpMethodBase.shouldCloseConnection(1028) | Should NOT close connection, using HTTP/1.1
DEBUG [main] HttpConnection.releaseConnection(1178) | Releasing connection back to connection manager.
DEBUG [main] header.wire(70) | >> "REPORT /dav/<myemailaccount>/TestCardDav/ HTTP/1.1[\r][\n]"
DEBUG [main] HttpMethodBase.addHostRequestHeader(1352) | Adding Host request header
DEBUG [main] header.wire(70) | >> "Depth: 1[\r][\n]"
DEBUG [main] header.wire(70) | >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
DEBUG [main] header.wire(70) | >> "Host: xxx.xxx.xxx[\r][\n]"
DEBUG [main] header.wire(70) | >> "Content-Length: 199[\r][\n]"
DEBUG [main] header.wire(70) | >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
DEBUG [main] header.wire(70) | >> "[\r][\n]"
DEBUG [main] content.wire(84) | >> "<?xml version="1.0" encoding="UTF-8" standalone="no"?><C:addressbook-query xmlns:C="urn:ietf:params:xml:ns:carddav"><D:prop xmlns:D="DAV:"><C:address-data/><D:getetag/></D:prop></C:addressbook-query>"
DEBUG [main] EntityEnclosingMethod.writeRequestBody(508) | Request body sent
DEBUG [main] header.wire(70) | << "HTTP/1.1 401 must authenticate[\r][\n]"
DEBUG [main] header.wire(70) | << "HTTP/1.1 401 must authenticate[\r][\n]"
DEBUG [main] header.wire(70) | << "Date: Wed, 04 Dec 2013 22:16:48 GMT[\r][\n]"
DEBUG [main] header.wire(70) | << "WWW-Authenticate: BASIC realm="Zimbra"[\r][\n]"
DEBUG [main] header.wire(70) | << "Content-Length: 0[\r][\n]"
DEBUG [main] header.wire(70) | << "[\r][\n]"
DEBUG [main] HttpMethodDirector.isAuthenticationNeeded(843) | Authorization required
DEBUG [main] AuthChallengeProcessor.selectAuthScheme(90) | Supported authentication schemes in the order of preference: [Digest, Basic]
DEBUG [main] AuthChallengeProcessor.selectAuthScheme(111) | Challenge for Digest authentication scheme not available
INFO [main] AuthChallengeProcessor.selectAuthScheme(101) | Basic authentication scheme selected
DEBUG [main] AuthChallengeProcessor.processChallenge(155) | Using authentication scheme: basic
DEBUG [main] AuthChallengeProcessor.processChallenge(163) | Authorization challenge processed
DEBUG [main] HttpMethodDirector.processWWWAuthChallenge(714) | Authentication scope: BASIC 'Zimbra'#mail.zcsmail.eu:443
DEBUG [main] HttpMethodDirector.executeMethod(194) | Retry authentication
DEBUG [main] HttpMethodBase.shouldCloseConnection(1024) | Resorting to protocol version default close connection policy
DEBUG [main] HttpMethodBase.shouldCloseConnection(1028) | Should NOT close connection, using HTTP/1.1
DEBUG [main] HttpConnection.releaseConnection(1176) | Connection is locked. Call to releaseConnection() ignored.
DEBUG [main] HttpMethodDirector.authenticateHost(278) | Authenticating with BASIC 'Zimbra'#xxx.xxx.xxx:443
DEBUG [main] HttpMethodParams.getCredentialCharset(384) | Credential charset not configured, using HTTP element charset
DEBUG [main] header.wire(70) | >> "REPORT /dav/<myemailaccount>/TestCardDav/ HTTP/1.1[\r][\n]"
DEBUG [main] HttpMethodBase.addHostRequestHeader(1352) | Adding Host request header
DEBUG [main] header.wire(70) | >> "Depth: 1[\r][\n]"
DEBUG [main] header.wire(70) | >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
DEBUG [main] header.wire(70) | >> "Content-Length: 199[\r][\n]"
DEBUG [main] header.wire(70) | >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
DEBUG [main] header.wire(70) | >> "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==[\r][\n]"
DEBUG [main] header.wire(70) | >> "Host: xxx.xxx.xxx[\r][\n]"
DEBUG [main] header.wire(70) | >> "[\r][\n]"
DEBUG [main] content.wire(84) | >> "<?xml version="1.0" encoding="UTF-8" standalone="no"?><C:addressbook-query xmlns:C="urn:ietf:params:xml:ns:carddav"><D:prop xmlns:D="DAV:"><C:address-data/><D:getetag/></D:prop></C:addressbook-query>"
DEBUG [main] EntityEnclosingMethod.writeRequestBody(508) | Request body sent
DEBUG [main] header.wire(70) | << "HTTP/1.1 400 Bad Request[\r][\n]"
DEBUG [main] header.wire(70) | << "HTTP/1.1 400 Bad Request[\r][\n]"
DEBUG [main] header.wire(70) | << "Date: Wed, 04 Dec 2013 22:16:49 GMT[\r][\n]"
DEBUG [main] header.wire(70) | << "Content-Length: 0[\r][\n]"
DEBUG [main] header.wire(70) | << "[\r][\n]"

Getting Service Insight to connect to Management Service

My OS is a Windows 2012 Essentials.
I installed NServiceBus 4 using the installer, then installed Service Insight.
Accepted the default settings.
When I start up Service Insight, there is an error about connecting to the management service. I've tried putting in http://localhost:3333 but that errors out to a 404. I've verified that the service "particular management" is running.
EDIT
As per Hadi's instructions, I've pasted the url he listed: http://localhost:33333/api into the Connect to Management Service -> Service URL text box, but it still has a 404 not found error. When I try putting the URL into google chrome, I also get a 404 (with graphics courtesy of the oatmeal).
I've verified that a service named Particular Management is running. The description of the service is Particular Management Service for NServiceBus (Version 4.0.5).
I've ran the installer again to get to the modify/repair/remove options and verified in the modify option that the management service is installed.
Is there supposed to be a different service called Management Service? Is this maybe an issue introduced with version 4.0.5?
EDIT 2
I've appended the extra / to the end of the url, still no dice. This here is the logging information.
2013-10-11 09:15:58,488 - [INFO ] - IManagementService - HTTP GET http://localhost:33333/api//
2013-10-11 09:15:58,501 - [DEBUG] - IManagementService - HTTP Status NotFound (404) (http://localhost:33333/api//http://localhost:33333/api)
2013-10-11 09:15:58,506 - [DEBUG] - IManagementService - Response Header: Transfer-Encoding : chunked
2013-10-11 09:15:58,507 - [DEBUG] - IManagementService - Response Header: X-Particular-Version : 1.0.0-unstable122
2013-10-11 09:15:58,508 - [DEBUG] - IManagementService - Response Header: Cache-Control : private, max-age=300, must-revalidate
2013-10-11 09:15:58,509 - [DEBUG] - IManagementService - Response Header: Content-Type : text/html
2013-10-11 09:15:58,529 - [DEBUG] - IManagementService - Response Header: Date : Fri, 11 Oct 2013 14:15:58 GMT
2013-10-11 09:15:58,533 - [DEBUG] - IManagementService - Response Header: Server : Microsoft-HTTPAPI/2.0
2013-10-11 09:15:58,536 - [ERROR] - IManagementService - Error executing the request: , Status code is NotFound
You need the slash at the end:
http://localhost:33333/api/
The Url to Service Control (a.k.a Management Service) also needs /api, e.g. http://localhost:33333/api (you missed a 3?). At the end of the day, it is also a NServiceBus host process, so you need to check and make sure it is actually running (using Task Manager, or Services).