Event Hub azure- sample in C - Receiver not working- Shows timeout - c

I am beginner to azure event hub. I have tried the sample , C sample from github.
I have successfully sent the messages, But receiveing it shows the error.
root#ala:~# ~/cmake/eventhub_client/samples/receive/receive
Info: Event Hubs Client SDK for C, version 0.10.0
Error: Time:Wed Apr 11 16:06:22 2018 File:/home/ala/azure-event-hubs/c/eventhub_client/src/eventhubreceiver_ll.c Func:HandleSASTokenAuth Line:277 EventHubAuthCBS Authentication Status Timed Out.
Error: Time:Wed Apr 11 16:06:22 2018 File:/home/ala/azure-event-hubs/c/eventhub_client/src/eventhubreceiver_ll.c Func:EventHubReceiver_LL_DoWork Line:1831 Authorization Timeout Observed
-> [CLOSE]* {}
ERROR: Unexpected Error Callback Triggered! 6
I have added the sharedaccesskey with event hub and also RootManageSharedAccessKey in event hub namespace. but both have same issue .
Please any one help me out from this. Thanks in advance

Related

Protocol error when executing cpp-driver datastax

I am currently workinig on datastax cpp-driver in C and was working around some examples when I came across a very trivial problem. While trying to execute the Basic Authentication Script here, I found this error showing up and the code execution getting stuck.
The Error:
1587040775.210 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.3 because of the following error: Underlying connection error: Connect error 'connection refused'
1587040775.210 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.2 because of the following error: Underlying connection error: Connect error 'connection refused'
1587040775.211 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.1 because of the following error: Underlying connection error: Received error response 'Invalid or unsupported protocol version (66); supported versions are (3/v3, 4/v4, 5/v5-beta)' (0x0200000A)
1587040775.211 [WARN] (cluster_connector.cpp:289:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Host 127.0.0.1 does not support protocol version DSEv2. Trying protocol version DSEv1...
1587040775.212 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.1 because of the following error: Underlying connection error: Received error response 'Invalid or unsupported protocol version (65); supported versions are (3/v3, 4/v4, 5/v5-beta)' (0x0200000A)
1587040775.212 [WARN] (cluster_connector.cpp:289:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Host 127.0.0.1 does not support protocol version DSEv1. Trying protocol version v4...
What could be these protocols that are not supported by my machine? Also, after it comes to the last warning, which is trying protocol v4 it gets stuck.
I'm using Casssandra 3.10+, Cpp-driver 2.13.
Anybody with a workaround or a solution would be of much help. Thanks in advance
I've looked around a bunch to find some documentation to back this up but I can't find any, so this part is conjecture. It appears that server version 3 uses protocol V3. It looks like server version 4 (still in beta) will use protocol V4. I suspect V5 is a future iteration that is being planned and still not written in stone yet (and why it's tagged as beta in the warning).
This part isn't conjecture.
If you add this to your code before you connect to the cluster:
cass_cluster_set_protocol_version(cluster, CASS_PROTOCOL_VERSION_V3);
All the warnings about downgrading to different protocols should go away.

Errors and seg fault when using device provisioning service

I am trying to use the device provisioning service from my device to connect to the hub, using the c SDK. I am using individual enrollment and X.509. I created an individual enrollment on the hub using a certificate I generated using the "dice_device_enrollment" tool of the SDK. I also installed the certificate on the device. When I run the code I get (OpenSSL) errors when executing the Prov_Device_LL_DoWork() function. When I call Prov_Device_LL_DoWork() the second time, the program seg faults.
Output:
08:11:25 10-10-2018 [info] Prov_Device_LL_DoWork
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/c-utility/adapters/x509_openssl.c Func:log_ERR_get_error Line:29 Failure creating private key evp_key
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/c-utility/adapters/x509_openssl.c Func:log_ERR_get_error Line:36 [0] error:0906D06C:PEM routines:PEM_read_bio:no start line
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/c-utility/adapters/x509_openssl.c Func:log_ERR_get_error Line:36 [1] error:0906D064:PEM routines:PEM_read_bio:bad base64 decode
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/c-utility/adapters/tlsio_openssl.c Func:log_ERR_get_error Line:428 unable to use x509 authentication
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/c-utility/adapters/tlsio_openssl.c Func:tlsio_openssl_open Line:1251 Failed creating the OpenSSL instance.
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:1000 Error: io_open failed
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/provisioning_client/src/prov_transport_mqtt_common.c Func:create_connection Line:567 Failure connecting to mqtt server
Error: Time:Wed Oct 10 08:11:25 2018 File:/home/tijmen/azure-iot-sdk-c/provisioning_client/src/prov_transport_mqtt_common.c Func:prov_transport_common_mqtt_dowork Line:874 unable to create amqp connection
08:11:25 10-10-2018 [info] Prov_Device_LL_DoWork
Segmentation fault
The same code does work on my dev machine, but using slightly different version of OpenSSL:
On the dev machine OpenSSL 1.0.1t 3 May 2016
On the device OpenSSL 1.0.2d 9 Jul 2015
Are there requirements on the OpenSSL version I missed?
It turns out that upgrading OpenSSL solves this problem.
I built OpenSSL version 1.0.2q from https://github.com/openssl/openssl/tree/OpenSSL_1_0_2-stable and linked it to my app. This solved the error. It seems the SDK, at least X.509 functionality requires an higher version of OpenSSL than 1.0.2d 9 Jul 2015.

Classification Error in Watson Conversation

This morning all of my code that uses Watson Conversation suddenly stopped working. I get this error in the console:
{ Error: Classification Error: Protocol error
at Request._callback (D:\home\site\wwwroot\node_modules\watson-developer-cloud\lib\requestwrapper.js:99:21)
at Request.self.callback (D:\home\site\wwwroot\node_modules\request\request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (D:\home\site\wwwroot\node_modules\request\request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at Gunzip. (D:\home\site\wwwroot\node_modules\request\request.js:1085:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
code: 500,
error: 'Classification Error: Protocol error',
'x-global-transaction-id': '7ecac92c5aa8813805dfb888' }
I did not change any of my code recently. So I assumed it must be a problem with IBM Watson, or am I doing something wrong?
Found it. It seems to be an outage of the Watson Conversation service.
https://console.bluemix.net/status/notification/ae744d684432a9086528e8c9a4c21033
Users of the Watson Conversation service are experiencing elevated error rates when attempting to use the service. The team is aware and is working to resolve.
2018-03-14 0148 UTC: Added United Kingdom and Sydney regions to affected list.
Update: it keeps happening occasionally, I've even written code to retry automatically a few times, but it doesn't help. Seems the Watson service is simply down for a couple of minutes at a time.
Update: happening again on December 10, 2018.

Unable to connect Google Compute Engine instance via SSH in browser

i am new to google cloud,i just deployed my first instance it was working fine till yesterday, i used last time to set email server using this tutorial email server, but now i am unable to connect ssh in browser and also with google cloud sdk in terminal.
Website is running fine,I don't know what happened Please help
the error message in browser
Connection Failed, and we are unable to connect VM on port 22.
the error message in terminal
Warning: Permanently added 'xxx.xxx.xxx.xxx' (ECDSA) to the list of known hosts.
Permission denied (publickey).
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
And serial console output its shows
Jul 8 10:09:26 Instance sshd[10103]: error: Could not load host key:/etc/ssh/ssh_host_ed25519_key
Jul 8 10:09:27 Instance sshd[10103]: User username from 0.0.0.0 not allowed because not listed in AllowUsers
Jul 8 10:09:27 Instance sshd[10103]: input_userauth_request: invalid user username [preauth] Jul 8 10:09:27 Instance sshd[10103]: Connection closed by 0.0.0.0 [preauth] –

java.net.UnknownHostException: appengine.google.com

Got this error. Any idea how to get rid of it?
Yesterday it was working fine but today I got these errors. I saw a known issue with this - link. But I didn't find any solution yet..
Oct 16, 2012 4:01:59 PM com.google.appengine.tools.info.RemoteVersionFactory getVersion
INFO: Unable to access https://appengine.google.com/api/updatecheck?runtime=java&release=1.7.1&timestamp=1345058163&api_versions=['1.0']
java.net.UnknownHostException: appengine.google.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
at java.net.URL.openStream(URL.java:1010)
at com.google.appengine.tools.info.RemoteVersionFactory.getVersion(RemoteVersionFactory.java:76)
at com.google.appengine.tools.info.UpdateCheck.checkForUpdates(UpdateCheck.java:99)
at com.google.appengine.tools.info.UpdateCheck.doNagScreen(UpdateCheck.java:174)
at com.google.appengine.tools.info.UpdateCheck.maybePrintNagScreen(UpdateCheck.java:142)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:289)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:249)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:225)
Oct 16, 2012 4:01:59 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Oct 16, 2012 4:02:00 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed D:\WorkSpace\GAE\GST\war\WEB-INF/appengine-web.xml
Oct 16, 2012 4:02:00 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed D:\WorkSpace\GAE\GST\war\WEB-INF/web.xml
Oct 16, 2012 4:02:02 PM com.google.appengine.tools.development.DevAppServerImpl start
If you are using Java 8 in your app engine application, you will need to include
<url-stream-handler> urlfetch </ url-stream-handler>
in appengine-web.xml.
appengine-web.xml Reference
I am assuming that you are seeing this in your Eclipse IDE when you are trying to run the Eclipse Project as a Web Application.
The GAE plugin simply checks if there is an updated AppEngine SDK available for download. If there is a newer one than the one you are currently using then it lets you know that. The error is because at that instance, there was probably a network error and it got not connect through. It is harmless as far as running your application is concerned.
But if your application is dependent on accessing some external network services, then chances are that they might fail also if the network issue persists in your development environment.
got it working.. : cmd->goto your home directory >mkdir .appcfg_no_nag this will stop checking for the update and yourweb app willrun locally atleast..
This error is related to internet connection. I changed to other connection, it works
You should add in appengine-web.xml:
<url-stream-handler> urlfetch </ url-stream-handler>
And also start using java.net.URLConnection,
Apache HttpClient is not gonna work for example.
https://cloud.google.com/appengine/docs/standard/java/issue-requests#java_8_runtime_vs_java_7_behavior

Resources