I am using Jetty Http Client v7.5.4.
The problem is that all Warn messages are coming on the console. I understand that Jetty uses sl4j. Since my app uses log4j, I have placed slf4j-api-1.6.4.jar and slf4j-log4j12-1.6.4.jar in the classpath.
Is there anything else I need to do so that I can capture the logs in a file?
I guess you should redirect jetty sysout.
Related
I am looking for a way to get more detail, like debug or verbose level logging, of a JMS message send over amqps to AzureServiceBus.
I am using qpid client 0.60.1 and I have no access to the calling code. I am working with a web application running in Weblogic. The application provides a servlet that has generic JMS functions, and I can use configuration that maps those to a specific providers' JMS connection factory libraries. To make qpid available to use, I add the qpid client jars to the CLASSPATH for when I start weblogic, and I provide a jndi.properties file that currently contains only two entries:
con
connectionfactory.ServiceBusConnectionFactory=amqps://?jms.username=&jms.password=
queue.inbound-general-q-QueueLookup=
Currently, this is the only message that I see in the weblogic log:
Connection ID:6147a0e7-1870-4a1a-8dd5-bd7102fc1aa4:106 connected to server: amqps://
I have been told that we don't have enough information to open a case with Microsoft.
I am looking for a way to get more detail, like debug or verbose level logging, of a message send. Ideally, want to see as much as possible: headers, properties, payload, etc.
The things I have access to change:
Weblogic environment, including classpath and any other java runtime flags
The jnd.properties file
I am reviewed the qpid.apache.org documentation on logging, but it has not been helpful to me as it is too vague.
The main application running in weblogic has these parameters in its runtime:
-Djava.util.logging.config.file=properties/logging.properties
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
I have tried adding some things to logging.properties, but it has never changed the output of the resulting log file to include anything from amqp.
I'm using JHipster to build a web application (awesome project, keep going guys :).
I'm using a server where apache is already installed deploying a php app (http://www.myurl.com)
I'm trying to deploy my JHipster app under another url (http://www.myurl.com/my_project)
I tried :
rewrite rule to redirect /my_project http://localhost:PORT/my_project using my own tomcat install
using runnable jhipster war
changing some cong in yml file to add context under server > context-path
Nothing is working fine :
access to first page webapp ok but 404 to any other pages
blank page, unable to load resources because context is missing I think
doesn't change anything
Any other idea? Something I forget? Something related to webpack ?
Thanks for any help :)
Use apache(httpd) proxying to redirect calls to your jHipster application to your tomcat
the configuration is meant to be put in apache configuration files you must have proxying mod enabled in apache but if my memories are good proxying user sessions from apache httpd to tomcat can be quite tricky. The following syntax is what you are looking for
ProxyPass "/images" "http://www.example.com/"
ProxyPassReverse "/images" "http://www.example.com/"
https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html
Summary: I have an SAAJ Client that calls a remote Web Service over HTTPS. Both Client and Server authentication via certificates is required. I can successfully invoke the service when running a JUnit test in my IDE, but fail to connect when running in JBoss.
Keystore/Truststore Configuration Details: In both the IDE and JBoss, I'm setting the keystore and truststore via system properties: javax.net.ssl.keyStore, javax.net.ssl.keyStorePassword, javax.net.ssl.trustStore, javax.net.ssl.trustStorePassword
Logging Configuration: In JBoss, I've enabled SSL Debug logging via the system property: javax.net.debug=SSL. I've also enabled CXF logging via a logging.properties file.
JBoss SSL Logging Output Summary:
SSL logging shows no WARN or ERROR logs
SSL logging shows a session is established at the time of the call to the remote service
JBoss CXF Logging Output Summary:
CXF logging shows that the POST is sent to the service via Conduit null.http-conduit
CXF logging shows this conduit is "configured for plain http", has "No Trust Decider", and has "No Auth Supplier" (I'm not entirely sure what all of this means, but it sounds relevant)
Stack Trace: Here's the actual stack trace I'm getting
Caused by: javax.xml.soap.SOAPException: JBWS024004: SOAP message could not be sent
at org.jboss.wsf.stack.cxf.saaj.SOAPConnectionImpl.call(SOAPConnectionImpl.java:124)
at my.client.soap.MySAAJClient.invoke(MySAAJClient.java:37) [my-client-0.0.1-SNAPSHOT.jar:]
... 17 more
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '403: Forbidden' when communicating with https://remote.service.url.here/
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1542)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1502)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
at org.jboss.wsf.stack.cxf.saaj.SOAPConnectionImpl.call(SOAPConnectionImpl.java:120)
... 19 more
Other Information
I don't have direct access to the logs of the remote web service, but I'm told that they "don't show anything"
CXF comes into play because it is used by JBoss. I don't have any CXF dependencies included in my project and it's not in play when I run the code in my IDE.
What I've Tried: I've been focused on CXF because again, this all runs fine when executed in my IDE where CXF is not in play and the CXF log that says the conduit has been "configured for plain http" scares me. I've tried including a jboss-cxf.xml, jbossws-cxf.xml, or cxf.xml configuration file in my WAR that includes the keystore and truststore configuration. This has not worked and I can't even tell that CXF is seeing these files.
My Questions (Updated)
Is there any way to get JBoss/CXF to see that this is a secure connection and use the keystore/truststore configured via system properties?
Is there any way for me to direct JBoss (via jboss-deployment-structur.xml maybe?) to use a different SAAJ implementation for my deployment?
Do you have any thoughts on other things I should be looking into?
Update 1
I believe I've confirmed that the JBoss-CXF integration is the issue. I was able to remove JBoss's SOAPConnectionImpl by modifying the file {JBOSS_HOME}/modules/system/layers/base/org/jboss/ws/saaj-impl/main/module.xml. I commented out the module dependency <module name="org.jboss.ws.jaxws-client" services="import"/>.
After making this change, my application was able to connect to the remote service with no issues.
Although this shows that the JBoss-CXF integration is this issue, I can't modify the deployment environment in this way. I need to identify another solution.
I'd go for system properties (or at least knowing the configuration of the system) as they might override whatever you specify in your deployment.
What version of cxf is used on the deployment environment? Do you have any info on the configuration of cxf on your deployment environment? From the documentation (http://cxf.apache.org/docs/ws-security.html), I can see you need to configure WSS4J interceptors for cxf 2.0.x or earlier, so you could check if this is okay on your deployment environment.
I have an application tomcat + apache + mod_jk + spring mvc deployed on remote server. After making request to the controller I am having jsp source code in the response. It is not related with spring config cause locally it is working. After debugging mod_jk I see that tomcat returns jsp source.
I think the problem is related with remote tomcat or apache (cause it was configured by our it department). Is it possible to dissalow jsp execution on tomcat or apache (maybe httpd conf)? Plese suggest how can resolve this problem.
Apache Web Server does not execute JSPs, so you're probably getting your JSP from there.
Normally, static files are deployed on Apache Web Server, and dynamic files (JSPs, Custom Tags, classes, etc.) are deployed on Apache Tomcat (where Apache Web server redirects the corresponding requests). Check if your app is deployed this way.
Try to send an HTTP request directly to the Apache Tomcat (without intervention of Apache Web Server, and see what happens)
The reason was that jsp compiler was disabled see org.apache.jasper.servlet.JspServlet, in the tomcat\conf\web.xml. It-team says that it is recommend option for production)
I would like to have Jetty log all HTTP requests (along with the body) and responses. Is this natively supported by Jetty? Ideally it would log to my existing log4j log file.
I am running Jetty 6.
Jetty comes with a request logger that can log in NCSA format. That format doesn't include things like request body as you require, but that standard format will fit tools like webalizer and the like.
If you need to log more you can use the logback request log implementation or write your own logger by implementing Jetty's RequestLog interface.
Besides that I'd highly recommend to upgrade to jetty7/8 (same codebase, but 8 provides servlet 3.0 functionality). Or directly move to jetty9.
Here's the jetty9 documentation for request logs:
http://www.eclipse.org/jetty/documentation/current/configuring-logging.html#configuring-jetty-request-logs
Same for jetty7/8:
http://wiki.eclipse.org/Jetty/Tutorial/RequestLog
I leave it as an exercise for you to find the jetty6 docs or better yet, upgrade. :)
Ok, just found the jetty6 docs by accident: http://docs.codehaus.org/display/JETTY/Logging+Requests
TL;DR
You have to enable the right modules, just add into the start.ini file:
# Create access log file
--module=requestlog
# Redirect all the console log to a file
--module=console-capture
Restart Jetty and have a look into the logs directory.