Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-4152

Issue in communicating with other service. Getting error in initialization.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • Lamprey 12.0.0
    • Connectivity
    • None
    • QEMU x86_64

      Hello Team,

      We have developed a service which requires 'network-manager' API to be initialized during its start up. For this, in the init function of our service we are using below function to check its initialization:

      ret = afb_daemon_require_api("network-manager", 1);
      if (ret < 0)
      {
      AFB_ERROR("Cannot request network manager service");
      }

      Also in config.xml.in we have included below lines:

      <feature name="urn:AGL:widget:required-api">
      <param name="network-manager" value="ws"/>
      </feature>

      Issue: Our service gets installed properly using 'afm-util install servicename.wgt' command. However upon running the service using 'afm-util start serviceid', it always fails with error 'cannot-start'.

      Output of journalctl -f command is shown below:

      Nov 25 20:25:14 qemux86-64 afbd-securityservice[6816]: NOTICE: [API securityOpe rations] Init of security service called [/home/fota/AGL3/agl-app/newservice/ser vice/security_module.c:797,init]
      Nov 25 20:25:14 qemux86-64 afbd-securityservice[6816]: ERROR: [API securityOper ations] requiring api network-manager initialized failed [/usr/src/debug/af-bind er/lamprey+gitAUTOINC+1b6249810b-r0/git/src/afb-export.c:382,require_api_cb]
      Nov 25 20:25:14 qemux86-64 afbd-securityservice[6816]: ERROR: [API securityOper ations] Cannot request network manager service [/home/fota/AGL3/agl-app/newservi ce/service/security_module.c:804,init]
      Nov 25 20:25:14 qemux86-64 afbd-securityservice[6816]: ERROR: Initialisation of service API securityOperations failed (-1): No such file or directory [/usr/src /debug/af-binder/lamprey+gitAUTOINC+1b6249810b-r0/git/src/afb-export.c:1793,afb_ export_start]
      Nov 25 20:25:14 qemux86-64 afbd-securityservice[6816]: ERROR: The api securityO perations failed to start [/usr/src/debug/af-binder/lamprey+gitAUTOINC+1b6249810 b-r0/git/src/afb-apiset.c:820,start_api]
      Nov 25 20:25:14 qemux86-64 systemd[1]: afm-appli-securityservice-1.0-main.serv ice: Main process exited, code=exited, status=1/FAILURE
      Nov 25 20:25:14 qemux86-64 systemd[1]: afm-appli-securityservice-1.0-main.serv ice: Failed with result 'exit-code'.
      Nov 25 20:25:14 qemux86-64 systemd[1]: Failed to start Security service to verif y certificates and perform security operations.
      Nov 25 20:25:14 qemux86-64 afm-system-daemon[261]: ERROR: start error system un it afm-appli-securityservice-1.0-main.service for uid 1001: failed [/usr/src/d ebug/af-main/lamprey+gitAUTOINC+3ea6f4a404-r0/git/src/afm-urun.c:280]
      Nov 25 20:25:14 qemux86-64 su[6807]: pam_unix(su:session): session closed for us er agl-driver

       

      I have tried installing the service with both 'root' and 'agl-driver' users.

      But the result is same for both.

      Attaching few screenshots for your reference.

       

        1. afm-util_list_runnables.JPG
          24 kB
        2. install_success.JPG
          17 kB
        3. journalctl_output.JPG
          128 kB
        4. journalctl.txt
          393 kB
        5. network-manager_running.JPG
          176 kB
        6. start_fail.JPG
          16 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            scottm Scott Murray
            kathan90 kathan patel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: