Configuration FAQ
When I start Seven I get exceptions
in my log at SEVERE level that are related to multicast not being
configured for a particular interface, or it seems it uses
the wrong interface on a computer with multiple NICs. Is there
a way to configure the interface to use for multicast discovery?
When you see java.net.SocketExceptions related to multicast discovery
it is likely that your interface is not properly configured.
You can either disable your faulty network interface or you can
configure Seven to use a specific interface, or group of interfaces.
Configuration can take place at the service level but often
it is more convenient to configure this at the container level,
i.e. in the seven.xsc file you can find in the config directory.
Locate the discovery element in the seven.xsc file
and at the top add a multicast-interfaces element, for each interface
to be configured for multicast discovery add one interface-name element
with the name of the NIC, you can also use the bind-address element
to specify the IP address for the NIC. In case of configuring
just one interface you end up with something like is shown below,
note that eth0 is only illustrative:
<discovery>
<multicast-interfaces>
<interface-name>eth0</interface-name>
</multicast-interfaces>
</discovery>
You can find out the name
of your NIC on most OSes other than Windows with ifconfig -a or netstat
-i.
For Windows it is not that easy to find the adapter name
to use for configuration purposes, but it seems that if you
execute ipconfig
/all the
first ethernet adapter listed is named eth0, the second
eth1, etc. For Seven 1.0 and higher during boot the
environment settings will be logged and you should be able
to extract the name of the NICs from the log file or the
console.
This configuration should also be used to prevent from multicast discovery
packets leaking to the wrong network.
Is there a way to have the download jar files of the
JSC Services served by an external
web server
Yes, as the embedded jar file server can't outlive the container
instance and distributed objects are often used while their service has been
destroyed, the container can work together with an external HTTP server for
serving download jar files beyond the lifespan of a service. By using a dedicated
web server such as Apache an extreme reliable environment can be created,
this option is however not only limited to Apache, the only requirements are:
- web server must have access to the file system the services are installed
on for a particular Seven instance;
- web server must support the Apache
mod_rewrite module, this
also allows you to have multiple Seven instances served by a single virtual
host.
If the requirements above are met you can add to the seven.xsc file
the codebase-prefix element, see XML
Seven Configuration Documentation, and set
that to a codebase annotation prefix. This URI prefix
will be appended by the container with the OID of
the service, a version number, and the 'main' download
jar file for that service. The resulting URL will be
used by Seven to annotate classes when they are marshalled.
Through the use of the mod_rewrite module
the web server will rewrite the requested URL to the
URI of the physical download jar file on the local file
system. This template contains
the required configuration for the mod_rewrite module and can
be used as a starting point.
|