I am writing a c++ grpc based service. As recommended here, I installed grpc in my local directpry. I am using linux ubuntu 22.04.
Now, at he begginig of a service call implementation, i have these lines of code:
google::protobuf::Arena arena;
ResponseStatus * response_status =
google::protobuf::Arena::CreateMessage<ResponseStatus>(&arena);
response->set_allocated_status(response_status);
When I invoke the service, from a ruby client, the last line causes an exception with the following error message
[libprotobuf FATAL /home/lrleon/grpc/third_party/protobuf/src/google/protobuf/generated_message_util.cc:764] CHECK failed: (submessage_arena) == (nullptr):
I'll be honest: I do not have an good idea about why this problem could be happening. My best hypothesis is that somewhere a different version of the required grpc/protobuf libraries is intervening. I do not believe it because I am almost sure I am not using any system library related to grpc, but eventually another app could have installed some library.
I spent a full day searching in forums without getting a some related post that could help me solve mine.
That said, I kindly ask if some expert in grpc could help me.
Thanls in advance
Related
I'm trying to run a simple client/server to implement a communication using QSslSocket. I work on Windows (unfortunately) and I use QtCreator for more convenience.
When I try, from the client side, to connect to the server using MyQSslSocket->connectToHostEncrypted(ip, port), I get the following message:
qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
When I print the raised error, I get the following one:
QAbstractSocket::SocketError(20)
In the documentation we can find that this error code corresponds to QAbstractSocket::SslInternalError whose the description is:
"The SSL library being used reported an internal error. This is probably the result of a bad installation or misconfiguration of the library."
After some investigations I found that Qt does not provide OpenSSL by itself so I installed it (the binaries, for both 32 and 64 bits versions to be sure) from here https://slproweb.com/products/Win32OpenSSL.html.
During the installation, the dll was copied to C:\Windows\System32 (for the 64 bits). Then I checked that the PATH environment variable does well contain this folder.
At this point I tried again, but I still had the same problem, as if the OpenSSL installation was still not found.
When I print the output of the following calls (in the main function of my client):
qDebug() << QSslSocket::supportsSsl();
qDebug() << QSslSocket::sslLibraryVersionString();
I get the following outputs:
false""
My question is, how to make QSslSocket::supportsSsl() return true ?
If anyone could teach me what I missed, what I am doing wrong and tell me what I should do to be able to make this SSL connection run properly, I would be very grateful.
Fareanor.
PS: Sorry for the long question but I think it is important to clearly expose the problem and the context to help you to easily understand the problem and give me more relevant answers.
Ok,
Thanks to #AlienPenguin and #Macias advices, it was that my version of OpenSSL was too recent.
Finally I have installed the closest available version of the one used for the Qt build (which does make sense, I should have thought of it) which can be found by running the following call:
qDebug() << QSslSocket::sslLibraryBuildVersionString();
Problem solved.
Thanks again.
I installed odoo 9 under ubuntu server 15.10 with wkhtmltopdf 0.12.2.4.
Everytime I print sales order, it raises error:
Odoo Warning - Warning
Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt, and
will be ignored.The switch --header-html, is not support using
unpatched qt, and will be ignored.The switch --footer-html, is not
support using unpatched qt, and will be ignored.QXcbConnection: Could
not connect to display.
I've tried to solved this bug but still failed, help me please
I can't take credit for this answer, but I was able to solve the issue using the solution provided by Tsounabe here: Stack Overflow Patched QT Topic
The only thing I can add is that I changed the version (0.12.3) in each line to the latest (0.12.4) and was able to use the latest version to accomplish the same thing.
Good luck!
I wanted to work on Intel PCM. I follwed the below link:
https://software.intel.com/en-us/articles/intel-performance-counter-monitor
I downloaded the code, i started to study example pcm.cpp. But Im not getting any proper understanding. Documentation is not that much clear.
http://intel-pcm-api-documentation.github.io/classPCM.html
I tried to run , pcm.x ,it gave basic information then showed some error like:
"Trying to use Linux perf events...
Linux Perf: Error on programming generic event #0 error: Invalid argument
Access to Intel(r) Performance Counter Monitor has denied (Unknown error)."
Unknown error! I cant figure out why its not accessible. I used with sudo also(root privileges).
Any suggestions how I can start working with it? Where to start?
Found a workaround here by Roman Dementiev that worked for me:
As a workaround you can disable perf usage in the PCM Makefile by removing "-DPCM_USE_PERF".
all.
I’d like to ask a question about the error I encounter when I try to use Repast HPC in Xcode 5.1.
(Repast HPC is an agent-based simulation library based on C++. For more information, go to http://repast.sourceforge.net/repast_hpc.html)
For testing, I tried to build and run the Repast HPC Tutorial Demo code from tutorial page(http://repast.sourceforge.net/hpc_tutorial/RepastHPC_Demo_00_Step_05.html).
I succeeded to run Demo00 Step 04, which seems to mean that my preference setting is correct, but failed to run Demo00 Step 05. The major difference between those two is “RepastProcess.h” is included in Step 05.
The error occurs in 50th line of “logger.h” file, which is included "RepastProcess.h". The line of error is,
typedef enum _LogLevel {DEBUG, INFO, WARN, ERROR, FATAL} LOG_LEVEL;
The error is 'parse issue error' and the message says "Expected '}'" and the location of error seems to be 'DEBUG' because there is a tiny triangle under the word.
I googled a lot, but I couldn’t find any issue in the code.
Does anybody face similar error? Is it the problem of Xcode setting?
Many thanks in advance.
I have a C++ client that connects to servers using libcurl on FreeBSD. The system administrators recently update the FreeBSD image and install ports. The system went from cURL version 7.24.0_2 to cURL version 7.31.0. (File name went from libcurl.so.6 to lib curl.so.7 for what that's worth.)
I recompiled my program to link against the new library.
Now I am getting return value 3 (CURLE_URL_MALFORMAT) from my call to curl_easy_perform(3), and the error message string returned is " malformed".
However, nothing else has changed. The URL is unchanged, and has been verified as correct.
Stranger still, the command line "curl" program works fine; isn't it using the same library?!
I've spent a couple hours reading the release notes for libcurl but couldn't spot anything that suggested a reason as to why this should now fail.
Any suggestions?
Turns out the sysadmins built cURL wrong. A new install and it works.