Sending message via AMQP using qpid-proton-c fails with error SSL Failure: Unknown error - linux

I am trying to get the sender example from the azure-service-bus-sample working on Linux based system (https://github.com/genieplus/azure-service-bus-samples/blob/master/proton-c-queues-and-topics/sender.c). However, when I try to execute it, it always fails with the following traces:
Sending messages to amqps://testRule:***#MY_DOMAIN/ServiceBusDefaultNamespace/q1
CALL pn_messenger_set_outgoing_window... RETURNED 0
CALL pn_messenger_set_blocking... RETURNED 0
CALL pn_messenger_start... RETURNED 0
CALL pn_messenger_put... RETURNED 0
CALL pn_messenger_send... recv: Connection reset by peer
[0x1449a80]:ERROR amqp:connection:framing-error SSL Failure: Unknown error.
CONNECTION ERROR connection aborted (remote)
RETURNED 0
I tried to add the auto generated certificate as a trusted certificate via
pn_messenger_set_trusted_certificates (messenger, "/ca/trusted/);
I got a different error message:
Sent BytesMessage with id
c99a2261-843e-4ebf-846c8fe799e8fc0b
Message status PN_STATUS_ABORTED
Final send status is: failed, never sent on network
CALL pn_messenger_settle... RETURNED 0
CALL pn_messenger_put... RETURNED 0
CALL pn_messenger_send... [0x18aaad0]:ERROR amqp:connection:framing-error SSL Failure: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
RETURNED 0
Any idea how to fix this?

You have to download the server certificate and copy to the path mentioned in the code. In linux you have to run c_rehash command to create hashing.
Ref link: https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_load_verify_locations.html

Related

Invalid munge credential when creating SLURM multi-cluster setup

I am building a SLURM multi-cluster setup, with a slurmdbd hosted on-premises and a slurmctld node in Oracle Cloud. The slurmctld is able to connect to the slurmdbd, but receives this error message when I try to connect to the database in any way:
sacct: error: slurm_persist_conn_open: Something happened with the receiving/processing of the persistent connection init message to <IP_ADDRESS>: Failed to unpack SLURM_PERSIST_INIT message
sacct: error: slurmdbd: Sending PersistInit msg: No error
JobID JobName Partition Account AllocCPUS State ExitCode
------------ ---------- ---------- ---------- ---------- ---------- --------
sacct: error: slurm_persist_conn_open: Something happened with the receiving/processing of the persistent connection init message to <IP_ADDRESS>: Failed to unpack SLURM_PERSIST_INIT message
sacct: error: slurmdbd: Sending PersistInit msg: No error
sacct: error: slurmdbd: DBD_GET_JOBS_COND failure: Unspecified error
Looking at the /var/log/slurm/slurmdbd.log file on my slurmdbd cluster, it records this error:
[2022-03-11T08:29:47.541] error: Munge decode failed: Invalid credential
[2022-03-11T08:29:47.541] auth/munge: _print_cred: ENCODED: Wed Dec 31 19:00:00 1969
[2022-03-11T08:29:47.541] auth/munge: _print_cred: DECODED: Wed Dec 31 19:00:00 1969
[2022-03-11T08:29:47.541] error: slurm_unpack_received_msg: auth_g_verify: REQUEST_PERSIST_INIT has authentication error: Unspecified error
[2022-03-11T08:29:47.541] error: slurm_unpack_received_msg: Protocol authentication error
[2022-03-11T08:29:47.551] error: CONN:10 Failed to unpack SLURM_PERSIST_INIT message
To ensure that my credentials are valid, I have copied the slurmdbd's MUNGE key to the slurmctld via SCP, ensured that the UID and GID of the slurm and munge users on all nodes are identical, and made sure that the clocks are all in sync. When I munge and unmunge on either server, it successfully decodes the encrypted message. However, when I try to authenticate the credential from one server to the other using the echo foo | ssh user#server munge | unmunge command, it gives me a response of unmunge: error: invalid credential. What could I be doing to still receive this response? What should I do to make sure that my credential is valid?

RobotFramework (python 3): AppiumLibrary : Open application > InsecureRequestWarning

I'm trying (successfuly) to connect to a remote server where my device is connected.
But, despite my effort and researchs, I always have InsecureRequestWarning warning showing up...
The code :
*** Settings ***
Library AppiumLibrary
*** Test Cases ***
First run wizard - Connect to Remote
[Setup] Install and open app
[Teardown] Close all applications
Log Hello World WARN
Sleep 10
*** Keywords ***
Install and open app
open application ${Grid} &{MyDevice} &{UserCredential} &{Android_app}
*** Variables ***
${Grid} http://xxx/appium
&{Huawei_P20_Pro} uuid=xxx relaxed-security=True
&{UserCredential} Username=xx ApiKey=xxxx
&{Android_app} appPackage=xxx appActivity=xxx appWaitActivity=xxx
The output :
First run wizard - Connect to Remote
C:\Users\xxx\AppData\Local\Programs\Python37-32\Lib\site-packages\urllib3\connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
[ WARN ] Hello World
C:\Users\xxx\AppData\Local\Programs\Python37-32\Lib\site-packages\urllib3\connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
| PASS |
------------------------------------------------------------------------------
InsecureRequestWarning)
test :: Android template to connect to Remote | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Output: C:\Projects\RF\test\output.xml
Log: C:\Projects\RF\test\log.html
Report: C:\Projects\RF\test\report.html
Process finished with exit code 0
I've tried to put the capability relaxed-security it didn't work.
I've found some similar case with Create Session Keyword and the parameter verify=True, but it doesn't work on Open Application either.
Currently, I'm about to modify the source code of the urllib3 library to prevent this anoying warning, but this is not a proper solution.
Thus I was wondering if someone could have a clue arround here !
(using http or https makes no difference in the output)
[Partial answere here Suppress InsecureRequestWarning: Unverified HTTPS request is being made in Python2.6 :
It's just a workaround, it shows how to disable the warning, not how to prevent it (== make the things right) such as enable the certificate verification]

Parse Server + Express - Issues with ParseError and site dying/restarting

I have deployed a Bitnami Parse stack to a Google Cloud VM. This stack is basically Apache running as a proxy, Then a MEAN stack handling parse server and dashboard etc.
Everything appears to be working fine when accessing the dashboard and sending individual CURL requests to test it's all available.
However, there appears to be a fatal flaw in that. When Parse returns one of it's errors e.g.
{"code":101,"error":"Object not found."}
Express sees it as an uncaught exception and dies. Now I realise that it's intentional behaviour (There's enough information out there as to why you don't want to persist after an uncaught exception)
The Bitnami stack uses Forever to run the Parse Server, but as you can see from the logs I will include below, you still run into issues with refused connections.
2016-11-25T11:41:16+00:00 DEBUG (7): {"code":101,"error":"Object not found."}
2016-11-25T11:41:16+00:00 DEBUG (7): Failed to connect to X.X.X.X: Connection refused
2016-11-25T11:41:17+00:00 DEBUG (7): Failed to connect to X.X.X.X: Connection refused
2016-11-25T11:41:17+00:00 DEBUG (7): Failed to connect to X.X.X.X: Connection refused
2016-11-25T11:41:17+00:00 DEBUG (7): Failed to connect to X.X.X.X: Connection refused
Meanwhile in the Forever logs:
Error generating response. ParseError { code: 101, message: 'Object not found.' } code=101, message=Object not found.
[object Object]
/opt/bitnami/apps/parse/htdocs/node_modules/parse-server/lib/ParseServer.js:425
throw err;
^
Error: EACCES: permission denied, open '/opt/bitnami/apps/parse/htdocs/logs/parse-server.info.2016-11-25'
at Error (native)
error: Forever detected script exited with code: 7
error: Script restart attempt #1
parse-server running on port 1337
parse-dashboard running on port 4040
So you can see that immediately following a Parse error being returned, The service is unavailable until Forever can restart the Parse Server.
This issue appears that it would affect all users as well, so if one user receives an exception, all users lose connection for a brief period.
So the question is, how should this be properly handled? Is Parse + Express not the way to go about it? Or is there some method of configuring Node or Express to return the API error to the requester, without Express dying (And without having to fall into the trap of using uncaughtException to keep Node alive)
Any help would be much appreciated, thank you
The logs from Forever said it's EACCES error, that means ParseServer couldn't access the log file and not able to write the info log in it.
Error: EACCES: permission denied, open '/opt/bitnami/apps/parse/htdocs/logs/parse-server.info.2016-11-25'
at Error (native)
error: Forever detected script exited with code: 7
error: Script restart attempt #1
parse-server running on port 1337
parse-dashboard running on port 4040
I think you have to change the /opt/bitnami/apps/parse/htdocs/logs with proper permission so that ParseServer can write log files in it.

Application not responding when CefSharp.BrowserSubprocess.exe crashes

I've developed an application using cefSharp, application is working very fine.
But when any unhandled exception occurred in application at that time CefSharp.BrowserSubprocess.exe crashes and application throws message that application is not responding.
I've used below code for checking (throws unhandled exception)
private void OnBrowserStatusMessage(object sender, StatusMessageEventArgs args)
{
this.InvokeOnUiThreadIfRequired(() => lblStatus.Text = args.Value);
//Used below code to throw error for checking
throw new InvalidOperationException("Invalid operation.");
}
When below code throws error application got hanged and throws message that application is not responding.
Can any one tell me how can i handle this issue.
I'm using Chromium: 47.0.2526.80.
Here is a sample of my debug.log from my release folder, edited to remove too many duplicates:
[0317/175414:WARNING:quota_manager.cc(193)] Create directory failed for path
[0317/181858:ERROR:ipc_channel_win.cc(207)] pipe error: 109
[0317/182108:WARNING:quota_manager.cc(193)] Create directory failed for path
Edit debug.log
[0317/175414:WARNING:quota_manager.cc(193)] Create directory failed for path
[0317/181858:ERROR:ipc_channel_win.cc(207)] pipe error: 109
[0317/192448:ERROR:ipc_channel_win.cc(502)] pipe error: 232
[0317/193320:ERROR:ipc_channel_win.cc(207)] pipe error: 109
[0319/142421:WARNING:content_browser_client.cc(622)] No browser info matching frame process id 13 and routing id 1
[0319/183359:ERROR:audio_output_device.cc(427)] IO loop going away before the audio device has been stopped
[0319/184355:ERROR:ssl_client_socket_openssl.cc(1056)] handshake failed; returned -1, SSL error code 1, net_error -100
[0319/192106:ERROR:ssl_client_socket_openssl.cc(1056)] handshake failed; returned -1, SSL error code 1, net_error -100
[0319/200702:ERROR:gles2_cmd_decoder.cc(13099)] [.RenderWorker-00328548]GL ERROR :GL_INVALID_VALUE : glCopySubTextureCHROMIUM: source texture has no level 0

STEAMCMD: Assertion Failed: Failed to write app state file

I'm setting up a gmod server on Linux but I get an error saying it failed to write app state. I read somewhere it was something to do with permission but I'm not sure how to fix it. What is causing this error and how can it be fixed?
Steam>force_install_dir /home/steam/gmod
Steam>app_update 4020
/home/buildbot/buildslave/steam_rel_client_linux/build/src/clientdll/applicationmanager.cpp (937) : Assertion Failed: Failed to write app state file /home/steam/gmod/b880344e252db2ff689623b22f39bb22fdbd1e01/appmanifest_4020.acf
/home/buildbot/buildslave/steam_rel_client_linux/build/src/clientdll/applicationmanager.cpp (937) : Assertion Failed: Failed to write app state file /home/steam/gmod/b880344e252db2ff689623b22f39bb22fdbd1e01/appmanifest_4020.acf
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Error! App '4020' state is 0x1 after update job.
I've resolved with root account. Launched steamcmd with root and then updated the app. No errors occurred. I hope could help someone.

Resources