[systemd-devel] Fail Using 'After=network.target' In A Java-Based Service
Pat McDonough
pat.mcdonough at redhat.com
Thu Jul 7 16:45:29 PDT 2011
I'm trying to create a systemd service for a Java-based service and running into a networking error despite using "After=network.target"
Any suggestions as to which dependencies to use or whether this is working as expected?
The service fails during initial system start (6 times before giving up):
> [root at as7-04 ~]# systemctl --no-pager --failed | grep jboss
> jboss-as.service loaded failed failed JBoss Application Server Defa
With the following error [1]:
> ...
> ... Exception in thread "main" java.net.UnknownHostException: as7-04: as7-04
> ...
I can start it up without issue after the system is up:
> [root at as7-04 ~]# systemctl start jboss-as.service
> [root at as7-04 ~]# systemctl --no-pager | grep jboss
> jboss-as.service loaded active running JBoss Application Server D
My service [2]:
> ...
> After=basic.target
> After=network.target
> After=syslog.target
> ...
[1] https://gist.github.com/1070805
[2] https://github.com/CheffPJ/jboss-as/blob/linux_init/linux/src/main/resources/lib/systemd/system/jboss-as.service
Thanks in Advance,
Pat McDonough
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110707/216cef88/attachment.htm>
More information about the systemd-devel
mailing list