[tor-bugs] #13003 [Onionoo]: Figure out a better strategy to avoid concurrent Onionoo executions

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 16 12:46:59 UTC 2014


#13003: Figure out a better strategy to avoid concurrent Onionoo executions
-------------------------+-----------------
     Reporter:  karsten  |      Owner:
         Type:  defect   |     Status:  new
     Priority:  normal   |  Milestone:
    Component:  Onionoo  |    Version:
   Resolution:           |   Keywords:
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+-----------------

Comment (by karsten):

 Hmm, this doesn't work as expected.  Here's what I changed, compared to
 commit 0a2f917:

 {{{
 metrics at sewerzowi:/srv/onionoo.torproject.org/onionoo$ git diff
 diff --git a/bin/update.sh b/bin/update.sh
 index 9294f41..52b350f 100755
 --- a/bin/update.sh
 +++ b/bin/update.sh
 @@ -1,3 +1,3 @@
  #!/bin/bash
 -ant run >> log && cat errors
 +ant run >> log && cat onionoo-err.log

 diff --git a/build.xml b/build.xml
 index b4a9031..e37cf6d 100644
 --- a/build.xml
 +++ b/build.xml
 @@ -26,6 +26,10 @@
        <include name="logback-core.jar"/>
        <include name="slf4j-api.jar"/>
      </fileset>
 +    <fileset dir="gnumail">
 +      <include name="gnumail-1.1.2.jar"/>
 +      <include name="gnumail-providers-1.1.2.jar"/>
 +    </fileset>
      <fileset dir="deps/metrics-lib">
        <include name="descriptor.jar"/>
      </fileset>
 diff --git a/logback.xml b/logback.xml
 index f6d16d0..b801045 100644
 --- a/logback.xml
 +++ b/logback.xml
 @@ -47,8 +47,19 @@
      </filter>
    </appender>

 +  <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
 +    <smtpHost>localhost</smtpHost>
 +    <to>karsten at torproject.org</to>
 +    <from>metrics at sewerzowi.torproject.org</from>
 +    <subject>ONIONOO: %level %logger{20} - %m</subject>
 +    <layout class="ch.qos.logback.classic.PatternLayout">
 +      <pattern>${utc-date-pattern} [runtime: %r] %msg%n</pattern>
 +    </layout>
 +  </appender>
 +
    <logger name="org.torproject" >
      <appender-ref ref="FILEERR" />
 +    <appender-ref ref="EMAIL" />
    </logger>
    <logger name="org.torproject.onionoo.cron.Main" >
      <appender-ref ref="FILESTATISTICS" />
 @@ -57,6 +68,7 @@
    <!-- a named logger -->
    <logger name="statistics" >
      <appender-ref ref="FILESTATISTICS" />
 +    <appender-ref ref="EMAIL" />
    </logger>

    <root level="ALL">
 }}}

 Note that I added the appender to two loggers for testing purposes.  I
 would expect it to send me mail once per hour with the statistics.  Still,
 I don't receive anything.

 I also tried sending mail from the command line.  The following command
 succeeds and results in an actual email in my inbox:

 {{{
 metrics at sewerzowi:/srv/onionoo.torproject.org/onionoo$ echo "Test body." |
 mail -s "Test subject" karsten at torproject.org
 }}}

 Not sure if this is an issue that sysadmins could fix, because sending
 mail apparently works.  Is there an easy way to debug this on the Java
 side?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13003#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list