QtApplication in Netbeans: "Not connected to D-Bus server" - c++

I have created simple QtGui Application in QtCreator. it works.
then I have created QtApplication in Netbeans and added files generated in Creator (mainwindow.h,cpp,ui_mainwindow.h) to new Netbeans project.
it compiles, links, builds.
when I try to run executable, the window appears but there is also this message:
root#comp:~/NetBeansProjects/QtApplication_3/dist/Debug/GNU-Linux-x86#
./QtApplication_3 Qt at-spi: error getting the accessibility dbus
address: "Not connected to D-Bus server" Accessibility DBus not
found. Falling back to session bus. Could not connect to DBus. Could
not connect to dbus.
(process:10309): GConf-WARNING **: Client failed to connect to the
D-BUS daemon: Did not receive a reply. Possible causes include: the
remote application did not send a reply, the message bus security
policy blocked the reply, the reply timeout expired, or the network
connection was broken.
** (QtApplication_3:10309): WARNING **: Unable to create Ubuntu Menu Proxy: The connection is closed
root#ubuntuamd:~/NetBeansProjects/QtApplication_3/dist/Debug/GNU-Linux-x86#
how is this related to network connection? this is just window.
is my approach OK to copy the code generated in Creator? maybe then I have to do something additionally?

here I have found some tips regarding these errors

Related

QtNetworkAccessManager doesn't work after network restart and issues QNetworkReply:UnknownNetworkError

I am a beginner in QT. I have a custom application which sends and receives information from my http server. When the network services are restarted, the Qt application doesn't connect with the server and issues network error as below. Also, after restart the issue gets resolved.
Here is my error log:
Network error QNetworkReply::UnknownNetworkError received
requestFinished, code: 500 url: "xxxx/xxxx/xxxx" (unknown:0) -
QIODevice::read (QDisabledNetworkReply): device not open
I have searched in forums but I couldn't get a solution to the same.

Iot Board Disconnects from MQTT protocol after first attempt

I am currently using the AT&T IoT Starter kit, equipped with FRDM-K64F development board w/ cellular shield attached. I am using this kit to subscribe to a MQTT protocol via AWS and I am running into some issues. I successfully connect the first time, but then after a few seconds the connection is lost and when it reconnects it will either reconnect successfully or give me the following error (see link below)
Error1
After it attempts to reconnect a few times the following error shows up, which I think means there is no more RAM on the board and as a result there is no input.(see link below)
Error2
Can someone please help me figure why it cannot maintain a connection? It says tls handshake error, could it be a issue with the certificates? I'm at a loss.
EDIT: Looks like the pictures don't work so here are the errors
1.Error: failed
!mbedtls_ssl_handshake returned 0x1.
The other two errors it gives after attempting connection a few times is
2.Error: failed
!mbedtls_ssl_setup returned 0x7f00
and
3.Error: failed
!mbedtls_ssl_write returned 0x7100

Re-connecting to QDBus server after server has been restarted (Qt C++)

I'm testing out using DBus for inter process communication for an QT C++ project (Linux).
I'm not using the bus daemon and i'm using unix paths / sockets.
After navigating my way through the mysterious world that is QT DBUS all seemed to be going well, until i wanted to test the robustness of one of my interfaces.
After killing the server process en restarting it, the connection times out.. i cleanup the connection objects (client-side) and i try to re-connect to the server.
The client does not seem to be able to reconnect and i get the following errors:
errName: org.freedesktop.DBus.Error.NoServer
errMesage: Failed to connect to socket /tmp/abcd: Connection refused
Ive tried:
- QDBusConnection::disconnectFromPeer(addr);
- cleaning up all related object, so no references to the connection exist.
When i restart the client, it has no problems connecting to the (restarted) server.
Problem found!
Seems to be a bug in Qt 4.8.x:
https://bugreports.qt.io/browse/QTBUG-27973
https://codereview.qt-project.org/#/c/60709/
QDBusConnection::disconnectFromBus and QDBusConnection::disconnectFromPeer does not remove invalid connection

Quickfix Socket Error: Connection reset by peer c++

I'm getting a "Socket Error: Connection reset by peer" message using the tradeclient c++ demo code from the quickfix download.
another user commented that it was related to network issues. if anyone has the solution it would be appreciated.
QuickFix C++ Socket Error Connection Reset By Peer?
<20141221-17:32:11.049, FIX.4.4:myusername->hostusername, event>
(Created session)
<20141221-17:32:11.056, FIX.4.4:myusername-> hostusername, event>
(Connecting to fix.hostusername.com on port 5001)
<20141221-17:32:11.221, FIX.4.4:myusername-> hostusername, outgoing>
(8=FIX.4.49=10735=A34=149=myusername =20141221-17:32:11.21856= hostusername 98=0108=30141=Y10=000)
<20141221-17:32:11.221, FIX.4.4:myusername-> hostusername, event>
(Initiated logon request)
<20141221-17:32:11.253, FIX.4.4:myusername-> hostusername, event>
(Socket Error: Connection reset by peer.)
<20141221-17:32:11.253, FIX.4.4:myusername-> hostusername, event>
(Disconnecting)
think i found the reason. the host I'm trying to connect with is using quickfix java which supports SSL. the quickfix c++ client doesn't seem to support the SSL enable tag in the session settings. finally had to resort to wireshark to determine this. i searched all over the web and many people were reporting this similar error. i hope this post saves them any anyone in the future from debugging endlessly to solve this "Socket Error: Connection reset by peer" error.
Two reasons I am aware of for "Socket Error: Connection reset by peer" are:-
1) Your SenderCompId/TargetCompId does not match with that of other side. In that case just make sure you are using correct one.
2) Other one is that sequence number expected by server is something different what you are sending. In that case just try with ResetOnLogon field ( in your registry file )to No and check if that resolves the issue.
There can be many reasons for this error. However, I doubt it that network is responsible for this error as connection request has been sent to server properly. You could search through the internet for wider range of answers.
Could well be firewall, have you the right IP and port, and permission to get there?
think i found the reason. the host I'm trying to connect with is using quickfix java which supports SSL. the quickfix c++ client doesn't seem to support the SSL enable tag in the session settings. finally had to resort to wireshark to determine this. i searched all over the web and many people were reporting this similar error. i hope this post saves them any anyone in the future from debugging endlessly to solve this "Socket Error: Connection reset by peer" error. – geiger zaehler
We got this error message when we had not correctly imported the security certificate.

What happens when a C++ thrift (NonBlocking) server loses a connection?

I am failing to find any examples of thrift exception/error handling. How can I programatically catch the scenario where a server loses a connection to it's assigned port, and either log or restart the server, as desired by my application?