[Solved] SystemD, how to start a service after network is up.

Hello,
I'm recently involved to set up a daemon which should be ready after boot (aria2). Then it fails, as it fails minidlna as well.
The reason is that they try to come up but there's no host to talk to. See this page.
For my purposes, it should be good when the daemons find the necessary to stay alive (even they won't have a network fully ready, that may happen in less than a minute later). For minidlna is needed a valid IP which could be 127.0.0.1 or localhost, for aria2 it may be same or just looking for a RPC binding.
This what the logs are telling me.
I was trying to set more dependencies in the service, but even to set
After=wpa_supplicant.service
it doesn't have effect.
I don't find a solution, as far as my knowledge spans. Another chance would take to set a systemD timer and when that will be gone to start the daemon. Sorry but I don't know much about that.
Looking for someone here to guide to right direction.
TIA
Last edited by TheSaint (2013-07-15 03:12:37)

WonderWoofy wrote:It depends on what network management utility you use and therefore also how you connect.  If you are using an ethernet connection, you could just use dhcpcd@<interface>.service.  This is a very simple service, and the network.target will not be reached until the IP address and connectivity is established.
Meanwhile some good suggestion (like yours) came up, I've tried a couple of recipes. But  dhcpcd.service didn't get it right. Maybe dhcpcd@<interface>.service, would work, I'll see later.
I got this working:
[Unit]
Description=aria2 Service
Requires=network.target
After=dhcpcd.service
[Service]
Type=forking
User=aria2
Group=aria2
EnvironmentFile=/etc/conf.d/aria2.conf
WorkingDirectory=/var/aria2
ExecStart=/usr/bin/aria2c $ARIACMD
ExecReload=/usr/bin/kill -HUP $MAINPID
RestartSec=1min
Restart=on-failure
[Install]
WantedBy=multi-user.target
You may note the After=dhcpcd.service, but it doesn't work. I found RestartSec=1min ,Restart=on-failure more effective and perhaps less blocking to wait for the network to be ready. As a server this  should be a small issue, very seldom compared with the running time. We (family members) can accept a little wait for the service to be on.
Exactly I don't know which of the two is the right solution, maybe the delay is the right one.
I was doing a cron scheduled job, before using systemd  boot, which was kicking minidlna every 5 minutes, since it was dieing often. I didn't discover what was the reason.
I think I'll have to study another recipe which sets up a timer and keep an eye on these two services, for the long term service. But even cron would suffice, I think.
WonderWoofy wrote:if you are using wireless, the only two real solutions would be to use netctl@<profile>.service, which too won't reach the network.target until a conplete connection is made
Yes I'm on wireless network and the interface plugged on USB . My intent should go beyond any particular configuration. Maybe because I'd like to show a working setup, which may fit for all configuration (90 % )
I have to admit that the actual solution do not care much whether the network is found, so I hope to get a smarter setup that counts on the necessary tools before try something. However it's proved that they fail when no connection to the router is done. But I'm preferring that they succeed. 
WonderWoofy wrote: NetworkManager gets around this by implementing an additional service called (unimaginatively) NetworkManager-wait-online.service, which is pulled in automatically when you enable NetowrkManager.service.
As I stated above I'm expecting a solution that won't pull in so much dependencies. Even NM is my connection manager, on the server.
WonderWoofy wrote:
You probably also want to use Requisite=aria2c.service on the minidlna.service as well.  This too means that it will be started after aria2c, but that it will not start at all if it is not running or fails.
Additionally, you could try using the Requisite configuration on the minidnla, while setting the aria2c to restart itself on failure.  So that it will keep trying, and once it does, then minidlna will start.
looks like a dog biting the tail . It's much preferable a separated failure, just in case.
WonderWoofy wrote:Edit: Also, it is not SystemD.  It is systemd (like other "daemon" binaries in *nix).
I'm quite sure I saw it somewhere, none of my inventions
Last edited by TheSaint (2013-07-13 07:10:33)

Similar Messages

  • How to start bonjour service on windows 7

    how to start bonjour service on windows 7,  without this service i can't install itunes.

    Doublechecking before proceeding ... are you getting a message saying that "the Bonjour Service can't be started" when you try to install iTunes? Or is something different going on?

  • How to start a thread after the execution/termination of another thread.???

    Hello,
    How to start a thread after the execution/termination of another thread....???
    For example:
    consider two threads: ThreadA and ThreadB
    I could start the ThreadB after the execution of ThreadA.
    How to identify the termination of one thread.....???
    Please help me...
    Thanks & Regards,
    Kayalvizhi

    What do you mean with "it doesn't work"? Do you get a compiler error? Do you get an exception at runtime? What's the error message?
    Jesper

  • [SOLVED] gdm freezes when started as service (systemd)

    Hey,
    I've run into a weird issue here: when I reboot my laptop, it gets stuck after the "file system clean" messages and GDM won't come up.
    After some time, it shows a "oops, something has gone wrong"-message and I can log in, but my settings are gone (mouse moves slowly, battery applet shows no battery, etc.).
    After a few minutes, gnome-shell will crash.
    sudo systemctl status gdm.service:
    gdm.service - GNOME Display Manager
    Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled)
    Active: active (running) since Fr 2013-08-02 19:11:27 CEST; 4min 43s ago
    Main PID: 404 (gdm)
    CGroup: name=systemd:/system/gdm.service
    ├─ 404 /usr/bin/gdm
    ├─ 915 /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Displays/_0
    ├─ 962 /usr/bin/Xorg :0 -background none -verbose -auth /var/run/gdm/auth-for-gdm-setsPX/database -seat seat0 -nolisten tcp vt1
    └─3050 gdm-session-worker [pam/gdm-password]
    Aug 02 19:11:27 tp systemd[1]: Started GNOME Display Manager.
    Aug 02 19:11:28 tp gdm[404]: Failed to give slave programs access to the display. Trying to proceed.
    Aug 02 19:13:24 tp gdm-password][3050]: pam_unix(gdm-password:session): session opened for user neunerseb by (unknown)(uid=0)
    Aug 02 19:13:24 tp gdm[404]: Failed to remove slave program access to the display. Trying to proceed.
    last lines (those with "gdm[404]" get repeated when it crashes".
    However (!) when I disable gdm.service and put "exec gnome-session" into my xinitrc and call "startx" it works just fine.
    Any ideas?
    Last edited by neunerseb (2013-08-03 08:46:03)

    I just tried "systemctl start gdm.service" from tty twice. First time was good, the second time I had the same old error again.
    I also tried running gdm as root with the same result.
    Running gnome-session works fine, so it's either a gdm or systemd thing...
    edit: just found this in the log
    gdm.service - GNOME Display Manager
    Loaded: loaded (/usr/lib/systemd/system/gdm.service; disabled)
    Active: inactive (dead)
    Aug 03 00:49:52 tp gdm[3062]: Freeing conversation 'gdm-launch-environment' with active job
    Aug 03 00:49:52 tp gdm[3062]: GLib-GObject: g_object_ref: assertion `object->ref_count > 0' failed
    Aug 03 00:49:52 tp gdm[3062]: GLib-GObject: g_object_unref: assertion `object->ref_count > 0' failed
    Aug 03 00:49:52 tp systemd[1]: Stopped GNOME Display Manager.
    Aug 03 00:50:34 tp systemd[1]: Starting GNOME Display Manager...
    Aug 03 00:50:34 tp systemd[1]: Started GNOME Display Manager.
    Aug 03 00:50:35 tp gdm[3005]: Failed to give slave programs access to the display. Trying to proceed.
    Aug 03 00:52:03 tp systemd[1]: Stopping GNOME Display Manager...
    Aug 03 00:52:03 tp gdm[3005]: GLib-GObject: g_object_ref: assertion `object->ref_count > 0' failed
    Aug 03 00:52:03 tp systemd[1]: Stopped GNOME Display Manager.
    Last edited by neunerseb (2013-08-02 23:09:04)

  • How to start the services in oracle9i AS

    hi
    after installing the 9i infra and AS,I met the problems of starting services,I want to know how to arrange them to start?and if i need to start them all,which one should must be started.
    in services of ias,I also met a strange problem,the service(or the instance)ias1.liz.tju.bmti.com.cn_Discoverer is status unknown :
    Application Server: ias1.liz.tju.bmti.com.cn > Discoverer
    Oracle9iAS Discoverer ·þÎñÅäÖÃ
    Oracle9iAS Discoverer ×¼Ðí×éÖ¯ÖÐËùÓ춱ðµÄÒµÎñÓû§¶¼¿ÉÒÔ°´Ðè·ÃÎÊÊý¾Ý¼¯ÊÐ, Êý¾Ý²Ö¿â»ò OLTP ϵͳÖеÄÐÅÏ¢¡£Oracle9iAS Discoverer ¿ÉÀûÓÃÈÎÒâµÄ±ê×¼ Web ä¯ÀÀÆ÷ÏòÓû§Ìṩ¼´Ï¯²éѯ, ±¨¸æ, ·ÖÎö, ͼÐÎÏÔʾºÍ Web ·¢²¼¹¦ÄÜ, ÒÔ±ã¸ü¼ÓѸËÙ¿É¿¿µØÖƶ¨µç×ÓÉÌÎñ¾ö²ß¡£
    why this happened?thx
    by the way,I use win2k server and the font is Chinese Simplified font
    thx again

    Starting (and stopping) is a very basic task to be able to perform and should be found in the documentation set, which is found here (from the OTN main page):
    http://www.oracle.com/technology/documentation/index.html
    Some more managed ways of starting and stopping several instances can be found in this forum, using the search function:
    http://forums.oracle.com/forums/search.jspa?objID=f44

  • Can't start OLAPServer service after installing patches #9.0.1.3

    I had a running OLAPServer service before I installed the 9i latest patches (#9.0.1.3) yesterday.
    I have tried to use either Windows Service Manager or OLAP Services Instances Manager to start that service.
    When I tried to use OLAP OSIM, I got error message like this :
    XPINSMGR - 10565 Cannot access olap service from this database. Cause : an attempt was made to access OLAP services on a database on which it is not installed (?). Action: Install OLAP Service in the database...
    I have tried to create a new database and set all the OLAP configuration, but it is still not working..
    Is there someone can help me to figure out what happened ?
    thanks, Sjarif

    Thank's for your suggestion. But my problem occured after I installed the 9.0.1.3.1 patch on my 9i database server (in run on XP Pro machine). I have checked OLAPDBA,OLAPSYS,and OLAPSVR security status, they are NOT LOCKED and NOT EXPIRED.
    I have checked the content of OLAPServicesAgent.log file and I find ORA-03113 error.
    This is the content of OLAPServicesAgent.log file:
    [08-Apr-2002, 12:47:28PM] Finished waiting for init thread to finish; wait result: 0
    [08-Apr-2002, 12:47:28PM] Waiting for serviceDoneEvent to be triggered.
    [08-Apr-2002, 12:47:28PM] Filtering output using VERBOSE DEBUG (level 3 of 3) mode.
    [08-Apr-2002, 12:47:28PM]
    [08-Apr-2002, 12:47:28PM] Retrieving privilege information from registry and RDBMS.
    [08-Apr-2002, 12:47:28PM] New RDBMSInstance() allocated.
    [08-Apr-2002, 12:47:28PM] ztcsr failed with error code -1013
    [08-Apr-2002, 12:47:28PM]
    [08-Apr-2002, 12:47:37PM] GetRDBMSConnection(): setConnection() failed.
    [08-Apr-2002, 12:47:37PM] Was trying to connect to tns listener, OLAPDATA, with user id, olapsvr
    [08-Apr-2002, 12:47:37PM] Error message was: ORA-03113: end-of-file on communication channel
    [08-Apr-2002, 12:47:37PM]
    [08-Apr-2002, 12:47:37PM] Error code was: 4294967295, Function was: TxsRdbOCIConnection::connect
    [08-Apr-2002, 12:47:37PM] RDBMSInstance() destructor called.
    [08-Apr-2002, 12:47:37PM] New RDBMSInstance() allocated.
    [08-Apr-2002, 12:47:37PM] ztcsr failed with error code -1013
    [08-Apr-2002, 12:47:37PM]
    [08-Apr-2002, 12:47:37PM] GetRDBMSConnection(): setConnection() failed.
    [08-Apr-2002, 12:47:37PM] Was trying to connect to tns listener, OLAPDATA, with user id, olapsvr
    [08-Apr-2002, 12:47:37PM] Error message was: ORA-03113: end-of-file on communication channel
    [08-Apr-2002, 12:47:37PM]
    [08-Apr-2002, 12:47:37PM] Error code was: 4294967295, Function was: TxsRdbOCIConnection::connect
    [08-Apr-2002, 12:47:37PM] RDBMSInstance() destructor called.
    [08-Apr-2002, 12:47:37PM] New RDBMSInstance() allocated.
    [08-Apr-2002, 12:47:37PM] ztcsr failed with error code -1013
    [08-Apr-2002, 12:47:37PM]
    [08-Apr-2002, 12:47:38PM] GetRDBMSConnection(): setConnection() failed.
    [08-Apr-2002, 12:47:38PM] Was trying to connect to tns listener, OLAPDATA, with user id, olapsvr
    [08-Apr-2002, 12:47:38PM] Error message was: ORA-03113: end-of-file on communication channel
    [08-Apr-2002, 12:47:38PM]
    [08-Apr-2002, 12:47:38PM] Error code was: 4294967295, Function was: TxsRdbOCIConnection::connect
    [08-Apr-2002, 12:47:38PM] RDBMSInstance() destructor called.
    [08-Apr-2002, 12:47:38PM] New RDBMSInstance() allocated.
    [08-Apr-2002, 12:47:38PM] ztcsr failed with error code -1013
    [08-Apr-2002, 12:47:38PM]
    [08-Apr-2002, 12:47:38PM] GetRDBMSConnection(): setConnection() failed.
    [08-Apr-2002, 12:47:38PM] Was trying to connect to tns listener, OLAPDATA, with user id, olapsvr
    [08-Apr-2002, 12:47:38PM] Error message was: ORA-03113: end-of-file on communication channel
    [08-Apr-2002, 12:47:38PM]
    [08-Apr-2002, 12:47:38PM] Error code was: 4294967295, Function was: TxsRdbOCIConnection::connect
    [08-Apr-2002, 12:47:38PM] RDBMSInstance() destructor called.
    [08-Apr-2002, 12:47:38PM] Done retrieving privilege information.
    [08-Apr-2002, 12:47:38PM] Starting IOR listener on port: 7051
    [08-Apr-2002, 12:47:38PM] ServiceManager Constructor called.
    [08-Apr-2002, 12:47:38PM] ScmEnumServicesStatus()***ret = 234***m_hServiceManager = 1417944***bufsize = 10180***numServices = 0
    [08-Apr-2002, 12:47:38PM] ScmEnumServicesStatus()***ret = 0***m_hServiceManager = 1417944***bufsize = 0***numServices = 98
    [08-Apr-2002, 12:47:39PM] An access provider was found reading the Security/AuthenticationProviderPath registry key (C:\OraHome1\bin\xsapdbms.dll) for the service name, OLAPServer
    [08-Apr-2002, 12:47:39PM] New RDBMSInstance() allocated.
    [08-Apr-2002, 12:47:39PM] ztcsr failed with error code -1013
    [08-Apr-2002, 12:47:39PM]
    [08-Apr-2002, 12:47:39PM] GetRDBMSConnection(): setConnection() failed.
    [08-Apr-2002, 12:47:39PM] Was trying to connect to tns listener, OLAPDATA, with user id, olapsvr
    [08-Apr-2002, 12:47:39PM] Error message was: ORA-03113: end-of-file on communication channel
    [08-Apr-2002, 12:47:39PM]
    [08-Apr-2002, 12:47:39PM] Error code was: 4294967295, Function was: TxsRdbOCIConnection::connect
    [08-Apr-2002, 12:47:39PM] RDBMSInstance() destructor called.
    [08-Apr-2002, 12:47:39PM] ExecuteRDBMSCommand() failed, command = select * from ALL_OLAP_os_child_instances
    [08-Apr-2002, 12:47:39PM] Unable to add Olap child instance, OLAPServer, to the Oracle ALL_OLAP_os_child_instances table.
    [08-Apr-2002, 12:47:39PM] Check to see if the usernames and passwords within olap.key associated with
    [08-Apr-2002, 12:47:39PM] this instance are correct. If not, use the /CreateKeyval option of xsdaemon to reset the values, or use
    [08-Apr-2002, 12:47:39PM] the script provided for that purpose.
    [08-Apr-2002, 12:47:39PM] xsdaemon process is terminating abnormally.
    It seems to me there is a problem in OCI connection ...
    Thanks.
    Sjarif

  • Can't  start oracle8i service after installing successfully

    Hello
    i have already install oracle8.1.5 on solaris intel 7
    after installing, i want to start oracle service,
    using oracle accout, i log in , i go to $ORACLE_HOME/bin and execute 'dbstart'
    it is said 'cat can't open /etc/oratab'
    my ipc parametr is:
    set shmsys:shminfo_shmmax=4294967295
    set shmsys:shminfo_shmmin=1
    set shmsys:shminfo_shmmni=100
    set shmsys:shminfo_shmseg=10
    set semsys:seminfo_semmni=100
    set semsys:seminfo_semmsl=200
    set semsys:seminfo_semmns=420
    set semsys:seminfo_semopm=100
    set semsys:seminfo_semvmx=32767
    .profile is
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOME=/u01/app/oracle/product/8.1.5
    ORACLE_SID=o815
    PATH=$ORACLE_HOME/bin:/bin:/usr/bin
    can anyone help me?
    thanks a lot
    liu fang

    Hi,
    check the file oratab under /etc and the permission on that.if oratab is not under etc make a search for oratab and copy that to under /etc.
    try ps -ef |grep oracle
    see what happened.
    Yogi
    [email protected]

  • ! How to start Web Services in Java?

    Hi,
    I am just wondering if someone knows how I can start Web Services with Java?

    The best place to start is at the beginning of the tutorial. If you've downloaded and installed the jwsdp pack, then download the tutorial and read from the start.
    When you come to more specific problems then post again.

  • How to start GSd service and ASM  (ADVM Driver Not found)

    Dear fellow
    Can any tell me how to start the GSD service and install ASM ADVM Driver.
    I can try with srvctl utility.

    Dear zekeriya
    I also check it but the gsd service is not running I try to start it with srvctl utility but did not start.
    fedb16# ./srvctl status nodeapps -n fedb16
    -n <node_name> option has been deprecated.
    VIP fedb16-vip is enabled
    VIP fedb16-vip is running on node: fedb16
    Network is enabled
    Network is running on node: fedb16
    GSD is enabled
    GSD is not running on node: fedb16
    ONS is enabled
    ONS daemon is running on node: fedb16
    eONS is enabled
    eONS daemon is running on node: fedb16
    fedb16#

  • How to start olpa service of 9i on windows 2000 platform

    I can't start olap instance manager in dba studio .it is said in the error message I have not started the olap service.But I can't start them in control panel-->service.It is said in the 9i doc that two programs must be executed manually under linux to start olap service,but I can't find them in windows2000.How can I start olap services under win2000?
    Thanks a lot!

    Hello,
    Before proceeding ahead with this problem.
    Can you please provide me following information:-
    1)Which DB version you are using currently?
    2)Have you applied the latest SBP to the system?
    3)Provide me alert log & trace file.
    4)kindly provide me R3trans.log.
    Best Regards,
    Gunjan

  • [SOLVED] Systemd won't start netcfg

    It works if I do netcfg up mynetwork.
    If I do sudo systemctl start netcfg.service I get "Job for netcfg.service failed. See 'systemctl status netcfg.service' and 'journalctl -n' for details."
    From systemctl status netcfg.service I get
    netcfg.service - Netcfg multi-profile daemon
          Loaded: loaded (/usr/lib/systemd/system/netcfg.service; enabled)
          Active: failed (Result: exit-code) since Sun, 2012-11-25 14:22:54 GMT; 44s ago
         Process: 16081 ExecStart=/usr/bin/netcfg-daemon start (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/netcfg.service
    From journalctl -n I get
    Showing user generated messages only. Users in the group 'adm' can see all messages. Pass -q to turn this notice off.
    Last edited by acidic (2012-11-25 15:47:37)

    https://bbs.archlinux.org/viewtopic.php?id=150076
    https://bbs.archlinux.org/viewtopic.php?id=148079

  • How to start Web Service Creation Tool in CRM 6.0 ?

    Hi,
    I am trying to create new web service in CRM 6.0. I have gone through the documentation and no where I see how to start this tool. Can anyone explain how to start this tool please.
    Thanks for reading this message. Your help will be appreciated.
    Regards,
    Phani.

    Hi,
    There are 2 ways how you could call up the WebService Tool. The first one is already described before, this is directly from the component workbench (see comment before) in the test mode.
    The second one is to integrate it into any role directly and start it directly from that role. Therefore you have to do the following:
    1. Go to the IMG - Customizing in SAP Gui (transaction SPRO)
    2. there in Customer Relationship Managment-> UI Framework-> Technical role definition enter "define navigation bar profile"
    3. There you will find an logical link (which is the basis for you beeing able to navigate to the WebService tool) named "WEB-SER".
    4. You have to assign this link in the next folder to a Work Center Link Group under "assigned links"
    5. Then you go to the next folder "Define Work Center" and there you assign your "work center link group" to a work center
    Now you have done the basics and now you have to decide in which Role you want to have it displayed. Therefore you go to "Define Profile" further down in the same Tree
    1. Select the role where you want to assign the Work Center to
    2. Go to assign WorkCenters and add it there
    3. Decide on the position number where the work center should appear in your role.
    If you have done this you should and you have not done it so far, go to "Business role" (you could do this in IMG or in the WebUI). As you are already in IMG lets assume you stay there:
    1. Go to "Define Business Role"
    2. Check at the details of the business role that your Navigation bar Profile used in "Define Profile" above is assigned to your business role
    3. Go to "Adjust Work Center" and make sure your work center is there and is not set to "invisible".
    4. In "Ajust Work Center Link Groups" decide if the your new entrie should be displayed in the 2nd Level Menue of your role via flagging "in menu" or if it just should be reachable via the work center (not flagging in menue) but have it visible.
    Via this the new entry should appear in the Work Center (when the user is pressing on the left side just the button of your Work Center or also in the second level menue when he uses the little arrow on the Menue itself.
    Hope this helps
    Florian

  • Unable to start ifs service after database is restarted

    Hi All,
    I am getting this weird problem with iFS. I have web application where I connect to iFS to read some of the documents. The problem is when the database is stopped and started with App server still running (ifs is also up and running)... I am getting the following error message.
    Any help will be greatly appreciated. I have also attached the java class which I am using to get connection...
    oracle.ifs.common.IfsException: IFS-21008: Unable to connect to iFS service
    oracle.ifs.common.IfsException: IFS-11013: Unable to start inter-service event exchanger
    java.sql.SQLException: No more data to read from socket
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:857)
         at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:731)
         at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:690)
         at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:103)
         at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:466)
         at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:413)
         at oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConnection.java:470)
         at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.java:379)
         at oracle.ifs.server.S_LibraryServiceRdbmsEventExchanger.start(S_LibraryServiceRdbmsEventExchanger.java:243)
         at oracle.ifs.server.S_LibraryService.addSession(S_LibraryService.java:2695)
         at oracle.ifs.server.S_LibrarySession.<init>(S_LibrarySession.java:1961)
         at java.lang.reflect.Constructor.newInstance(Native Method)
         at oracle.ifs.server.S_LibraryService.constructSession(S_LibraryService.java:2566)
         at oracle.ifs.server.S_LibraryService.connect(S_LibraryService.java:2359)
         at oracle.ifs.beans.LibraryService.connect(LibraryService.java:977)
         at com.comp.test.utils.iFSSession.getIfsConnection(iFSSession.java:73)
         at com.comp.test.controller.ReportRequestAction.processRequest(ReportRequestAction.java:95)
         at com.comp.test.controller.ReportRequestAction.execute(ReportRequestAction.java:64)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    --java code
              if(!LibraryService.isServiceStarted(serviceName)) {
              service = LibraryService.startService(serviceName,servicepasswd);
              } else {
              service = LibraryService.findService(serviceName);
                   //CredentialManager to authenticate a user
              CleartextCredential cred = new CleartextCredential(name, password);
              ConnectOptions connectOpt = new ConnectOptions();
                   //Sets and gets the Locale of the new session.
              connectOpt.setLocale(Locale.getDefault());
                   //Connects to iFS, establishing a new LibrarySession
              ifsSession = service.connect(cred, connectOpt);
                   //Set the administrator mode state for this session
                   ifsSession.setAdministrationMode(true);
                   return ifsSession;

    I am using the following class to get ifs session from IfsHttpLogin
    public class TestIfsSession implements IfsHttpLogin {
    * The <code>LibrarySession</code>.
    private LibrarySession m_session;
    * The <code>FolderPathResolver</code>.
    private FolderPathResolver m_resolver;
    * Default constructor required by the jsp spec for the USEBEAN tag
    * @exception IfsException
    public TestIfsSession() throws IfsException {
    public void init(LibrarySession libSession)
         this.m_session = libSession;
    * Return the login's session object.
    * @return The <code>LibrarySession</code> object.
    public LibrarySession getSession() {
    return m_session;
    * Return the login's path resolver.
    * @return The <code>FolderPathResolver</code> object.
    public FolderPathResolver getResolver() {
    return m_resolver;
    * Called when this object is bound to the HTTP session object.
    * @param event
    * The event when the object is bound to the Http session.
    public void valueBound(HttpSessionBindingEvent event) {
    // do nothing
    m_category.debug("value bound : ");
    * Called when this object is unbound from the HTTP session object.
    * @param event
    * The event when the object is unbound to the Http session.
    public void valueUnbound(HttpSessionBindingEvent event) {
    m_resolver = null;
    try {
    if (m_session != null) {
    m_category.debug("removing connection: valueUnbound " + m_session);
    m_session.disconnect();
    } catch (IfsException e) {
    e.printStackTrace();
    } finally {
    m_session = null; // release the resources
    System.gc();

  • How to start free trial after download in photoshop

    i have downloaded the Free trial version of photoshop but i have no idea how to start doing work with the free trial.  Help????

    If you're using an older computer & operating system, you might be able to download a free-trial of CS6 instead. Just be sure to follow the VERY IMPORTANT INSTRUCTIONS. 
    CS6 Direct Downloads
    http://prodesigntools.com/adobe-cs6-direct-download-links.html
    CS6 Suite's Tech Specs
    http://prodesigntools.com/products/adobe-cs6-system-requirements.html
    Once your product(s) are installed on your computer, you launch them the same way you launch any software, via the desktop shortcut or from Program Files (win) or Applications folder (mac).
    Nancy O.

  • [SOLVED]start a service *AFTER another one has executed completely

    How can i make "test.service" to start after "customstartup.service" has been fully executed?
    As you can see, even if test.service Requires customstartup and customstartup.service is "oneshot", test.service is started while customstartup is still starting!
    The following is in a linux container:
    [root@archiso ~]# cat /etc/systemd/system/customstartup.service
    [Unit]
    Description=customstartup
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/usr/bin/sleep 100
    [Install]
    WantedBy=multi-user.target
    [root@archiso ~]# cat /etc/systemd/system/test.service
    [Unit]
    Description=test
    Requires=customstartup.service
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/usr/bin/sh -c "echo hi all"
    [Install]
    WantedBy=multi-user.target
    # systemctl status customstartup
    ● customstartup.service - customstartup
    Loaded: loaded (/etc/systemd/system/customstartup.service; enabled)
    Active: activating (start) since gio 2014-07-03 16:30:10 CEST; 12s ago
    Main PID: 32 (sleep)
    CGroup: /machine.slice/machine-root\x2dimage.scope/system.slice/customstartup.service
    └─32 /usr/bin/sleep 100
    [root@archiso ~]# systemctl status test
    ● test.service - test
    Loaded: loaded (/etc/systemd/system/test.service; enabled)
    Active: active (exited) since gio 2014-07-03 16:30:10 CEST; 23s ago
    Process: 26 ExecStart=/usr/bin/sh -c echo hi all (code=exited, status=0/SUCCESS)
    Main PID: 26 (code=exited, status=0/SUCCESS)
    CGroup: /machine.slice/machine-root\x2dimage.scope/system.slice/test.service
    lug 03 16:30:10 archiso sh[26]: hi all
    lug 03 16:30:10 archiso systemd[1]: Started test.
    Any hints? Is there a way to enforce the wait?
    Thanks.
    Last edited by kokoko3k (2014-07-03 15:59:37)

    From systemd.unit:
    Requires=
               Configures requirement dependencies on other units. If this unit gets activated, the
               units listed here will be activated as well. If one of the other units gets
               deactivated or its activation fails, this unit will be deactivated. This option may be
               specified more than once or multiple space-separated units may be specified in one
               option in which case requirement dependencies for all listed names will be created.
               Note that requirement dependencies do not influence the order in which services are
               started or stopped. This has to be configured independently with the After= or Before=
               options. If a unit foo.service requires a unit bar.service as configured with
               Requires= and no ordering is configured with After= or Before=, then both units will
               be started simultaneously and without any delay between them if foo.service is
               activated. Often it is a better choice to use Wants= instead of Requires= in order to
               achieve a system that is more robust when dealing with failing services.

Maybe you are looking for