Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

Re: Is it safe to replace master.db file?

YouTube: Tutorials about LDAP, ApacheDS, Studio and Tomcat integration (German)
(24 lines)
Any tutorial/guide for server.xml of Apache DS 1.5.7?
(14 lines)
Jun 9, 2010
Sudheer Kumar
Sudheer Kumar
OK thanks for the reply.  I have a partition and all my entries are under
that partition.  What I replaced was the master.db from in system folder
not
in my partition folder so will it affect?




Reply
Tags: partitionfolderaffectsystem
Messages in this thread
Re: Is it safe to replace master.db file?
reply Re: Is it safe to replace master.db file?
(18 lines) Jun 9, 2010 05:04
Similar Threads
Is it safe to replace master.db file?
Hi,

I am using ApacheDs 1.5.4, after running successfully for a long time, now
getting the following error:

Exception in thread "main" java.lang.NullPointerException
        at
org.apache.directory.server.core.entry.ClonedServerEntry.<init>
        (ClonedServerEntry.java:67)
        at

org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition.lookup
(JdbmPartition.java:457)
        at

org.apache.directory.server.core.partition.impl.btree.ServerEntryCursorAdaptor.get
(ServerEntryCursorAdaptor.java:140)
        at

org.apache.directory.server.core.partition.impl.btree.ServerEntryCursorAdaptor.get
(ServerEntryCursorAdaptor.java:40)
        at

org.apache.directory.server.core.filtering.BaseEntryFilteringCursor.next
(BaseEntryFilteringCursor.java:502)
        at org.apache.directory.server.core.authz.GroupCache.initialize
        (GroupCache.java:151)
        at org.apache.directory.server.core.authz.GroupCache.<init>
        (GroupCache.java:115)
        at

org.apache.directory.server.core.authz.AciAuthorizationInterceptor.init
(AciAuthorizationInterceptor.java:211)
        at

org.apache.directory.server.core.interceptor.InterceptorChain.register0
(InterceptorChain.java:439)
        at

org.apache.directory.server.core.interceptor.InterceptorChain.register
(InterceptorChain.java:395)
        at
        org.apache.directory.server.core.interceptor.InterceptorChain.init
        (InterceptorChain.java:255)
        at
       
org.apache.directory.server.core.DefaultDirectoryService.initialize
        (DefaultDirectoryService.java:1385)
        at
org.apache.directory.server.core.DefaultDirectoryService.startup
        (DefaultDirectoryService.java:840)
        at org.apache.directory.server.configuration.ApacheDS.startup
        (ApacheDS.java:126)
        at org.apache.directory.server.Service.init(Service.java:86)
        at org.apache.directory.server.UberjarMain.main
        (UberjarMain.java:56)



File not found exception when setup share file system master/slave
Hi, i tried to setup share file system master/slave on activemq 5.3.2 , my
activemq.xml  is updated as below:

<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="share"
useJmx="false" deleteAllMessagesOnStartup="true"
dataDirectory="${activemq.base}/data"
destroyApplicationContextOnStop="true">
....
<persistenceAdapter>
            <!--<kahaDB
directory="${activemq.base}/data/kahadb"/>-->
            <kahaDB directory="//9.186.10.68/share"/>
        </persistenceAdapter>


//9.186.10.68/share is samba share opened on a suse 10.2 system with
anonymous access.

but when i start up activemq, there is an error:
Database \\9.186.10.68\share\lock is locked... waiting 10 seconds for the
database to be unlocked. Reason: java.io.FileNotFoundException:
\\9.186.10.68\share\lock (Access is denied)

Can somebody help figure out how to configure share file system? i just
followed this article
http://activemq.apache.org/shared-fil...master-slave.html, my shared
directory is setup wrong?
THanks a lot!




Re: Safe way to backup an RDB file
Can an AOF file be backed up with a simple 'cp' command? Or must we
create a dump file to do a backup?

Thanks,
David

On Jul 27, 3:39 pm, Salvatore Sanfilippo <ant### @gmail.com> wrote:
 On Tue, Jul 27, 2010 at 9:31 AM, teleo <lev.### @gmail.com>
wrote:
 > What is the safest way to backup an RDB file in Redis?

 In Redis .rdb files can be copied while the server is running without
 any need of lock. No corruption is possible since the new file is
 always saved in a temp location and atomically rename(2)d to the new
 location.

 So just use "cp" :)

 Cheers,
 Salvatore

 > Thanks,
 > T

 > --
 > 
Master remap.config file
I have several ATS nodes in multiple locations and I want each node to have
the exact same remap.config file.  Is there a way to have a master
remap.config file or do a universal update so I only have to update one
file
and the rest of the nodes will either push or pull the changes?

Thx,
Sean


PATCH/puppet 1/1] Fix #4319 - source file url sent to the master is invalid
We were sending an incorrect (containing a //) url for sourced file
content since the file streaming patches.
Depending on the webserver in front of puppet it could fail (for instance
nginx+mongrel).

This patch fixes the offending // in each sourced file urls.

Signed-off-by: Brice Figureau <brice-pup### @daysofwonder.com>
---
 lib/puppet/type/file/content.rb     |    2 +-
 spec/unit/type/file/content_spec.rb |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/puppet/type/file/content.rb
b/lib/puppet/type/file/content.rb
index 74b380f..0d0bb55 100755
--- a/lib/puppet/type/file/content.rb
+++ b/lib/puppet/type/file/content.rb
@@ -184,7 +184,7 @@ module Puppet
     end
 
     def chunk_file_from_source(source_or_content)
-      request = Puppet::Indirector::Request.new(:file_content, :find,
source_or_content.full_path)
+      request = Puppet::Indirector::Request.new(:file_content, :find,
source_or_content.full_path.sub(/^\//,''))
       connection =
Puppet::Network::HttpPool.http_instance(source_or_content.server,
source_or_content.port)
       connection.request_get(indirection2uri(request),
add_accept_encoding({"Accept" => "raw"})) do |response|
         case response.code
diff --git a/spec/unit/type/file/content_spec.rb
b/spec/unit/type/file/content_spec.rb
index e4b9f9b..a01a14a 100755
--- a/spec/unit/type/file/content_spec.rb
+++ b/spec/unit/type/file/content_spec.rb
@@ -362,7 +362,7 @@ describe content do
       end
 
       it "should send the correct indirection uri" do
-        @conn.expects(:request_get).with { |uri,headers| uri ==
"/production/file_content//path/to/source" }.yields(@response)
+        @conn.expects(:request_get).with { |uri,headers| uri ==
"/production/file_content/path/to/source" }.yields(@response)
         @content.write(@fh)
       end
 






Problem with TTL and DLQ using Master/Slave failover on Master crash
Hi all,

 

we have set up a cluster of machines using ActiveMQ with Master/Slave
failover protocol. All messages use a TTL of 120 seconds and if TTL is
reached are sent to an individual DLQ.

Basically this works fine. However, there is one scenario where the
automatic routing of a message to the DLQ does not work:

 

-          a client receives message X but cannot commit the message
because of some error (e.g. network failure, hardware crash, etc.)

-          the ActiveMQ master crashes (clients now failover to the
slave)

-          message X reaches its TTL. This can be seen in the JMX
counters (EnqueueCount=1, DequeueCount=1, DispatchCount=0,
ExpiredCount=1)

-          message X is not routed to the DLQ as expected, the DLQ
remains empty

 

There are no warnings or error messages in the log files. Here is our
current broker and DLQ strategy configuration:

 

    <broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost" persistent="true"
masterConnectorURI="tcp://queuemaster:61616"
shutdownOnMasterFailure="false">

 

       <policyEntry queue=">" producerFlowControl="true"
memoryLimit="1mb">       

              <deadLetterStrategy>

                     <individualDeadLetterStrategy queuePrefix="todo."
processNonPersistent="true" processExpired="true" />

              </deadLetterStrategy>

       </policyEntry>

 

 

Is there something that has to be addressed in the configuration to
support this scenario ?

 

 

Bye,

Daniel



Do implementations of Watcher need to be thread-safe?
Hi,

Do implementations of Watcher need to be thread-safe, or can I assume
that process(...) will always be called by the same thread?

Thanks,
Josh "Ua" Ball


Log/Replace attachments within interceptor
Hi all!

I am trying to extract attachments passed to a RESTful service within a
subclass of AbstractPhaseInterceptor<Message>.  The questions I have
is how
to do this properly and whether it is possible to replace/manipulate the
attachments.

What I have so far is the following:
class RequestLoggingInterceptor extends
AbstractPhaseInterceptor<Message> {
      RequestLoggingInterceptor() {
            super(Phase.PRE_INVOKE);
      }

      public void handleMessage(Message message) throws Fault {
            List<?> contentList = message.getContent(List.class);
            MultipartBody body=(MultipartBody) contentList.get(0);
            List<Attachment> attachments = body.getAllAttachments();
            for (Attachment a : attachments) {
                  File file = new File(...);
                  ServicesUtils.writeToFile(a.getDataHandler
().getInputStream(), file);
                  ...

For retrieving the attachments I also tried to invoke getAttachments on
the
message but this returns null.  I am wondering whether the above code
(getContent(List.class).get(0) is the proper way of doing this.  At least
this is the way the invoker eventually retrieves the body to pass to my
RESTful service.  The other thing I experience is when writing the file, I
have to invoke reset on the InputStream to reset the the file read
position
back to the initial mark of 0.  Would this be the proper way to get hold
of
the attachments?

And the final question I have, would it be possible to replace the
attachment with a different one after it has been extracted?  The
collection I get from body.getAllAttachments is unmodifiable, so
body.getAllAttachments().set(...) does not work.  When looking at the API
provided by Attachment, I don't see any method that would allow me to
replace the data handler.  On the data handler, I can only change the
DataContentHandlerFactory - could I do anything with that?  And the
getInputStream gives me back a DelegatingInputStream which has package
visibility, so cannot change the stream it is delegating to.

Does anybody have any other ideas of how to accomplish this?

Thanks in advance,
Thomas



DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

Mark Thomas <ma### @apache.org> changed:

           What    |Removed                     |Added

Is it safe to use timestamps (or versions) to load old values.
Hi all,

I use automatic unconditional data load from other sources into my
database. But data, already loaded, can be changed by users
(or updated by MR jobs, f.e. some foreign keys resolutions or text
cleanup).
My loaders can load same data once more (with old data) and possibly
override changes, made to stored data. I can't allow this.

Not long ago I asked subj on iirc, and answer was: it is
not safe to put old data (with old timestamps).

Now I use versioned qualifiers and store version in them. But this
is very hard to support and it is hard to use such implementation
with other tools (like hive or pig), it is hard to use with filters (i
should
use custom very specific filters), it is no support for ttl or num of
versions
in scan.

So, i want to ask againt. What is a best strategy in such situtaion.
I need to put old data and don't override if it exists. I don't want
place version
in key (it is the same complexity as in qualifiers).
My be here some plans to support such situation in 0.89?

It looks, that i can use solution with old timestamps, but it leads to
incorrect
answers (this new data from memstore) until hbase compact table.

PS:
to be more specific, here is example of my schema (sql like notation):

table bsn.main(
long pk

Thanks for any advise.
Andrey.


DO NOT REPLY New: SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=49520

           Summary: SSI Servlet should support safe configuration
           Product: Tomcat 7
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
        AssignedTo: de### @tomcat.apache.org
        ReportedBy: yair.### @citi.com


This is a duplicate request from the Tomcat 6 (Bug 48960). See proposed
solution/discussion:
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

The current configuration of the SSI module is "All" or "None". The "ALL"
option will expose all the legacy Apache SSI directive (echo, printenv,
if,
exec, ...). As documented, allowing SSI will allow execution of arbitrary
programs using the "exec". As a result, there is no safe way to expose
sites/projects containing SSI directive, without taking a security risk,
or
reviewing of every file.

The "exec" directive, with the cmd option is a major risk. Even for
Apache, you
have the option to allowing the "safe" include (includeNoExec). The
includeNoExec allow pages to be served, even when the content is not
reviewed,
or when users are allowed to upload content to the site.

I have a big site which need to be converted into JSP. I would like to use
the
SSI servlet to allow for transition over time. The extra risk from ( from
exec
cmd) make it impossible to deploy the SSI.

My request: Modify the configuration of SSI as follow: By default, it will
only
allow "safe" directive (no exec cmd=...). This will eliminate the risk
from
arbitrary execution of commands ("del *.*"). It will also remove many
potentail
load problems. The cmd= should only be allowed using a directive like
"allowUnsafeExec", which will default to false.

I think that the change will make it easier to use the SSI feature,
without
exposing the server to big risk. The risk associated with the "safer"
version
of SSI is similar to the risk from running JSP pages.

A better alternative is to eliminate the "exec cmd=" option alltogether.




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #4 from Mark Thomas <ma### @apache.org> 2010-06-29
12:45:54 EDT ---
*** Bug 49520 has been marked as a duplicate of this bug. ***




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #5 from Yair Lenga <yair.l### @citi.com> 2010-07-09
10:01:32 EDT ---
(In reply to comment #4)
 *** Bug 49520 has been marked as a duplicate of this bug. ***

Mark,

Is there anything I can do to speed up the inclusion of this change ? I've
noticed it did not make it for 6.0.28, where few other CGI/SSI related
changed
were incorporated. I would love to use the SSI, but I can not use it
because of
the security reisk of the "unsafe" include/exec.




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #6 from Mark Thomas <mar### @apache.org> 2010-07-09
10:17:16 EDT ---
Providing patches in diff -u format would help.




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #7 from Yair Lenga <yair.### @citi.com> 2010-07-13
15:52:28 EDT ---
Created an attachment (id=25760)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25760)
Patch to disable exec by default, new allowExec tag

Patch for three files, created against 6.0.26-src




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #9 from Mark Thomas <mar### @apache.org> 2010-07-13
17:38:55 EDT ---
In the end I used the patch a guide and write a new one. Some additional
comments:
- if you do an svn diff against a normal source tree patches usually apply
cleanly
- new features should be documented

The patch has been applied to truck and proposed for 6.0.x




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #10 from Yair Lenga <yair.l### @citi.com> 2010-07-13
17:54:53 EDT ---
Mark,

Thanks for taking the change. I'll follow you suggestions regarding svn
diff
for the next time.

Do I have to submit anything for the change to flow to 7.X ?

Yair




DO NOT REPLY SSI Servlet should support safe configuration
https://issues.apache.org/bugzilla/show_bug.cgi?id=48960

--- Comment #11 from Mark Thomas <ma### @apache.org> 2010-07-13
18:08:34 EDT ---
Sorry truck should have been trunk and trunk == 7.0.x so it is already
there.