Stderr log
I guess I have a configuration and a design issue. I need to make the stderr log available to the user. So in case of an error they
can cut and paste the error information in the log and send it to us. It is a quick way of getting the error message.
I found this by googling it:
http://naive-amseth.blogspot.com/2010/06/opening-pdf-txt-or-doc-files-in-adf.html
But this says the log has to be in the public html directory. when we deploy t o devtest and production we are not able
to access the directories. They are deployed as ear files.
How do I configure weblogic to write to a separate text file when there is an error.(Is it stderr?) then make it available as
a txt file to the user?
Why don't you implement an error handler page where you print the stack trace of the exception to the page?
This way the user sees the actual error and does not have to scan through a log file.
Something like this on a page:
<af:outputText value="#{ShowErrrorBean.stacktrace}"
rendered="true" id="ot1"/>and the code of the ShowErrrorBean to print the stack trace onto the page...
public String getStacktrace()
if (cc.getCurrentViewPort().getExceptionData() != null)
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
Exception e = cc.getCurrentViewPort().getExceptionData();
e.printStackTrace(pw);
this.executeRollback();
processException(e);
cc.getCurrentViewPort().clearException();
return sw.toString();
return null;
}Timo
Similar Messages
-
Timestamp in stderr.log file
I have WLS 8.1 setup on Win2k servers. Unlike all the other log files, the stderr.log file does not contain the timestamp in it which makes it very difficult to know at what time a particular error occured. Where can I set this up ? Kindly let me know.
Kevin.I have WLS 8.1 setup on Win2k servers. Unlike all the other log files, the stderr.log file does not contain the timestamp in it which makes it very difficult to know at what time a particular error occured. Where can I set this up ? Kindly let me know.
Kevin. -
Enabling timestamps in stderr.log in WAS
Hi! I am using Websphere Application Server 4.0 for deplopying my web application.
I find that logs are created for output and error in stdout.log and stderr.log.
However, while stdout.log has timestamps, stderror.log does not have time stamps.
How do I enable time stamps for stderr.log ?Hi! I am using Websphere Application Server 4.0 for
deplopying my web application.
I find that logs are created for output and error in
stdout.log and stderr.log.
However, while stdout.log has timestamps, stderror.log
does not have time stamps.
How do I enable time stamps for stderr.log ?First, post such messages in correct forums.. TheN I suggest you not to use SOPs in you class.. Rather you can use the Log4j which is the best I feel for logging messages.. You can get a free download from apache.. You can control the way messages are logged by simply changing a XML file!!
Cheers
-P -
Rotate Log Files - stdout.log & stderr.log
Hi Folks,
Whats the best way to rotate stdout.log & stderr.log.
I am assuming that rolling of these files can not be configured using felix (please correct me if I am mistaken)
Please advice!
Thanks,
AdnanHi Adnan,
There is currently no way to rotate stdout.log and stderr.log. Therefore, if you want to preserve the stdout.log and stderr.log so that they do not get truncated after restart, add the following commands before any other command in the start script.
# Move stdout.log and stderr.log
mv ../logs/stdout.log ../logs/stdout_$(date +%Y-%m-%d-%H%M).log
mv ../logs/stderr.log ../logs/stderr_$(date +%Y-%m-%d-%H%M).log
Another possible way is to disable the stdout.log and stderr.log entirely and instead output the information to the startup.log. Then you can rotate the startup.log instead.
a) To disable the stderr.log and stdout.log, i guess you can add these lines to your crx-quickstart/server/start script:
QUICKSTART_OPTS='-verbose -nobrowser'
export QUICKSTART_OPTS
b) To configure the path of the startup.log, you can add this to the start script as well (replace /path/to/startup.log with the path you would like the log to be written to instead):
CQ_LOG=/path/to/startup.log
export CQ_LOG
c) Then after doing this, there is a side effect that crx output will go to the startup.log as well. to fix this, do the following:
1) Go to crx-quickstart/server/runtime/0/_crx/log4j.xml
2) Comment out this element <appender-ref ref="console" /> from log4j.xml
<root>
<level value="info" />
<!-- appender-ref ref="console" /-->
<appender-ref ref="error" />
</root>
d) Also, now you would like to rotate the startup.log file:
"The file startup.log logs messages while the Servlet Engine starts. It is usually small, and you cannot configure it."
The startup log cannot be rotated with CQSE facilities. Please note that logs under /server is rotated at operating system level,
for more info see http://httpd.apache.org/docs/2.0/programs/rotatelogs.html
Unix workaround :
in serverctl script, replace the line :
exec $jvmExe >> "$CQ_LOG" 2>&1
by :
exec $jvmExe | /usr/sbin/rotatelogs "$CQ_LOG.%Y%m%d" 86400 >> /dev/null 2>&1
If this doesn't seem to work, then try
exec $jvmExe 2>&1 | /usr/sbin/rotatelogs "$CQ_LOG.%Y%m%d" 86400
Unfortunately, I did not found any workaround for windows system.
Hope this helps.
Thanks,
Varun -
hello everyone,
I recently used Oracle SOA Suite 10g to deploy my WAR file in it, i found the log file which contains the stdout and stderr in "ORA_HOME\opmn\logs\default_group~home~default_group~1.log".
My question is: How can I view this log file through the Application Server Control?Hi Hussam,
received your screen shot and it just misses the vital pieces, the content above the blue line. On the upper right left you will find four links called Setup, Logs, Help, Logout. Logs might be greyed out and not working. To make this working click on the name of type Application Server (J2EE.wbt in your case). This will open a page for the Application Server. Logs should be a normal link now.
--olaf -
Rolling weblogic.stderr and weblogic.stdout log files
Is there a way of make the -Dweblogic.stderr and -Dweblogic.stdout log files, rotate by size or time? We are running into 100MB+ files because we can't find any documentation about how to rotate these files.
Thanks,
RajeshThe stdout and stderr output options in weblogic apply to the jvm process using the standard unix standard in/ standard out redirection; therefore, BEA has not included a native method to rotate these files.
However, in weblogic 10, if you place these files in the same directory as the weblogic output log (not to be confused with -D=/path/to/stderr.log and -D=/path/to/stdout.log they will be rotated every time you restart the server.
The other way to get fine-grained log rotation on these files is to use a standard log rotation mechanism such as logrotate: http://linuxcommand.org/man_pages/logrotate8.html
The other option is to address logging using an application framework such as log4j from a development standpoint.
As of right now, these are your only options, unless someone puts in a feature request to BEA. -
How do I get std out to log to myserver.log
Using WL6.1 sp2, my Std Out messages go to the dos window (Win NT).
How do I get them to also go to myserver.log.
I have looked at the Console options and all logging is on. Info level etc.
I also tried Right Clicking MyServer and choosing 'Get StdErr for this server' but
get a message
'<01-May-02 14:35:02 BST> <Error> <NodeManager> <Cannot get the logs for the admin
server 'myserver' for this domain via the Node Manager. Please look at the command
shell of the Admin server for StdOut and StdErr logs> '
All I'm trying to see is an up to date log file of the std out
without stopping the server. This was easy in WL5.1.hi pete,
this works okay for me. my log file was the default inside Logging |
General
config/manga/logs/weblogic.log
this file gets all that is dumpt to stdout. i changed the name of this and
had to restart the server to the
new log file name to take effect. but that worked. all more log files are
under my domain, eg manga in
the logs directory.
i'm using weblogic v6.1 sp2 on windows 2000 at Log level Info
cleve
"Pete" <[email protected]> wrote in message
news:3ccfef97$[email protected]..
>
Using WL6.1 sp2, my Std Out messages go to the dos window (Win NT).
How do I get them to also go to myserver.log.
I have looked at the Console options and all logging is on. Info leveletc.
>
I also tried Right Clicking MyServer and choosing 'Get StdErr for thisserver' but
get a message
'<01-May-02 14:35:02 BST> <Error> <NodeManager> <Cannot get the logs forthe admin
server 'myserver' for this domain via the Node Manager. Please look at thecommand
shell of the Admin server for StdOut and StdErr logs> '
All I'm trying to see is an up to date log file of the std out
without stopping the server. This was easy in WL5.1. -
Tomcat as NT Service not writing to error log
I created an NT service for Tomcat and want to write output to stdout.log (System.out) and stderr.log (System.err), but instead, it's writing both System.out AND System.err to stdout.log. Strangely enough, stderr.log does get created, but is never written to.
Here is the command I used to create the service:
%CATALINA_HOME%\bin\tomcat -install "Tomcat_PROD-staffsite" %JAVA_HOME%\jre\bin\server\jvm.dll -Djava.class.path=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar -Dcatalina.home=%CATALINA_HOME% %CATALINA_OPTS% -Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out %CATALINA_HOME%\logs\stdout.log -err %CATALINA_HOME%\logs\stderr.log
It used to work, but then I upgraded the JVM on the server and had to then uninstall and reinstall the service. I wasn't around for the original service installation, so I don't know if the command I used above was what was used before (since documentation doesn't seem to exist around here...). Any ideas?The Job Activity Monitor reports it failed but nothing goes in the Error Log.
The Agent writes error to it's own log file, called SQLAGENT.OUT, it's also located in LOG subfolder and you also can look it up in SSMS from node "SQL Server Agent"
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Tomcat 6.0, despite having this in my code:
public class AppInitializer implements ServletContextListener
public void contextInitialized(ServletContextEvent e)
log2.log(Level.FINEST, "\n************ In contextInitialized **************\n");
System.out.println("\n************ In contextInitialized **************\n");
System.out.flush();
System.err.println("\n************ In contextInitialized **************\n");
System.err.flush();
<snip>
private static Logger log2= Logger.getLogger("3info-dev.org.apache");I can't get anything to display in any of the log files. Here is my logging.properties:
>
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Logging levels: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST or ALL
handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3info-dev.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
.level=WARNING
# Handler specific properties.
# Describes specific configuration info for Handlers.
1catalina.org.apache.juli.FileHandler.level = WARNING
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.
2localhost.org.apache.juli.FileHandler.level = WARNING
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.
3info-dev.org.apache.juli.FileHandler.level = ALL
3info-dev.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3info-dev.org.apache.juli.FileHandler.prefix = info-dev.
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
# Facility specific properties.
# Provides extra control for each logger.
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[info-dev].[infoisland].level = ALL
org.apache.catalina.core.ContainerBase.[Catalina].[info-dev].[infoisland].handlers = 3info-dev.org.apache.juli.FileHandler
# org.apache.catalina.core.ContainerBase.[Catalina].[info-dev].[infoisland].handlers = java.util.logging.ConsoleHandler
utils.AppInitializer.level = ALL
# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
#org.apache.catalina.startup.HostConfig.level = FINE
#org.apache.catalina.session.ManagerBase.level = FINE
#org.apache.catalina.core.AprLifecycleListener.level=FINE
and here are the log files that are produced-
catalina.xxx.log:
>
Aug 8, 2009 7:06:40 PM org.apache.catalina.users.MemoryUserDatabase save
WARNING: User database is not persistable - no write permissions on directory
info-dev.log:
>
Aug 8, 2009 7:06:41 PM org.apache.catalina.core.StandardContext listenerStart
FINE: Sending application start events
Aug 8, 2009 7:06:41 PM org.apache.catalina.core.StandardContext filterStart
FINE: Starting filters
localhost.log:
>
<null>, i. e., nothing in log
ANY ideas why my console AND my log file are being sent to a black hole? BTW, I have also set and unset swallowOutput="true" multiple times in my <Context> tag.Well, I'm not too sure what I did, but now I'm getting the System.err.println messages in the aforementioned stderr.log. After I pointed (in the init.d script) command line arguments (outfile=... and errfile=...) I started getting messages in this file, but none of mine. I looked, and somewhere along the line, I made my <Context> tag this:
>
<Context path="" docBase="" swallowOutput="true" debug="5"
reloadable="true"
antiResourceLocking="false" privileged="false">
As I'm sure you gurus know, the "debug=" attribute is not a documented attribute for the Context tag (I saw it somewhere, and put it in). Tomcat never did complain, but I removed it, making the Context tag this:
>
<Context path="" docBase="" swallowOutput="true" reloadable="true"
antiResourceLocking="false" privileged="false">
And now everything works. Not sure what happened. I did not start out with that in the context tag. I'm wondering if maybe I had an OS glitch?
Thanks for all the help!! -
Hi All,
Can somebody tell me how to get the same functionallity by
changing the file
../{jrun_root/servers/SERVER_NAME/SERVER-INF/jrun.xml and by
running "jrun -start -nohup SERVER_NAME
>1/l.../.../logs/stdout.log 2>/../../stderr.log?
/attribute>
<!-- You can modify format to suit your need. -->
<!-- EXAMPLE: <attribute name="format">{date MM/dd
HH:mm:ss} {log.message}{l
og.exception}</attribute> -->
<attribute name="errorEnabled">true</attribute>
<attribute
name="warningEnabled">true</attribute>
<attribute name="infoEnabled">true</attribute>
<attribute name="debugEnabled">true</attribute>
<attribute name="accessEnabled">true</attribute>
<!-- You may also need to uncomment accessFormat if you
want access enabled
-->Winter999 wrote:
>
>
Server Error
> The server encountered an internal error and was unable
to complete your
> request.
>
ould not connect to JRun Server.
>
> JRun logs are attached.
> 2007-07-26 15:59:50 jrISAPI[9376:2408] command error:
Connection reset by
> peer <- [4200]
> 2007-07-26 15:59:50 jrISAPI[9376:2408] returning error
page for Connection
> reset by peer
> 2007-07-26 16:00:04 jrISAPI[8712:2408] 127.0.0.1:51011
connect failed: 10060
> Connection timed out
The log file you have attached is from the JRun connector,
not from JRun
itself. Please include the -out and -err logs from JRun
itself.
Jochem
Jochem van Dieten
Adobe Community Expert for ColdFusion -
WebLogic 10.3.6 logging health messages to stdout
Hello,
I have a 10.3.6 instance running with JRE 1.7.0_25-b15.
The server is sending health related info messages to stdout.
"com.bea.logging.BaseLogger log Info: XX% of the total memory in the server is free"
2 messages are logged at a time, but not on a consistent interval.
We send the stdout and stderr to a log file via the -Dweblogic.Stdout and -Dweblogic.Stderr properties. These messages are adding to the
log file size and frankly are an annoyance. Is there any additional settings/properties/filters needed to eliminate these messages?
These are the instance's settings with regard to logging:
- Minimum severity to log: Warning
- Log File Severity level: Warning
- Standard Out Severity level: Off
- Memory Buffer Severity level: Warning
- Redirect Stdout Logging: disabled
- Redirect Stderr Logging: disabled
- Logging implementation: JDK
Thanks in advance.Hello,
I have a 10.3.6 instance running with JRE 1.7.0_25-b15.
The server is sending health related info messages to stdout.
"com.bea.logging.BaseLogger log Info: XX% of the total memory in the server is free"
2 messages are logged at a time, but not on a consistent interval.
We send the stdout and stderr to a log file via the -Dweblogic.Stdout and -Dweblogic.Stderr properties. These messages are adding to the
log file size and frankly are an annoyance. Is there any additional settings/properties/filters needed to eliminate these messages?
These are the instance's settings with regard to logging:
- Minimum severity to log: Warning
- Log File Severity level: Warning
- Standard Out Severity level: Off
- Memory Buffer Severity level: Warning
- Redirect Stdout Logging: disabled
- Redirect Stderr Logging: disabled
- Logging implementation: JDK
Thanks in advance. -
Bonjour printing error in console.log and cups error_log
Hi everyone,
I have a client who has been successfully printing to an HP LaserJet 4000 over his home LAN for some time now. However, this evening he was no longer able to print, with the print queue stopping immediately when he would try.
iMac (Intel) Core Duo, Mac OS X 10.4.8, connected through a D-Link DI-524 wired/wireless router. There is a D-Link DP300U print server connected to one of the LAN ports on the router, to facilitate printing to a printer that has not been connected to the LAN recently.
After using Printer Setup Utility to reset everything, repair permissions, etc., the system still would not print. No updates have been installed since the last week of January 2007, and printing has been fine since then.
The only clue I was originally able to come across was found in console.log:
~ ~ ~ ~ ~
No log handling enabled - turning on stderr logging
snmpInk: Unknown host (SMB-Maui\0321.local.)
~ ~ ~ ~ ~
Then, I looked under /var/log, under the cups disclosure triangle, at error_log:
E [14/Feb/2007:20:50:44 -0800] [Job 2] Unable to locate printer 'SMB-Maui\0321.local.' - Unknown host
E [14/Feb/2007:20:50:44 -0800] PID 282 stopped with status 1!
~ ~ ~ ~ ~
There is only the one Mac on the LAN, which is not named "SMB-Maui"-anything. I was able to get printing to function via AppleTalk once it was enabled, but the client has been printing successfully via Bonjour for some time and so there seemed no reason why this should simply "happen". No new software has been installed, as he's really quite good about leaving the system alone to do its thing.
Disk Utility repaired multiple print-related permissions errors before I began using Printer Setup Repair.
I'm looking for troubleshooting steps to take beyond this point. While the client is satisfied that he can now print via AppleTalk, I am not and would very much like to resolve the lower-level problem. Please advise?
Thanks much for your time,
MBJHi Phil,
Thanks much! I think you might be on the right track, as I got some unexpected results from Bonjour Browser.
First of all, there's no Internet Printing Protocol (IPP) entry at all—in fact, several others I have present on my own, local system are not to be found on the remote iMac. What the iMac does show is the following:
local - 3
Apple Remote Desktop (net-assistant.udp.) - 1
iMac
(IP address):3283
[(IPv6 MAC address)]:3283
Remote Frame Buffer (rfb.tcp.) - 1
iMac
(IP address):5900
[(IPv6 MAC address)]:5900
Workgroup Manager (workstation.tcp.) - 1
iMac [MAC address]
[(IPv6 MAC address)]:9
(IP address):9
I have reapplied the 10.4.8 Combo Update, with no effect to the problem itself, nor to what is showing in Bonjour Browser.
One other possible clue: A visitor on the home LAN did attempt to print from Virtual PC 7 on a portable they had brought with them. They were unable to do so from Windows XP, but could print properly from Mac OS X. There is no known, causal relation to the problem at hand here - I mention it to be thorough, no more or less.
I'll standby for your further thoughts!
Thanks much for the assist,
MBJ
Hi Mike,
Bonjour is a service discovery system. It doesn't
print. For
that you use ipp or lpr, etc. The reason why
Appletalk works
is that it has its own discovery system. It's older
and
apparently more reliable. Bonjour uses muticast ip
but
unless muticast requests are forwarded can't get
outside
a local subnet.
Once on your net was a machine - probably a samba
server -
named "maul". Must have been, it's in a mib
somewhere. Oh
wait - maybe it's cached in the dlink from its old
days on
the dark side!
Judging from the direction of the slash it was a
Windows
machine (I don't think that's an octal 321). CUPS
thinks
that's where the printer is. Normally cups discovers
the
printers via bonjour, and bonjour must be coming
back
with the wrong info!
But bonjour isn't that smart, something must be
tricking it.
There's a wonderful free utility called "Bonjour
Browser"
which will show you which services are being
announced.
Give it a try:
http://www.versiontracker.com/dyn/moreinfo/macosx/2162
2
Let me know what it shows under ipp.
-Phil
Powerbook G4, iMac
(Intel), and tons of hardware sitting in the closet
Mac OS X (10.4.8)
Power Mac G4 (QuickSilver 2002), 20" Cinema Display (ADC) Mac OS X (10.4.8) Dual 1.0 GHz G4/1.5 GB RAM/2x160 GB HD/SuperDrive/GeForce4 Ti/PCI USB 2.0&FW400 -
No stacktrace after stderr redirection
Hi
I'd like to redirect all stderr output from the JVM to a file. Without redirection the normal error output is shown in case of an exception (JVM started in an exe file in the Windows console). But after redirection with the following command:
freopen("stderr.log", "w", stderr)the stacktrace is missing. The exception message is still shown and looks as follows: Exception in thread "main", but without the stacktrace.
I use fflush(stderr) to make shure stderr gets flushed. If I write to stderr after an exception occured with fprintf(stderr, "Some text") the message is shown. Just the stacktrace is missing in between.
What I finally want to do is to redirect the stderr from the jvm to a pipe which is read by another application. As I finally want to start the jvm from a dll, console redirection with something like test.exe 2> stdout.log is not an option.
Thanks for you helpWhat I finally did to be able to read all out and error messages:
- calling a method (jni, from my dll) which redirects the java out and err-stream to two files. This could of course also be done at initialisation time, but because I'm using the code from jni and normally, this is the better solution:
public static void redirect(){
try {
System.setOut(new PrintStream(new FileOutputStream("JavaOut.txt")));
System.setErr(new PrintStream(new FileOutputStream("JavaErr.txt")));
} catch (FileNotFoundException e) {
e.printStackTrace();
}- from my native application: opening the file and reading from it:
hJavaOut = CreateFile("JavaOut.txt", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
success = ReadFile(hJavaOut, buffer, BufferLen, &nofBytesRead, NULL);The same for the error-file.
It's not a nice solution, but I'm happy that it works as I messed arount with it for quite a while. -
I am trying to figure out how to get all of my logging to use one log file. Currently when I start tomcat as a service it writes to stderr.log, stdout.log as well as a log file I have configured using Log4j. I would like all logs including startup/shutdown logs that are currently going to stdout.log/stderr.log to go to the file I write to using Log4j.
If I start tomcat using catalina.bat it doesn't do this (bc it writes to the console window) but I would like to send all those startup/shutdown messages to the log that Log4j uses if I start tomcat as a service.
Any help would be appreciated.That doesn't really help, because I've got Log4j already running. It looks like there is no easy solution to this. I'm left with choosing one of the three options below.
1) Configure a <Logger> element for the Context that catches any logging not sent to the Log4j log file. This means I would have a stdout.log, stderr.log, log from the <Logger> element, and a log for Log4j. That's a lot of log files...
2) Not configure a <Logger> element for the Context. This means any logging not sent to the Log4j file will go to either stdout.log or stderr.log. Those files could get big and aren't rotated like my Log4j file. Not exactlly ideal either.
3) Don't install Tomcat through the .exe file. Unpackage it, set the environment variables, and set it up as a serivce through a script such as the one mentioned at http://weblogs.java.net/blog/simongbrown/archive/2003/09/installing_tomc.html setting the same file that Log4j uses for the -out and -err parameters. This means that all logging (startup/shutdown) will go to this one log file. But it also means messing with the install (deviating from the .exe) which scares me a little.
Unless someone has a better idea...I guess it's one of the three above.
Thanks,
Jim -
Hello,
I'm trying to run a tor relay on my arch linux box. Trying to launch the tor daemon, here's the log via
$ systemctl status tor.service
May 20 11:53:10 arch tor[21726]: May 20 11:53:10.877 [notice] Tor v0.2.4.21 (git-505962724c05445f) running on Linux with Libevent 2.0.21-stable and OpenSSL 1.0.1g.
May 20 11:53:10 arch tor[21726]: May 20 11:53:10.877 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
May 20 11:53:10 arch tor[21726]: May 20 11:53:10.877 [notice] Read configuration file "/etc/tor/torrc".
May 20 11:53:10 arch tor[21726]: May 20 11:53:10.909 [notice] Opening Socks listener on 127.0.0.1:9050
May 20 11:53:10 arch tor[21726]: May 20 11:53:10.909 [notice] Opening OR listener on 0.0.0.0:9798
May 20 11:53:10 arch tor[21726]: May 20 11:53:10.000 [warn] Couldn't open file for 'Log debug file /var/log/tor/debug.log': Permission denied
May 20 11:53:10 arch tor[21726]: May 20 11:53:10.000 [notice] Closing partially-constructed Socks listener on 127.0.0.1:9050
May 20 11:53:10 arch tor[21726]: May 20 11:53:10.000 [notice] Closing partially-constructed OR listener on 0.0.0.0:9798
May 20 11:53:10 arch tor[21726]: May 20 11:53:10.000 [warn] Failed to parse/validate config: Failed to init Log options. See logs for details.
May 20 11:53:10 arch tor[21726]: May 20 11:53:10.000 [err] Reading config failed--see warnings above.
May 20 11:53:10 arch systemd[1]: tor.service: main process exited, code=exited, status=255/n/a
May 20 11:53:10 arch systemd[1]: Unit tor.service entered failed state.
Why the tor daemon cannot write into /var/log/tor/debug.log ?
Here's my /etc/group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin
adm:x:4:root,daemon,nue
tty:x:5:
disk:x:6:root
lp:x:7:daemon
mem:x:8:
kmem:x:9:
wheel:x:10:root,nue
ftp:x:11:
mail:x:12:
uucp:x:14:
log:x:19:root
utmp:x:20:
locate:x:21:
rfkill:x:24:
smmsp:x:25:
http:x:33:
games:x:50:
lock:x:54:
uuidd:x:68:
dbus:x:81:
network:x:90:
video:x:91:
audio:x:92:
optical:x:93:
floppy:x:94:
storage:x:95:
scanner:x:96:
power:x:98:
nobody:x:99:
users:x:100:
systemd-journal:x:190:
nue:x:1000:
avahi:x:84:
lxdm:x:121:
polkitd:x:102:
git:x:999:
transmission:x:169:
vboxusers:x:108:
tor:x:43:
mysql:x:89:
Last edited by giuscri (2014-05-20 12:18:56)SidK wrote:You must have modified your torrc to print to that log file. systemd starts the service as the tor user (see /usr/lib/systemd/system/tor.service). So if if you want to log to a file the tor user must have write access to it. By default however tor it set to log to the journal, which doesn't require any special permissions.
Yes. I did edit the torrc file since I wanted the log to be store in that file. Indeed
## Logs go to stdout at level "notice" unless redirected by something
## else, like one of the below lines. You can have as many Log lines as
## you want.
## We advise using "notice" in most cases, since anything more verbose
## may provide sensitive information to an attacker who obtains the logs.
## Send all messages of level 'notice' or higher to /var/log/tor/notices.log
#Log notice file /var/log/tor/notices.log
## Send every possible message to /var/log/tor/debug.log
Log debug file /var/log/tor/debug.log
## Use the system log instead of Tor's logfiles
Log notice syslog
## To send all messages to stderr:
#Log debug stderr
I missed the file systemd uses to choose who's the process owner.
Course, I could edit /usr/lib/systemd/system/tor.service such that root will become the process owner; or, I could add the user I use everyday in the root group, then change the permission of /var/log/tor/debug.log such that it will be writable also for the folks in the root group.
Yet they both seems to be a bit unsafe ...
What is the best choice, to you guys?
Thanks,
Maybe you are looking for
-
No more scanning after upgrading to MacOS X 10.10 ("Yosemite"
Hi, I've got a HP OfficeJet Pro 8600 (N911a)--connected via ethernet adapter to my LAN--which worked just like a charm up to MacOS X 10.9 ("Mavericks"); printing, scanning, faxing: no hassle there! Since upgrading to MacOS X 10.10 ("Yosemite") I can'
-
Raw Files Dissappearing in Lighroom 1.1
Hi, I just downloaded a 4 gb shoot from my CF card to the Mac Hard drive. Then I imported it into Lightroom. I was about halfway through checking out the images, had processed some into JPEG, some into PSD and some into TIF (all ok) while I suddenly
-
Related to linking invoice document to incoming payment
hi all i am using sap b1 2005B WITH 36 PATCH one of the my customer made invoice on the date(04-12-06) and due date is(3-01-07) and he has give incoming pay at the date (20-01-07) so when i am linking the that invoice to this incominig payment the
-
On clicking any data cell i want to capture that event and i want to pass that datacell value on mouse click event to store it in some variable and want to do some calculation on that value and want to display that calculation in the crosstab. pls. c
-
The latest update (9/2/11) for iPod 2nd Gen will not work
This is getting frustrating, I can't downlaod any apps and its moved like 1% in a hour