Re: [Tracker] Tracker on Solaris



Hi Martyn,

2013/1/22 Martyn Russell <martyn lanedo com>:
On 10/01/13 17:31, Frank Lahm wrote:
I succeeded in getting Tracker to build on Solaris 11, patches
attached in case anybody is interested. They are not really applicable
for upstream inclusion, but anybody facing the same task might
appreciate the pointers.

Great!

The patches look good - I think the first one needs a few #ifndef checks
around it for flock() but other than that, I think we could commit some of
those. Thanks.

Just let me know if you need help with the modifications.

I'm using building and using 'master' from git.

I'm using the provided tracker-sandbox script for running Tracker.
Unfortunately this fails, tracker-control -s throws the following
error:


The tracker-sandbox script is good, but I would be careful here, in my
experience, difference shells have different rules and Solaris was always a
pain in the arse and didn't play consistently well with what was expected on
Linux.

:) I'm running all of this in bash, but anyway, of course I'm paying
attention to such subtleties.

So if things fail here, I would try separately running daemons first (which
it looks like you did below):

Yes, I do. We have a main service controller process called 'netatalk'
which then starts (forks() and execs() other services) a root dbus
daemon.
I start it with ''--config-file=/PATH/TO/dbus-session.conf" as
arguments. dbus-session.conf contains:

---8<---
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd";>
<busconfig>
  <!-- Our well-known bus type, don't change this -->
  <type>session</type>

  <!-- If we fork, keep the user's original umask to avoid affecting
       the behavior of child processes. -->
  <keep_umask/>

  <listen>unix:path=/tmp/spotlight.ipc</listen>
<!--
  <allow_anonymous />
-->
  <standard_session_servicedirs />

  <policy context="default">
    <!-- Allow everything to be sent -->
    <allow send_destination="*" eavesdrop="true"/>
    <!-- Allow everything to be received -->
    <allow eavesdrop="true"/>
    <!-- Allow anyone to own anything -->
    <allow own="*"/>
  </policy>

  <!-- raise the service start timeout to 40 seconds as it can timeout
       on the live cd on slow machines -->
  <limit name="service_start_timeout">60000</limit>
  <limit name="reply_timeout">10000</limit>

  <!-- Config files are placed here that among other things,
       further restrict the above policy for specific services. -->
  <includedir>/etc/dbus-1/session.d</includedir>

  <!-- This is included last so local configuration can override
what's
       in this standard file -->
  <include ignore_missing="yes">session-local.conf</include>

  <include if_selinux_enabled="yes"
selinux_root_relative="yes">contexts/dbus_contexts</include>

  <!-- For the session bus, override the default relatively-low limits
       with essentially infinite limits, since the bus is just running
       as the user anyway, using up bus resources is not something we
need
       to worry about. In some cases, we do set the limits lower than
       "all available memory" if exceeding the limit is almost
certainly a bug,
       having the bus enforce a limit is nicer than a huge memory
leak. But the
       intent is that these limits should never be hit. -->

  <!-- the memory limits are 1G instead of say 4G because they can't
exceed 32-bit signed int max -->
  <limit name="max_incoming_bytes">1000000000</limit>
  <limit name="max_outgoing_bytes">1000000000</limit>
  <limit name="max_message_size">1000000000</limit>
  <limit name="service_start_timeout">120000</limit>
  <limit name="auth_timeout">240000</limit>
  <limit name="max_completed_connections">100000</limit>
  <limit name="max_incomplete_connections">10000</limit>
  <limit name="max_connections_per_user">100000</limit>
  <limit name="max_pending_service_starts">10000</limit>
  <limit name="max_names_per_connection">50000</limit>
  <limit name="max_match_rules_per_connection">50000</limit>
  <limit name="max_replies_per_connection">50000</limit>

</busconfig>
---8<---

That should be just boilerplate besived the obvious modificaiton of
the listen directive and the "attempt" to allow anonymous auth. I'm
saying "attempt", because as on Solaris I had to remove/comment out
the directive because the dbus-daemon version on Solaris (1.2.28)
didn't recognize it. Otoh, I have to add it on Linux, otherwise the
dbus IPC doesn't work too.

root solaris:~# /opt/tracker/bin/tracker\-control -s

Starting miners?
(tracker-control:15040): Tracker-CRITICAL **: Could not create proxy
on the D-Bus session bus, Error calling StartServiceByName for
org.freedesktop.Tracker1.Miner.Applications:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process
/opt/tracker/libexec/tracker-miner-fs exited with status 1
   ? File System (perhaps a disabled plugin?)

(tracker-control:15040): Tracker-CRITICAL **: No D-Bus proxy found for
miner 'org.freedesktop.Tracker1.Miner.Applications'
   ? Applications (perhaps a disabled plugin?)

I've pasted some the results of some debugging to pastie.org:

Using tracker-sandbox:

   <http://pastie.org/private/jvxvvg4ciwg2kibv6nuq1g>

Running libexec/tracker-miner-fs -v 3 -n:

   <http://pastie.org/private/jp8j0cdvy24lskokn4nncg>


Yea, it seems we can't create our session on the bus. This leads me to a few
questions:

1. Was the name taken? - Usually we would get an error for that case, but I
would check anyway.

I would if I knew how... :/

2. Does the daemon with that address exist and is it running?

Yes. As mentioned before I either use tracker-sandbox or the netatalk
service controller for running an instance of dbus-daemon and either
way I make sure DBUS_SESSION_BUS_ADDRESS is set correct:
---8<---
root solaris:~# echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/tmp/spotlight.ipc
root solaris:~# /opt/tracker/bin/tracker-control -S
Store:
24 Jan 2013, 15:32:37:  â     Store                - Idle

Miners:
24 Jan 2013, 15:32:37:  â     Dateisystem          - Not running or is
a disabled plugin
24 Jan 2013, 15:32:37:  â     Anwendungen          - Not running or is
a disabled plugin

root solaris:~# ps auxwww | grep tracker
root      8223  0.1  0.23940019184 ?        S 15:32:03  0:00
/opt/tracker/libexec/tracker-store
root      8269  0.0  0.0 8908 1456 pts/3    S 15:32:57  0:00 grep tracker
---8<---

Note that tracker-store IS running, just not the miners.

3. Are you able to test other dbus programs with your session and can they
"register"?

I'm really new to dbus, could you give me a hint at an example program?

A test program to do this should be only a few lines of code.

Well, ok, lets get down and dirty. By chance, can you share a link to
a good online ressource or similar.

The errors look quite endemic of environment or set up issues, but I am
speculating based on experience.

Hm. Thanks for you help so far!

Regards
-Frank



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]