Kurento Media Server crashes on start when using certs - ssl

I'm using kurento media server 6.6.1 on a Ubuntu 10.4 box in AWS. It runs fine normally, and I'm attempting to use wss, so I uncomment the security lines in /etc/kurento/kurento.conf.json so the file looks like:
{
"mediaServer" : {
"resources": {
// //Resources usage limit for raising an exception when an object creation is attempted
// "exceptionLimit": "0.8",
// // Resources usage limit for restarting the server when no objects are alive
// "killLimit": "0.7",
// Garbage collector period in seconds
"garbageCollectorPeriod": 240
},
"net" : {
"websocket": {
"port": 8888,
"secure": {
"port": 8433,
"certificate": "/etc/letsencrypt/archive/<MYDOMAIN>/fullchain1.pem",
"password": ""
},
//"registrar": {
// "address": "ws://localhost:9090",
// "localAddress": "localhost"
//},
"path": "kurento",
"threads": 10
}
}
}
}
I've also verified that my certs are in the correct location and are valid.
When I restart the service, I get the following output in my /var/log/kurento-media-server/media-server_error.log file, and the service doesn't start (or give any other logs).
kurento-media-server: /usr/include/boost/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = boost::log::v2_mt_posix::core; typename boost::detail::sp_member_access<T>::type = boost::log::v2_mt_posix::core*]: Assertion `px != 0' failed.
Aborted (thread 140077491206272, pid 7622)
Stack trace:
[gsignal]
/lib/x86_64-linux-gnu/libc.so.6:0x35428
[abort]
/lib/x86_64-linux-gnu/libc.so.6:0x3702A
[uselocale]
/lib/x86_64-linux-gnu/libc.so.6:0x2DBD7
[__assert_fail]
/lib/x86_64-linux-gnu/libc.so.6:0x2DC82
0x4CC67A at /usr/bin/kurento-media-server
[kurento::kms_init_logging(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)]
/usr/bin/kurento-media-server:0x4EF234
[gst_debug_log_valist]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.5.so.0:0x62EE6
[gst_debug_log]
/usr/lib/x86_64-linux-gnu/libgstreamer-1.5.so.0:0x6303B
[kurento::MediaSet::~MediaSet()]
/usr/lib/x86_64-linux-gnu/libkmscoreimpl.so.6:0xA809B
[std::_Sp_counted_ptr<kurento::MediaSet*, (__gnu_cxx::_Lock_policy)2>::_M_dispose()]
/usr/lib/x86_64-linux-gnu/libkmscoreimpl.so.6:0xB06D2
[std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release()]
/usr/lib/x86_64-linux-gnu/libkmscoreimpl.so.6:0xA3916
[__cxa_finalize]
/lib/x86_64-linux-gnu/libc.so.6:0x3A36A
0xA2B53 at /usr/lib/x86_64-linux-gnu/libkmscoreimpl.so.6

Related

iotedge: How to requeue message that could not be processed

There are publisher and consumer custom modules that are running on an Edge IoT device. The publisher module keeps producing messages at constant rate no matter consumer module processes it or not. The consumer module POSTs the message to external service and given that there is no Internet connection, the consumer module would like to requeue the messsage so that is not lost and tried again.
I do not prefer to write an infinite loop to keep retrying; also if the module is restarted the message would be lost. So i prefer to requeue the message to edgeHub/RocksDB.
Where do I find documentation on available responses that can be provided for IoTHubMessageDispositionResult? what is the response to be sent if message needs to be requeued?
if message.processed():
return IoTHubMessageDispositionResult.ACCEPTED
else:
return IoTHubMessageDispositionResult.??
You don't have to implement your own requeuing of messages. IotEdge provides offline functionality as described in this blog post and on this documentation page.
The edgeHub will locally store messages on the edgeDevice if there is no connection to the IotHub. It will automatically start sending those messages (in the correct order) once the connection is established again.
You can configure how long edgeHub will buffer messages like this:
"$edgeHub": {
"properties.desired": {
"schemaVersion": "1.0",
"routes": {},
"storeAndForwardConfiguration": {
"timeToLiveSecs": 7200
}
}
}
The 7200 seconds (2 hours) is also the default if you don't configure anything.
By default, the messages will be written to a folder within the edgeHub docker container. If you want to store them somewhere else you can do so with this configuration:
"edgeHub": {
"type": "docker",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-hub:1.0",
"createOptions": {
"HostConfig": {
"Binds": ["<HostStoragePath>:<ModuleStoragePath>"],
"PortBindings": {
"8883/tcp": [{"HostPort":"8883"}],
"443/tcp": [{"HostPort":"443"}],
"5671/tcp": [{"HostPort":"5671"}]
}
}
}
},
"env": {
"storageFolder": {
"value": "<ModuleStoragePath>"
}
},
"status": "running",
"restartPolicy": "always"
}
Replace HostStoragePath and ModuleStoragePath with the wanted values. Example:
"createOptions": {
"HostConfig": {
"Binds": [
"/etc/iotedge/storage/:/iotedge/storage/"
],
...
}
}
},
"env": {
"storageFolder": {
"value": "/iotedge/storage/"
},
...
Please note that you probably have to manually give the iotEdge user (or all users) access to that folder (using chmod).
Update:
If you are just looking for the available values of IoTHubMessageDispositionResult you will find the answer here:
class IoTHubMessageDispositionResult(Enum):
ACCEPTED = 0
REJECTED = 1
ABANDONED = 2
Update 2:
Messages that have been ACCEPTED are removed from the message queue because they have been successfully delivered.
Messages that are ABANDONED are added to the message queue again and the module will try to send it again as defined in the retryPolicy. For more insight on the retryPolicy you can read this thread.
Messages that are REJECTED are not added to the message queue again.

How to create a private bitcoin network using bitcore?

I'm trying to create a private bitcoin network using bitcore. But bitcore sync's data either with bitcoin livenet or testnet. I couldn;t find any bitcore documentation which will allow me to create a network from scratch.
I followed the instruction from below link
https://bitcore.io/guides/full-node
{
"network": "livenet" or "testnet" || what do i have to put for private network?
"port": 3001,
"https": true
}
I think you need to add your custom info in the bitcore-node.json which is created in your node directory
{
"network": "livenet", // your coins network name
"port": 3001, // your coins port
"services": [
"bitcoind", // required services
"web"
],
"servicesConfig": {
"bitcoind": {
"datadir": "/home/user/.bitcoin", //your coins directory
"exec": "/home/user/bitcoin/src/bitcoind" //your coins executable
}
}
}
So changing
"network": "livenet"
to whatever yours is called should do the job. Now you should be able to run your custom node with a different network.

SoftLayer API Hardware : Fast Provision of BM Server PresetConfiguration OS

Using the Fast Provision of BM Server REST API :
http://sldn.softlayer.com/blog/bpotter/ordering-bare-metal-servers-using-softlayer-api
SoftLayer_Hardware/getCreateObjectOptions : In the response we will get fixed preset configuration,datacenter,operating system details,etc.,
When I provision using OS Reference code ESXI_5.1_64, I am getting the below mentioned error. In the request I have not mentioned networkComponents details and if i add "networkComponents": [{ "maxSpeed": 100 }], details then also i am getting the below mentioned error message.
{
"error": "VMware ESXi 5.5 cannot be ordered with 100 Mbps Public & Private Network Uplinks"
"code": "SoftLayer_Exception_Public"
}
Also if i use some of the operating system reference codes i am getting the below mentioned error.
{
"error": "Unable to match an OS with reference code: XENSERVER_6.0_64"
"code": "SoftLayer_Exception_NotFound"
}
"operatingSystemReferenceCode": "XENSERVER_6.0_64" "operatingSystemReferenceCode": "REDHAT_6_64"
1. The exception:
{ "error": "VMware ESXi 5.5 cannot be ordered with 100 Mbps Public &
Private Network Uplinks" "code": "SoftLayer_Exception_Public" }
Reason: The VMware OSes cannot be ordered with "100 Mbps Public & Private Network Uplinks" (e.g. "networkComponents": [{ "maxSpeed": 100 }]). VMware OSes must be ordered at least with "1 Gbps Public & Private Network Uplinks". (e.g. "networkComponents": [{ "maxSpeed": 1000}]).
2. The exception:
{ "error": "Unable to match an OS with reference code:
XENSERVER_6.0_64" "code": "SoftLayer_Exception_NotFound" }
Probably you are trying to order a hourly server ("hourlyBillingFlag": true), this can be the reason of the exception, because this OS is only available for Monthly billing fee.
Note: If this is not the reason ("hourlyBillingFlag": true), you can attach the code that you are trying, in order to identify the issue and provide more feedback about it.
How identify the type of billing for the items?
Using SoftLayer_Hardware::getCreateObjectOptions method, you will get a response like this:
38: {
"itemPrice": {
"hourlyRecurringFee": ".024"
"recurringFee": "17"
"item": {
"description": "Windows Server 2012 R2 Standard Edition (64 bit)"
}-
}-
"template": {
"operatingSystemReferenceCode": "WIN_2012-STD-R2_64"
}-
}
"hourlyRecurringFee" means that the item is available per hour and "recurringFee" per month. The "XENSERVER_6.0_64" item is only available for month because it only has "recurringFee" property and not "hourlyRecurringFee"property.
The OS ESXI_5.1_64 is not valid for your configured fixedConfigurationPreset (note based in your comments I assume you are using the S1270_8GB_2X1TBSATA_NORAID you did not copy your code :( ). For that preset the valid OS is ESXI_5.5_64. (VMware ESXi 5.5) So try this code:
{
"parameters": [{
"datacenter": {
"name": "dal01"
},
"hostname": "vijvmware",
"domain": "csc.com",
"hourlyBillingFlag": false,
"fixedConfigurationPreset": {
"keyName": "S1270_8GB_2X1TBSATA_NORAID"
},
"operatingSystemReferenceCode": "ESXI_5.5_64",
"networkComponents": [
{
"maxSpeed": 10
}
]
}]
}
Please keep in mind that the SoftLayer_Hardware::getCreateObjectOptions returns all the options to create bare metal, but not all the convinations of options will work, that´s up to you to create the correct configuration for that you may see the UI (Softlayer´s Portal).

WL.Logger.Send() its Not callback the WLClientLogReceiver adapter

I have enabled the nativeOptions: {capture: true} in initOptions.js
logger : {enabled: true, level: 'debug', stringify: true, pretty: false,
tag: {level: false, pkg: true}, whitelist: [], blacklist: [], nativeOptions: {capture: true}}
In my main js file i have the following code.
function wlCommonInit(){
// Common initialization code goes here
WL.Logger.setNativeOptions({'capture': true});
var logger = WL.Logger.create({pkg: 'mypackage'});
logger.debug('Hello world - debug');
//[mypackage] Hello world
logger.log('Hello world - log');
//[mypackage] Hello world
logger.info('Hello world - info');
//[mypackage] Hello world
logger.warn('Hello world - warn');
//[mypackage] Hello world
logger.error('Hello world - error');
//[mypackage] Hello world
WL.Logger.send(); }
WL.Logger.send() suppose to call my adapter "WLClientLogReceiver". But i am not getting any call for this adapter.
Please let me know, i need to enable any other settings to upload my client side captured log to server.
function log(deviceInfo, logMessages) {
return true;}
<procedure name="log" securityTest="wl_unprotected" audit="true" />
logger : {enabled: true, level: 'debug', stringify: true, pretty: false, tag: {level: false, pkg: true}, whitelist: [], blacklist: [], nativeOptions: {capture: true}}
You have enabled the native capture as true in initOptions.js so no need to set it again.
You can log using your package that will help you in filtering the messages based on the package in your WLClientLogReceiver adapter.
var myloggerObject = WL.Logger.create({pkg: 'mypackage'});
myloggerObject.debug("Hello world");
you can specify your level in your js file to be logged in client device.
In the adapter you will get the log messages as an json array.
function log(deviceInfo, logMessages) {
/* The adapter can choose to process the parameters,
for example to forward them to a backend server for
safekeeping and further analysis.
The deviceInfo object may look like this:
{
"appName": "wlapp",
"appVersion": "1.0",
"deviceId": "66eed0c9-ecf7-355f-914a-3cedac70ebcc",
"model": "Galaxy Nexus - 4.2.2 - API 17 - 720x1280",
"systemName": "Android",
"systemVersion": "4.2.2",
"os.arch": "i686", // Android only
"os.version": "3.4.0-qemu+" // Android only
}
The logMessages parameter is a JSON array
that contains JSON object elements, and might look like this:
[{
"timestamp" : "17-02-2013 13:54:23:745", // "dd-MM-yyyy hh:mm:ss:S"
"level" : "ERROR", // ERROR||WARN||INFO||LOG|| DEBUG
"package" : "your_tag", // typically a class name
"msg" : "the message", // a helpful log message
"threadid" : 42, // (Android only)the current thread
"metadata" : { "$src" : "js" } // metadata placed on the log call
}]
*/
//sample log and filtering method
var logs= [{
"timestamp" : "17-02-2013 13:54:23:745", // "dd-MM-yyyy hh:mm:ss:S"
"level" : "ERROR", // ERROR||WARN||INFO||LOG|| DEBUG
"package" : "your_tag", // typically a class name
"msg" : "the message", // a helpful log message
"threadid" : 42, // (Android only)the current thread
"metadata" : { "$src" : "js" } // metadata placed on the log call
},
{
"timestamp" : "17-02-2013 13:54:23:745", // "dd-MM-yyyy hh:mm:ss:S"
"level" : "ERROR", // ERROR||WARN||INFO||LOG|| DEBUG
"package" : "mypackage", // typically a class name
"msg" : "my package message", // a helpful log message
"threadid" : 42, // (Android only)the current thread
"metadata" : { "$src" : "js" } // metadata placed on the log call
}
];
var filteredLogs = logs.filter(function(log){
if(log.package == mypackage) //comparing the package and returns the object
{ return log; }
});
WL.Logger.error(filteredLogs);// This is send only the filtered array to your server
}
If you log using metadata such as filename along with the debug message you will get those in the array in metadata attribute.
It is suggested to stringify and parse the object to avoid errors before parsing the device logs in the adapter.
var logs = JSON.stringify(JSON.parse(logs));
var filteredLogs = logs.filter ...
Hope this will work for you.
Make sure you test it using the device.
The send function is not attached to the LogInstance prototype, which is what you're using when you use a logger instance created with WL.Logger.create(). Please call
WL.Logger.send();
instead.
(Above was posted prior to OP's edit.)
Since setNativeOptions is an asynchronous call (it calls down through a Cordova plugin), it is possible it has not successfully turned capture on prior to completion of the subsequent logger calls. So at the time of the call to WL.Logger.send(); nothing has been collected yet.
Do this:
function wlCommonInit() {
// Common initialization code goes here
WL.Logger.setNativeOptions({'capture': true})
.then(function() {
var logger = WL.Logger.create({pkg: 'mypackage'});
logger.debug('Hello world - debug');
//[mypackage] Hello world
logger.log('Hello world - log');
//[mypackage] Hello world
logger.info('Hello world - info');
//[mypackage] Hello world
logger.warn('Hello world - warn');
//[mypackage] Hello world
logger.error('Hello world - error');
//[mypackage] Hello world
WL.Logger.send();
});
}
Be sure to check the server-side logs. The audit="true" in the adapter's descriptor file will print the parameters passed to the adapter inline in the server logs (messages.log on WebSphere Liberty).

Error while installing the corona sdk plugin

This is what i a getting on my Corona Simulator Output when i try to install the 'playhaven' plugin. I don't know how to get rid of this.
Build: 2013.1202 Runtime error ?:0: attempt to call field 'request' (a nil value) stack traceback:
[C]: in function 'request'
?: in function 'downloadManifest'
?: in function 'downloadQueuedManifests'
?: in function <?:632>
?: in main chunkRuntime error
stack traceback:
[C]: in function 'request'
?: in function 'downloadManifest'
?: in function 'downloadQueuedManifests'
?: in function <?:632>
?: in main chunk
In case you wanna take a look at my build.settings file because after i integrated the plugins into the build.settings file. I recieved the error i showed above.
settings =
{
orientation =
{
default = "portrait",
supported = { "portrait" },
},
androidPermissions =
{
"android.permission.ACCESS_COARSE_LOCATION",
"android.permission.ACCESS_FINE_LOCATION",
"android.permission.INTERNET",
"android.permission.READ_PHONE_STATE",
"android.permission.ACCESS_NETWORK_STATE",
},
plugins =
{
-- key is the name passed to Lua's 'require()'
["plugin.playhaven"] =
{
-- required
publisherId = "com.playhaven",
},
},
iphone =
{
plist =
{
UIPrerenderedIcon = true,
UIApplicationExitsOnSuspend = false,
CFBundleIconFile = "Icon.png",
CFBundleIconFiles = {
"Icon.png",
"Icon#2x.png",
},
},
},
}
Playhaven is only available to Pro and Enterprise subscribers. See:
http://docs.coronalabs.com/daily/plugin/playhaven/
Are you a Pro or a Starter?
Since you gave so few information on your system and environment I can only guess. It seems that the installer tried to download something (or connect via some protocol) and failed. Did you check your firewall/proxy settings? Maybe connections are automatically refused and you are not aware of it.