Tomcat access logs - are failed requests included? |
It is more likely that your Tomcat process is leaking memory until it got
no more free memory. Try to log the heap size with each request, and then
notice if it keeps growing.
The tomcat class loader can leak memory, especially if you use the
"automatic deploy" feature.
long freeMem=Runtime.getRuntime().freeMemory();
long maxMem=Runtime.getRuntime().maxMemory();
long totalMem=Runtime.getRuntime().totalMemory();
And then log freeMem/MaxMem and totalMem. If max keeps growing you got a
leak.
Edit: And to answer your question. That depend on exactly how tomcat fails,
and how you have set up logging. But with our system(A rather default
apache mod_proxy=>tomcat, there are some fatal tomcat errors which are only
logged in catalina.out
|
Google Analytics for separate multiple domains |
Wouldn't it seem more fit to add the domain to the clients email address
than adding it to your own? Or create a new account for them? Thay way they
have total control of it if they wish.
Otherwise, to answer your question: The best way to keep it the way you set
it up is probably just to have multiple accounts. Add the extension 1, 2, 3
etc. or something.
|
GST_DEBUG: How to save logs in a separate file for a thread inside an application |
GST_DEBUG_FILE=/tmp/gst.log will put all the logging into that file, but
for separate log for separate threads you will need to write your own
loghandler. Have a look in gstinfo.c, and gst_debug_add_log_function.
As for your Q2, again, you will need to write your own loghandler if you
want it to start from GST, since these other fields (timestamp, process-id,
thread etc.) are included in the default loghandler. (again see gstinfo.c,
gst_debug_log_default)
|
Can you host a sub-domain on a separate server with a separate hosting account? |
Of course, it's possible. All you have to do is to create a DNS record IN A
pointing to the IP of your new server. See here, for example:
http://content.websitegear.com/article/subdomain_setup.htm
|
Web Deploy Command Line Logs in Event Logs (Updated / Inserted / Deleted Files) in event logs |
I don't believe you can log the activities to the event log, but what you
can do is use the -xml parameter to output the changes in XML format. You
could then use this to log to the event log via a Powershell script, for
example.
|
Access-control-allow-origin with multiple domains |
There can only be one Access-Control-Allow-Origin response header, and that
header can only have one origin value. Therefore, in order to get this to
work, you need to have some code that:
Grabs the Origin request header.
Checks if the origin value is one of the whitelisted values.
If it is valid, sets the Access-Control-Allow-Origin header with that
value.
I don't think there's any way to do this solely through the web.config.
if (ValidateRequest()) {
Response.Headers.Remove("Access-Control-Allow-Origin");
Response.AddHeader("Access-Control-Allow-Origin",
Request.UrlReferrer.GetLeftPart(UriPartial.Authority));
Response.Headers.Remove("Access-Control-Allow-Credentials");
Response.AddHeader("Access-Control-Allow-Credentials", "true");
Response.Headers.Remove("Acce
|
php copy() on same server different domains |
Try editting your /var/www/vhosts/domain1.com/conf/vhost.conf file. If it
doesn't exist, create it. Then add the following line:
php_admin_value open_basedir
"/var/www/vhosts/domain1.com/httpdocs:/var/www/vhosts/domain2.com/httpdocs"
Save the file and then reload your apache configuration by running this
command on the command line assuming you have priviledges:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain1.com
|
Nodejs: want to map domains to server |
If you use something like node http-proxy or nginx you can run each of the
separate sites on different local ports and then map the domain name back.
I use the http proxy but others love nginx.
For that to work, you'll need to add DNS entries resolving to the IP
address that your reverse proxy is running on. Then for example, the port
80 request will get mapped back to localhost:3000.
This allows for each app to run in isolation and in separate processes from
the other sites. They can't crash each other. You also don't have
namespace issues where both apps claim the same path.
My app.js for the http proxy looks like this:
var proxyPort = 80;
var http = require('http');
var httpProxy = require('http-proxy');
var options = {
router: {
'localhost': '127.0.0.1:3000',
|
How can I make separate pull-requests for each commit in GitHub? |
Here are some screenshots taken from the Mac OSX version of the GitHub
desktop program.
Here I am making the first commit, but you can see both changes have been
made prior to the commit:
Here I am making the second commit:
Here you can see that each commit was accepted individually:
Note: Some names have been blanked out for privacy.
Assuming that the Windows version of GitHub has the same options, I would
download the desktop program and try that.
|
copy files across different domains sql server clr |
The account that the "assembly" is running under must have permissions to
do what your asking it to do.
Either that or you must have a portion of the code in your assembly begin
running under the context of a user that does have these permissions to do
the copy.
This really has nothing to do with SQL server. Its simply does the account
executing the code have the permission to do what your telling it to do.
|
multiple domains in server - howto |
You have a few options that I know of, mostly depending on whether traffic
goes to the same ip or not.
When setting up DNS entries you can specify wildcard for subdomains.
*.example.com which makes it so that any request for any subdomain that
isn't match by another DNS record goes to example.com.
So, having:
*.example.com <ip A>
blog.example.com <ip B>
Would make blog.example.com go to < ip B> and example.com and all other
subdomains go to < ip A>.
This means you could have the possibility of giving each new subdomain go
to its own ip (very unlikely). You can also catch them all at the same ip
and handle it there.
As you mentioned, you could add a new virtual host for each new sub domain
created. However, that's kind of a heavy solution, and I think it
|
How to reverse IP to domain and get domains on the same server ? |
Simplest way is to use that function:
http://php.net/manual/en/function.gethostbyaddr.php
To get something more you probably should play with functions like "system"
and unix tools like "host" command and parse thier output.
Or directly query the DNS - you can read here more about it:
http://en.wikipedia.org/wiki/Reverse_DNS_lookup - basically you're doing a
query for domain that looks like this:
5.2.0.192.in-addr.arpa where 5.2.0.192 should be replaced with address
you're intrested in.
|
mod rewrite: handling sub domains, top level domains and query string |
You just need one rule as QUERY_STRING is automatically copied over to
after redirect.
RewriteCond %{HTTP_HOST} !^example.org$ [NC]
RewriteRule ^ http://example.org%{REQUEST_URI} [R=301,L]
|
Can a single hosts file entry contain multiple domains/sub-domains? |
I found the solution.
On IIS, I had to add https in bindings associating it to use IIS
Development Certificate for SSL in my development environment.
Also, in the process I found that both of the following wiil work for me.
127.0.0.1 somedomain.com, alternate-domain.com, subdomain.domain.com
or
127.0.0.1 somedomain.com alternate-domain.com subdomain.domain.com
Spaces and commas both work, and I can add multiple domains, subdomains
combinations on same line.
Also, if you are moving from a non-secure domain to secure
domain/subdomain, SSL certificate needs to be setup on web server for it,
else it would end up showing an error in the browser.
Cheers!
|
Access browser logs in Selenium? |
You could inject javascript and override the log function (as reading the
log is not permitted from JS).
See http://tobyho.com/2012/07/27/taking-over-console-log/ for an example
and there are many SO questions on this topic.
The problem with this is that it still can't get the logs which happened
prior to injection.
It gets easier if you override this in the test deployment directly.
|
one server many http domains and one https domain |
If you are using some versions of Apache, I know as late as version 2.2,
you will need to include the line:
NameVirtualHost *:80
before your virtual host lines. I can't be sure that this is your problem,
but I just had the exact same thing happening to me on Arch, which
apparently doesn't have the latest Apache.
|
Server sends email to selective domains only |
Are you using a SMTP server to send out the mail? Other hosts might think
your headers look spammy. This article goes over setting up email to use
SMTP instead of the mail() function.
http://www.inmotionhosting.com/support/edu/joomla-25/how-to/configure-email-over-smtp
|
Multiple Domains on single grails application and second domain only with access to one specific controller? |
If both domain points to the same server, and Tomcat is used for both as
your public facing web server, then you just need to modify the part inside
your Grails.
In Controller, you can check which domain was used to access your
application:
def uri = new java.net.URI(request.getHeader("referer"))
def domainName = uri.getHost()
|
htaccess - hosting multiple domains on one shared server, |
Untested code: I believe you can do the following
RewriteCond %{HTTP_HOST} ^(www.)?site1.com$
RewriteRule ^site2/(.*)$ http://site1.com/$1 [R=301]
This will (or should) redirect the client from
http://site1.com/site2/my/awesome/page.php to
http://site2.com/my/awesome/page.php.
|
Unable to see access logs in my Google Storage Bucket |
cloud-storage-analytics@google.com needs to have write permission for your
LogBucket as described here:
https://developers.google.com/storage/docs/accesslogs
|
I am testing my android application on my phone,and i want to access my camera and see the logs as well |
Logcat is always available. And if you are opening Camera from your app
then you can see Logcat messages
so may be there are few reason as follows :-
check if connect your device as usb debug mode.
your device should not be connect as a media device.
hope it will solve this issue
|
Import old apache access logs to webalizer - ignoring records |
I ran into the same problem. I had just installed webalizer, and changed
it to incremental mode (here are the relevant entries from my
/etc/webalizer/webalizer.conf):
LogFile /var/log/apache2/access.log.1
OutputDir /var/www/htdocs/w
Incremental yes
IncrementalName webalizer.current
And then I ran webalizer by hand, which initialized the non-gz files in my
logs directory. After that, any attempt to manually import an older gz
logfile (by running webalizer /var/log/apache2/access.log.2.gz for
instance) resulted in all of the entries being ignored.
I suspect this is because the entries found in the gz logs were older than
the last import- I had to delete my webalizer.current file (really I
cleared the whole dir- either way should work). Finally, in reverse order
(oldest first), I cou
|
how to get request-response logs on weblogic server |
If you need HTTP request log, follow documentation:
http://docs.oracle.com/cd/E13222_01/wls/docs90/ConsoleHelp/taskhelp/logging/EnableAndConfigureHTTPLogs.html
If you want more data or response, you need to write (or find) servlet
filter that will dump requested data to file
|
Capturing and sending crash logs to the server |
Yes, there are several solutions that provide this functionality. One of
them that I'm intimately familiar with (and works very well) is Apigee's
Mobile Analytics (http://apigee.com/docs/enterprise/content/analyze_apps).
One of the important points for dealing with crash logs is to save a copy
of your .dSYM. This is needed to symbolicate the crash log.
|
View all transaction logs in SQL Server 2014 |
As far as I know your only options for this are:
Third party tool ApexSQL Log (Red Gate has a free tool but only for SQL
Server 2000)
Undocumented commands such as DBCC LOG or fn_dblog.
Change data capture – this is SQL Server feature that automatically
creates history tables but its only available in enterprise edition
We are also evaluating SQL Server 2014 CTP 1 for it’s in memory features
but I haven’t been able to find anything on this topic. I don’t really
believe MS is going to allow this any time sooner. Right now their focus is
on enterprise level features such as high availability, in memory queries
and such… Also, they have their own version of this in CDC.
|
Send C# Application Logs to Linux Syslog Server |
try using log4net, it offers a RemoteSyslogAppender
https://logging.apache.org/log4net/release/framework-support.html
below an example of configuration
<appender name="RemoteSyslogAppender"
type="log4net.Appender.RemoteSyslogAppender">
<facility value="Local6" />
<identity value="MyApp[%level][%property{log4net:HostName}]" />
<layout type="log4net.Layout.PatternLayout" value="%-5level %logger
[%ndc] - %message" />
<remoteAddress value="yourAddressHere" />
</appender>
|
C# web app is using none hard coded path of dev pc showing up on server logs |
The folders you see there are taken from the projects debug symbols. They
are only there for you to know where the files were located on the build
computer.
This information is usually not accessible from your code so the error you
are encountering is probably something else in the implementation of
theme_skin_url.
|
read and store server logs in real tine |
You need to read each file in a separate thread, and ensure that the code
to write to database is thread safe.
Edit: I put this in a comment, but actually it's part of the answer: from
Java 7 you can get the filesystem to call you back when a file changes
http://docs.oracle.com/javase/7/docs/api/java/nio/file/WatchService.html
That way you don't need to poll the file size like you're doing... but you
do still need 1 thread per file.
Tutorial for WatchService is here:
http://docs.oracle.com/javase/tutorial/essential/io/notification.html
|
WCF Service: How to find server logs to understand error? |
Logging is not necessarily turned on. Tracing and logging need to be
enabled in WCF configuration (app.config or web.config).
You can do this manually, or by clicking app.config and then selecting Edit
WCF Configuration. If this item doesnt appear in context menu (happens in
old versions of VS), you can find it in VS Tools menu or by running it
manually (SvcConfigEditor.exe).
By default, messages are logged to files in directory from which
application is ran. You can edit this in configuration editor once you
enable logging. Editor will allow you to specify file path once you enable
logging or tracing.
You can later use Microsoft Service Trace Viewer tool for going through the
files, as large XMLs and are not user friendly. Viewer tool should come up
itself once you double click log fi
|
How to conveniently store common logs and client specific logs |
I would have an xml file that contain the appenders to specify what
packages go into what log file.
You can then load the xml file in your application entry point. Below is an
example I have used in my current project
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out" />
<param name="threshold" value="error" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%t] %p %c -
%m%n" />
</layout>
</appender>
<appender name="codebaseXAppender"
class="org.apache.log4j.RollingFileAppender">
<
|
Doorkeeper separate resource server from the authorization server |
You should add a database connection to the authorization server, and in a
MyApp::Application.config.to_prepare block instruct the relevant doorkeeper
models to connect via those credentials.
See
https://github.com/applicake/doorkeeper/issues/266#issuecomment-26800252.
|
Configuring eclipse to delete logs before tomcat server startup |
I'm not sure if Eclipse is the right tool to accomplish that. In my current
project server start and application deployment is managed by Ant and
include a Task to erase Logs between this processes is trivial.
Ant integrates nicelly with Eclipse and Tomcat. You can do the same with
Maven if you prefer
|
Why does django return 301 and 302 as server response codes after a user logs in and a flatpage is displayed? |
I can't see your url pattern for the home view. But it's probably the
missing slash which makes django send out a auto-redirect:
https://docs.djangoproject.com/en/dev/ref/settings/#append-slash
Is my web client sending the request underling the fourth line? How
does it know to do this?
Yes, Status code 301 in line 3 tells the browser 'the page you requested
moved to another url x'. And browsers will usually always automatically
send a new request to that new url x which is line 4.
|
How to set intellij to show logs in the logs tab and not the output tab |
In the application server Run/Debug configuration open the Logs tab and
specify the full log file path there.
You can just search your disk for algo_js.log file and specify its
location.
|
SQL Server 2012: Calculating total time elapsed for every unique record from a logs table |
I believe this will work:
SELECT Entity,Destination'Type',Time,SUM(TimeDiff) OVER (PARTITION BY
Entity, Destination ORDER BY Time)'Running Total'
FROM (SELECT Entity,
LEFT(SOURCE,2)'Source',LEFT(Destination,2)'Destination',Time,
DATEDIFF(second,LAG([Time]) OVER (PARTITION BY Entity ORDER BY
[Time]),[time])'TimeDiff'
FROM #test
)sub
ORDER BY TIME
Or if you just want the total time for a given Entity/Type combination:
SELECT Entity, Type, MAX(Running_Total)
FROM (SELECT Entity,Destination'Type',Time,SUM(TimeDiff) OVER (PARTITION BY
Entity, Destination ORDER BY Time)'Running_Total'
FROM (SELECT Entity,
LEFT(SOURCE,2)'Source',LEFT(Destination,2)'Destination',Time,
DATEDIFF(second,LAG([Time]) OVER (PARTITION BY Entity ORDER BY
[Time]),[time])'TimeDiff'
FRO
|
Access EJB from JSF Bean in separate modules |
So based on comments above I have solved this problem.
I went to web module of my application and to lib folder of it.
Right click -> add project
Found my EJB module and selected it. Not sure if this is good idea, but for
now it seems it works.
|
Get iPhone Logs(not crash logs) |
Got a breakthrough!!. We need to re-direct NSLog to a file like this and
then access the file.
- (void)redirectNSLogToDocumentFolder{
NSArray *paths =
NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,
YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *fileName =[NSString stringWithFormat:@"%@.log",[NSDate
date]];
NSString *logFilePath = [documentsDirectory
stringByAppendingPathComponent:fileName];
freopen([logFilePath
cStringUsingEncoding:NSASCIIStringEncoding],"a+",stderr);
}
http://objcolumnist.com/2009/12/19/redirecting-nslog-to-a-log-file/
|
Bad Request (400) error while trying to access REST API using requests in python |
auth argument is to set Authorization header (basic http authentication by
default). The API expects credentials in the body:
r = request.post(url, data=xml, headers={'Content-Type':
'application/xml'})
where
xml=b"<authCommand><userID>sdm@company.com</authCommand>...".
|
Is there a way to protect direct access to pages - but allow ajax requests? |
Ajax requests should have an extra header HTTP_X_REQUESTED_WITH and the
value would be xmlhttprequest, so you can add a check
$_SERVER['HTTP_X_REQUESTED_WITH'] == 'xmlhttprequest'
Please note that this can still be imitated by an curl library, It's just
an extra line of security
|
Python: How to use requests library to access a url through several different proxy servers? |
According to this thread, you need to specify the proxies dictionary as
{"protocol" : "ip:port"}, so your proxies file should look like
{"https": "84.22.41.1.3128"}
{"http": "194.126.181.47:81"}
{"http": "218.108.170.170:82"}
EDIT:
You're reusing line for both URLs and proxies. It's fine to reuse line in
the inner loop, but you should be using proxies=proxy--you've already
parsed the JSON and don't need to build another dictionary. Also, as
abanert says, you should be doing a check to ensure that the protocol
you're requesting matches that of the proxy. The reason the proxies are
specified as a dictionary is to allow lookup for the matching protocol.
|