logging apache httpasyncclient - httpclient

Hi I followed the instructions here: http://hc.apache.org/httpclient-3.x/logging.html since it was the only logging instructions I could find on the site, but I was still not able to turn logging on for the httpasyncclient. It works for the typical httpclient, not async. Thanks.

You are using logging configuration of the outdated HC 3.x, which obviously does not work neither with the blocking nor the non-blocking HC 4.x clients. You find the correct logging guide here
http://hc.apache.org/httpcomponents-client-4.3.x/logging.html

Related

Unable to integrate CQ5.6.1 with Site Catalyst

I'm having difficulty in integrating AEM 5.6.1 with Site Catalyst. It allows me to connect in the configuration successfully, but does not work on the framework setup.
I've followed the standard procedure to connect AEM to SC and it accepts my login in the configuration, but fails on the framework set up with the browser message 'We were not able to login to SiteCatalyst. Please check your credentials and try again.'. Behind the scenes in the server log;
12.12.2014 14:10:06.967 *WARN* [0:0:0:0:0:0:0:1 [1418393406764] POST /libs/cq/analytics/sitecatalyst/service.json HTTP/1.1] com.day.cq.analytics.sitecatalyst.impl.SitecatalystHttpClientImpl Data center 'https://api3.omniture.com/admin/1.3/rest/' responded with errors {"error":{"code":500,"message":"Internal Server Error"}}
12.12.2014 14:10:06.967 *ERROR* [0:0:0:0:0:0:0:1 [1418393406764] POST /libs/cq/analytics/sitecatalyst/service.json HTTP/1.1] com.day.cq.analytics.sitecatalyst.impl.servlets.SitecatalystServlet Call to SiteCatalyst method 'Company.GetReportSuites' failed com.day.cq.analytics.sitecatalyst.SitecatalystException: not authenticated
I've tried accessing via the API Explorer and it works.
I've tried the troubleshooting guide without success.
I can log in to Site Catalyst, I'm an admin, I am in the web services access group.
I've tried using a clean install of CQ5.6.1 with geometrixx - it doesn't work either.
I've tried this from a server and from a localhost/dev machine with the same results. No proxy. I've even tried using the shared secret as the password but then it doesn't connect at all, and fails on the configuration screen.
What might cause this to fail?
If it doesn't work with a fresh install and Geometrixx, then it's probably an Adobe bug. That's typically the first thing support will ask you about.
I would also verify using Geometrixx Outdoors, or a more recent demo site, on your fresh install, just to ensure it's not an outdated ClientLib issue.
I know this isn't a direct answer to your question, but honestly, I would approach the integration differently. I've worked with the AEM-SC framework and it's buggy at best. It's very finicky, it doesn't REALLY work the way the documentation claims, and it requires that you're very specific about what Clientlibs are on the page.
Moving forward, I think using Adobe Dynamic Tag Manager is the better approach, for many reasons. My understanding is that it's Adobe's recommendation as well. I'd consider moving to that. In AEM 5.6.1, you'll have to customize your integration with DTM, but it's not very hard.
Solution: Add a property on the configuration node for sitecatalyst: (eg. /etc/cloudservices/sitecatalyst/my-sc-configuration)
server=https://api.omniture.com/admin/1.2/rest/
it also seems to work with newer API versions such as https://api3.omniture.com/admin/1.3/rest/
It would appear that for 5.6.1 it ignores the OSGi configuration, at least for the configuration screens. With this extra property, the framework page loads without error and allows selection of the RSID.

Options for Debugging Akka applications? - Activator or/and something else ?

Someone told me that I should use the TypeSafe console to debug issues in my Akka app. Search for the console takes me this page. However, the link directs me to Typesafe Activator. I'm assuming Activator replaced the console.
However, I couldn't find any documentation that tells me how I can trace a running Akka system and debug it. Any pointers about how what my options would be appreciated. Also, how can I use Activator to debug my Akka app.
I can also mention Kamon.io and akka-tracing projects. Both of them can serve as debug tools (first one is more metrics-oriented and second one is a dedicated tracing tool).
Full disclosure: I'm the maintainer of akka-tracing who faced similar problems =)
There has been a discussion on the akka mailing list recenty.
Regarding activator see this video.
And there's is also New Relic.
Yes, Activator will replace the Console soon, which is now only in maintenance.
In Activator you can use the Inspect feature to get some insight into your app.
Other than that if you say "debug" - normal debugging (as in just using an IDE) also works, but yes - in message driven apps is a bit harder to apply.

How to see requests in Sinatra?

I used to be able see http requests made for sinatra in the window I started my sinantra application from.
I think that after sinatra upgrade I cannot see them any more and I don't know how to make it so. I don't need to log them into a file.
set :logging, true didn't help
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
rack (1.4.0)
rack-protection (1.2.0)
sinatra (1.3.2)
sinatra-advanced-routes (0.5.1)
sinatra-reloader (0.5.0)
sinatra-sugar (0.5.1)
This is a bug introduced in Sinatra 1.3.2. The commit that introduced it was intented to fix another bug where the logging was being done twice in certain circumstances, but obviously isn't quite right.
This request logging is done by using the Rack::CommonLogger middleware component, which is now only added in certain cases. The fix/workaround is to simply add it yourself. Add
use Rack::CommonLogger
to the top of your application file (after requiring Sinatra). Note that you might end up with the original problem of seeing requests logged twice in some situations (e.g. if your deployment setup is different from your development setup).

Conditional proxy re-direction in Eclipse?

I am testing out an environment where I have multiple proxies set up depending on what URL I access. I have my browsers working by configuring my wpad.dat file properly according to the examples I found here. However, I am using Eclipse 3.6 and cannot seem to find a way to access different proxies based on any conditional information.
Any Eclipse veterans have an idea? Is there a plugin that I could use?
Thanks!
As it turns out, folks, there is no way to do this. I ended running an instance of Apache on my local machine, and using it as a proxy to do the conditional redirection based on the domain using the ProxyRemote configuration. Read more about it here:
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxyremote

Where does GWT's Hosted Mode Jetty Run From?

I'm trying to call a web service in my back end java code when it's
running in hosted mode. Everything loads fine, the GWT RPC call works
and I can see it on the server, then as soon as it tries to call an
external web service (using jax-ws) the jetty falls over with a
Internal Server Error (500).
I have cranked the log all the way up to
ALL but I still don't see any stack traces or cause for this error. I just get one line about the 500 Error with the request header and response.
Does anyone know if the internal jetty keeps a log file somewhere, or
how I can go about debugging what's wrong?
I'm running GWT 1.7 on OS X 10.6.1
Edit: I know that I can use the -noserver option, but I'm genuinely interested in finding out where this thing lives!
From the documentation:
You can also use a real production
server while debugging in hosted mode.
This can be useful if you are adding
GWT to an existing application, or if
your server-side requirements have
become more than the embedded web
server can handle. See this article on
how to use an external server in
hosted mode.
So the simplest solution would be to use the -noserver option and use your own Java server - much less limitations that way, without any drawbacks (that I know of).
If you are using the Google Plugin for Eclipse, it's easily set up in the properties of the project. Detailed information on configuration can be found on the official site.
Edit: you could try bypassing the Hosted Mode TreeLogger, as described here: http://blog.kornr.net/index.php/2009/01/27/gently-asking-the-gwt-hosted-mode-to-not):
Just create a file called
"commons-logging.properties" at the
root of your classpath, and add the
following line:
[to use the Log4j backend]
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
[to use the JDK14 backend]
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
[to use the SimpleLog backend]
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
Edit2: the trunk of GWT now also supports the -logfile parameter to enable file logging, but it probably won't help in this case, since the problem lies in the way the Hosted Mode treats the exceptions, not the way it presents them.