systemd service not starting using dbus interface - dbus

I am trying to start systemd service usnig dbus service. I am following the example 5 of below mentioned link:
http://www.freedesktop.org/software/systemd/man/systemd.service.html
My dbus service is:
[D-BUS Service]
Name=com.native.Test_Dbus_060
Exec=/usr/sbin/server_060
User=apps
StandardOutput=tty
TTYPath=/dev/ttyS0
SystemdService=com.native.Test_Dbus_060.service
my systemd com.native.Test_Dbus_060.service is:
[Unit]
Description=dbus test server
[Service]
Type=dbus
BusName=com.native.Test_Dbus_060
ExecStart=/usr/sbin/server_060
StandardOutput=tty
TTYPath=/dev/ttyS0
[Install]
WantedBy=multi-user.target
Now when I am trying to activate com.native.Test_Dbus_060.service service by acquiring the above mentioned bus in dbus, its not starting.
Both server_060 and client_060 are using dbus APIs for IPC.
NOTE: my server_060 and client_060 are communicating fine when using directly without systemd service and dbus service.
Here my first query is, whether such type of systemd service start possible?
and if yes then why it is not working in my case?

Well, if you have a closer look at the page you referenced you'll notice this note:
For bus-activatable services, don't include a "[Install]" section in the systemd service file, but use the SystemdService= option in the corresponding DBus service file, for example (/usr/share/dbus-1/system-services/org.example.simple-dbus-service.service)

Related

dbus activiation with arguments

I like to control a third-party application from my application via dbus.
However, the third-party application has some parameters that cannot be controlled by it's dbus interfaces but must be set by command line at service activation.
How can I pass those arguments to the service by time of the activation?
If they are static, put them in the Exec= line of the D-Bus .service file for that service.
If they need to be dynamic, it is not possible. If so, I suggest you file a bug against the service you are trying to start, requesting that they expose those options over D-Bus.

Calling a #RPC method outside of volttron

Say I have a running volttron agent with a #RPC decorated method (if that's relevant). Are there any ways to call that method from outside of the volttron platform? (In my case from a django web server)
An agent may register endpoints on the VOLTTRON web service. A callback may be setup for the endpoint as needed.
The web service must be enabled and the agent needs to pass "enable_web=True" to the base agent constructor.
You can find the documentation and examples here: http://volttron.readthedocs.io/en/develop/specifications/webframework.html
Along with what kyle-monson mentions, you also have to run Volttron using the bind argument. This will expose the registered endpoints on the bind arg given.
e.g `volttron -vv --bind-web-address "https://127.0.0.1:7080"
OR specify the bind-web-address in the ~/.volttron/config
[volttron]
message-bus = rmq
bind-web-address = https://127.0.0.1:7080
Then you can send HTTP POST request to https://127.0.0.1:7080/rpc-method-name
rpc-method-name in the request URL being the registered method using self.vip.web.register_endpoint("/rpc-method-name", self.call_back_method_for_endpoint)
The call back method takes in two parameters "env" and "data"
For more details on this two parameters check the docs here

CXF Corba and Namingservice

I'm trying to build a service that also (beside of SOAP) uses CORBA/IIOP for communication. I followed the (CXF) CORBA Bank Demo and manged it to get it running. But despite of what is written in the README-File it needs no corba naming service.
What I need is, that the server registers it's service at a corba nameing service and the client looks up the server through the nameing service. Is there any way to achieve this goal ?
The bank demo uses a file to store the reference. The "corba/hello_world" sample uses a "corbaname" url in the wsdl to force the use of a naming service. Check that one or the "bank_ws_addressing" sample which also uses the corbaname urls.

windows service code in c ,where to write service logic code?

the title is quite general but my doubt is specific.
I have doubt regarding where to write the service logic code (in service control handler or in ServiceMain),as in whatever the functionality the service would perform . Is it in ServiceMain ?
I have looked upon these topics on MSDN relate to service. But ,didn't help me
http://msdn.microsoft.com/en-us/library/ms687414%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/ms685984%28v=vs.85%29.aspx
Basically, I want to start a socket listening on windows using a service. This listening socket logic code will be in service file because of I am going to use winexe utility to send this service from linux box to windows box. currently, winexe sends the winexesvc service file on windows. So, ultimately I am going to replace the existing winexesvc service so that it will perform listening on a particular port function when sent on windows. (Service skeleton would remain same but its task performing logic will change,right?). please tell if I am missing anything.
Thanks in advance.
Service control handler should only, well, handle control messages that are sent to the service (the ones shown in the examples you linked are SERVICE_CONTROL_STOP and SERVICE_CONTROL_INTERROGATE). These control messages are sent to the service from the environment.
The logic of your service should be implemented in the ServiceMain function, when all required initialization is done. In the example at the URL in your post, the service logic code is put into the SvcInit function (which is probably not the most appropriate name for a function that implements logic of a service).

How to invoke asynchronous Bpel Process from OSB

I have Asynchronous Bpel process and I Want to invoke the same from OSB using the SOA Suite 11g.Can u please suggest me the process.
I recently read a blog on the same, which proved quite helpful to me. Find the link below;
http://biemond.blogspot.com/2009/03/calling-async-bpel-services-from-osb.html
~varun
You can use soa-direct protocol.
You can find an example and full explanation in following link:
OSB 11g - Call Asynchronous SOA service from OSB using soa-direct protocol
Short explanation:
Use a business service with soa-direct protocol.
Configure it as Role=Asynchronous client.
Configure Callback proxy.
Callback proxy will be the one your BPEL call when finish processing.

Resources