I have tried to create my trace dbus daemon, needed to kio terminal autospawning routines. Problem is, I have got:
method call time=1666778936.233014 sender=:1.1 -> destination=org.kde.kio.appkinddetector.system_helper serial=2 path=/org/kde/framework/kio/console_systemdaemon; interface=org.kde.framework.kio.console_systemdaemon.mobj; member=registerProcess
uint32 32765
error time=1666778936.270515 sender=org.freedesktop.DBus -> destination=:1.1 error_name=org.freedesktop.DBus.Error.Spawn.PermissionsInvalid reply_serial=2
string "The permission of the setuid helper is not correct"
Config files are:
# cat /etc/dbus-1/system.d/org.kde.kio.appkinddetector.system_helper.conf
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="root">
<allow own="org.kde.kio.appkinddetector.system_helper"/>
</policy>
<policy context="default">
<allow send_destination="org.kde.kio.appkinddetector.system_helper"
send_interface="org.kde.framework.kio.console_systemdaemon.mobj"/>
</policy>
</busconfig>
# cat /usr/share/dbus-1/system-services /org.kde.kio.appkinddetector.system_helper.service
[D-BUS Service]
Name=org.kde.kio.appkinddetector.system_helper
Exec=/kde/src/build/franework/kio/bin/kio-appkinddetector-systemservice
User=root
I think, there exist an configuration error, but I cannot figure out, where.
I work inside docker daemon, which OpenSUSE Tumbleweed installed. I also give high access/permission of host to container.
Related
In the process of hacking around with dbus-monitor, I tried connecting to the Avahi daemon:
$ dbus-monitor --system \
"type='signal',interface='org.freedesktop.Avahi.Server',member='StateChanged'"
This will respond to changes in the state of the Avahi daemon.
$ sudo restart avahi-daemon
signal sender=org.freedesktop.DBus ->
dest=:1.315
serial=2
path=/org/freedesktop/DBus;
interface=org.freedesktop.DBus;
member=NameAcquired
string ":1.315"
signal sender=:1.318 ->
dest=(null destination)
serial=4
path=/;
interface=org.freedesktop.Avahi.Server;
member=StateChanged
int32 1
string "org.freedesktop.Avahi.Success"
signal sender=:1.318 ->
dest=(null destination)
serial=13
path=/;
interface=org.freedesktop.Avahi.Server;
member=StateChanged
int32 2
string "org.freedesktop.Avahi.Success"
However, I cannot browse services like this.
$ dbus-send --system --dest=org.freedesktop.Avahi --print-reply \
/ org.freedesktop.Avahi.Server.ServiceBrowserNew \
int32:-1 int32:-1 string:'_http._tcp' string:'local' uint32:0
method return sender=:1.345 ->
dest=:1.354
reply_serial=2
object path "/Client5/ServiceBrowser1"
$ dbus-monitor --system \
"type='signal',interface='org.freedesktop.Avahi.ServiceBrowser'"
As far as I understand, this should respond to new/removed http service
instances, but it does not.
Why?
Update:
Executing the equivalent of the above shell commands with the python and c APIs
worked as expected. However, they could not connect to a ServiceBrowser which I
had constructed using dbus-send and I could not use dbus-monitor to listen
to a ServiceBrowser they constructed.
At this point, my best guesses are:
Once the connection is closed (by the termination of the dbus-send command),
the ServiceBrowser I created is destroyed. However this does not explain why
dbus-monitor is unable to connect to a ServiceBrowser which is in active
communication with my python script.
The signals from the ServiceBrowser are emitted only to the connection which
instantiated them.
I believe the problem is caused by the dbus policy.
Try to change the avahi dbus policy in /etc/dbus-1/system.d/avahi-dbus.conf like this (remember to restart avahi daemon):
<busconfig>
<policy context="default">
<!-- All messages may be received by default -->
<allow receive_requested_reply="false" receive_type="method_call" eavesdrop="true"/>
<allow receive_requested_reply="false" receive_type="method_return" eavesdrop="true"/>
<allow receive_requested_reply="false" receive_type="error" eavesdrop="true"/>
<allow receive_requested_reply="false" receive_type="signal" eavesdrop="true"/>
<allow eavesdrop="true"/>
</policy>
<policy user="root">
<allow send_destination="*" eavesdrop="true"/>
<allow receive_sender="*" eavesdrop="true"/>
</policy>
</busconfig>
And use root privilege to run dbus-monitor:
sudo dbus-monitor --system \
"type='signal',interface='org.freedesktop.Avahi.ServiceBrowser'"
reference: http://blog.nutsfactory.net/2011/03/08/test-and-debug-dbus/
When I am running solr with runjetty in eclipse ,I am getting an exception(IlleagalStateException) and port no:8080 already in use?
Can anyone help me on this?
in your solr installation folders, search for "example/etc/jetty.xml"
this is the relevant part you're looking for:
<Set name="port">
<SystemProperty name="jetty.port" default="8080"/>
</Set>
change the "default" value as you like (unused port)
or launch jetty adding
-Djetty.port=11111
from the command line (1111 is just a random number, you choose again the one you need)
This means that there is a java service which is using the port, go to task manager and process and kill any javaw process that is running currently ...
Hope that might fix.
change you apache tomcat port to some other port and try again...
Please set port value in server.xml file
Its path is like,
Tomcat-installation-dir\conf\server.xml
Search tag like this,
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
Change the port number to any other number like 9090 for example, and after changes it should look like this,
<!-- Define a non-SSL HTTP/1.1 Connector on port 9090 -->
<Connector port="9090" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
Dont change anything other than connector port,change only the value of port and save the file and now hit the url,
localhost:9090
Or use the port number which you have updated in the server.xml file.
localhost:port_in_server.xml
So if every thing goes fine it should open the tomcat home page....This will make sure that you have changed the tomcat's default port(i.e.8080)listen to 9090.
Shutdown the tomcat server at this point.
Now you stop and restart the jetty server and it will work for you with no issues..
Hope this helps....
I want to expose methods of my application on System bus using Qt Dbus in Qt Creator.
while using session bus ,the methods get exposed, but with system bus I am only able to see the Service name with which i registered but no methods to be exposed under it.(I am checking it in D-feet)
What should i do ?
You have to place your config file (e.g: example-dbus.conf) in /etc/dbus-1/system.d/
The example-dbus.conf file looks like:
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Only root user can own the service -->
<policy user="root">
<allow own="com.company.qtdbus"/>
</policy>
<!-- Allow anyone to invoke methods on server, except SetHostName -->
<policy context="default">
<allow send_destination="com.company.qtdbus"/>
<allow receive_sender="com.company.qtdbus"/>
<deny send_destination="com.company.qtdbus"
send_interface="com.company.qtdbus.Server" send_member="SetHostName"/>
</policy>
<!-- Allow everything, including access to SetHostName -->
<policy user="root">
<allow send_destination="com.company.qtdbus"/>
<allow receive_sender="com.company.qtdbus"/>
</policy>
</busconfig>
Restart the dbus daemon with /etc/init.d/d-bus restart and now you should be allowed to connect to the system bus. In fact, if you not allowed to connect to the system bus, a error message will be shown.
We have a WCF service running on a remote server. It runs as a Windows Service, not hosted in IIS. We can hit this WCF service from our WinForms and WFP apps without any problem. However, when we attempt to hit it from a Silverlight 4 app, we get the following error:
An error occurred while trying to make a request to URI 'http://111.111.111.111/8484/Psn'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.
Could someone put this into English and explain what I might be able to do to satisfy Silverlight?
The first thing to check is that you have a clientaccesspolicy.xml file or crossdomain.xml file on the WCF service host. Either of these files can be used to control which domains have access to your service. Without them no one has any access from Silverlight. These files live in the root of the WCF service host:
If, for example, the service is hosted in http://fabrikam.com then the file must be located at http://fabrikam.com/clientaccesspolicy.xml ... [or] ... http://fabrikam.com/crossdomain.xml.
The following clientaccesspolicy.xml file will allow access from http://www.example.com but block it from everywhere else:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction">
<domain uri="http://www.example.com"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
A similar crossdomain.xml file would be:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-http-request-headers-from domain="http://www.example.com" headers="SOAPAction,Content-Type"/>
</cross-domain-policy>
Source
I am using silverlight 4 application, in two scenarios.
Scenario 1: Silverlight and RPC on same machine
Being run hosted on a web page on the file system, silverlight XAP is also on the file system:
C:\Silverlight\FSSilverlightApp\bin\Debug\SilverlightApplication2TestPage.html
Connecting to a web site on localhost, being accessed:
https://localhost/rpc/someMethod
These are two separate URI's so the browser detects and immediately requests (track via fiddler):
https://lcoalhost/clientaccesspolicy.xml
sucessfully returns:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="http://*"/>
<domain uri="https://*" />
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
The application is then able to make the rpc requests (observed via fiddler)
Everything is fine. If i change the remote host to the local machine name instead of localhost, that works fine as well.
Scenario 2: Silverlight on local machine and RPC is remote
In this scenario, I am using a different desktop to access the same RPC server used in scenario 1.
Silverlight starts up, and no request to: clientaccesspolicy.xml is made
Fiddler shows a ton of https tunnels being established, but no commuinication between my machine and the remote server.
The following security exception is returned:
System.Security.SecurityException ---> System.Security.SecurityException: Security error.
at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResultasyncResult)
at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(ObjectsendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
--- End of inner exception stack trace ---
at Microsoft.FSharp.Control.WebExtensions.AsyncGetResponse#1781-1.Invoke(Exception _arg1023)
at Microsoft.FSharp.Control.AsyncBuilderImpl.callA#736.Invoke(AsyncParams`1 args)
I assume this is an IE configuration issue. I tried setting the machine in scenario 1, as a trusted site inside of internet explorer and that didn't seem to work... This must be a self signed or mismatched certificate issue. Any thoughts?
Using: IE 8 and Windows 7
Thoughts?
I used Fiddler to sit in between the sliverlight client and the server. IN order to get that to work properly I needed to export the fiddler certificate (tools\fiddlerOptions\https) and install it locally as the root certificate authority.