SUMMARY: my .xml file is not loading

Christopher L. Barnard cbar44 at tsg.cbot.com
Fri Oct 6 12:38:42 EDT 2006


I asked:

> This is a solaris 10 .xml question.
>
> I created an apache.xml by taking another .xml file (that works fine) and
> modifying it.  However, when I try to load it
>
> [ mmmtst3!/var/tmp ] >> svccfg import /var/svc/manifest/site/apache.xml
> svccfg: Could not create "multi-user-server" dependency in svc:/milestone/multi-user-server (already exists).
> svccfg: Import of /var/svc/manifest/site/apache.xml failed.  Progress:
> svccfg:   Service "site/apache": some properties imported.
> svccfg:     Instance "default": previous snapshot taken.
>
> The .xml file isn't that big, so I've included it here:
>
> <?xml version='1.0'?>
>
> <service_bundle type='manifest' name='Apache webserver'>
>
>     <service
>         name='site/apache'
>         type='service'
>         version='1'>
>
>         <create_default_instance enabled='false'/>
>
>         <single_instance/>
>
>         <dependency
>             name='filesystem-local'
>             grouping='require_all'
>             restart_on='none'
>             type='service'>
>             <service_fmri value='svc:/system/filesystem/local'/>
>         </dependency>
>         <dependency
>             name='network'
>             grouping='require_all'
>             restart_on='none'
>             type='service'>
>             <service_fmri value='svc:/milestone/network'/>
>         </dependency>
>
>         <dependent
>             name='multi-user-server'
>             restart_on='none'
>             grouping='optional_all'>
>             <service_fmri value='svc:/milestone/multi-user-server'/>
>         </dependent>
>
>         <exec_method
>             name='start'
>             type='method'
>             exec='/lib/svc/method/site/apache start'
>             timeout_seconds='60'>
>             <method_context/>
>         </exec_method>
>
>
>         <exec_method
>             name='stop'
>             type='method'
>             exec=':kill'
>             timeout_seconds='60'>
>             <method_context/>
>         </exec_method>
>
>         <property_group
>             name='startd'
>             type='framework'>
>             <propval name='ignore_error' type='astring' value='core,signal'/>
>         </property_group>
>
>         <template>
>             <common_name>
>                 <loctext xml:lang='C'>apache webserver</loctext>
>             </common_name>
>             <documentation>
>                 <manpage
>                     title='apache'
>             timeout_seconds='60'>
>             <method_context/>
>         </exec_method>
>
>         <property_group
>             name='startd'
>             type='framework'>
>             <propval name='ignore_error' type='astring' value='core,signal'/>
>         </property_group>
>
>         <template>
>             <common_name>
>                 <loctext xml:lang='C'>apache webserver</loctext>
>             </common_name>
>             <documentation>
>                 <manpage
>                     title='sshd'
>                     section='1M'
>                     manpath='/opt/apache/man'/>
>             </documentation>
>         </template>
>     </service>
> </service_bundle>
>
> I'm not the best xml coder so I could easily have missed something.  Anyone
> have any ideas what I have done wrong?  TIA and summary forthcoming...

The answer:

I guess I still have some to learn about the mystical ways of Solaris 10. ;^)
Despite those errors, it loaded anyway.  I just had to do a convoluted
series of enabling, disabling, and importing.  But despite those errors
it worked.  I have it happily running on half a dozen boxes so far.  (And
I did a complete reboot on a couple to make sure it comes up).  To answer
the question most asked: yes, Sun ships apache with Solaris 10.  But I
specifically excluded it in selecting the initial build so that I could
roll my own and keep it current.

Thanks to those who replied.  I appreciate it.

+-----------------------------------------------------------------------+
| Christopher L. Barnard         O     When I was a boy I was told that |
| cbarnard at tsg.cbot.com         / \    anybody could become president.  |
| (312) 347-4901               O---O   Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard                --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+



More information about the sunmanagers mailing list