İngilizcem için özür dileriz.Azure Mobile Services İşlenmeyen bir özel durum oluştu. Hata: Komut dosyalarınızdan biri hizmetin yanıt vermemesine neden oldu.
IoT hub kullanarak AMQP iletilerini cihaza göndermesi gereken bir node js betiğim var. Bu senaryoyu masmavi gripten aldım. İşte bu örnek. Yerel olarak çalışıyor ve benim cihaz emülatörü üzerindeki mesajları görmek
console.log("creating the client");
var Client = require('azure-iothub').Client;
console.log("client has been created");
var Message = require('azure-iot-common').Message;
console.log("message has been created");
var connectionString = "HostName=id**.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=***;
console.log(connectionString);
var targetDevice = 'devicesergey';
var client = Client.fromConnectionString(connectionString);
client.open(function (err) {
if (err) {
console.error('Could not connect: ' + err.message);
}
else {
console.log('Client connected');
var data = JSON.stringify({ text : 'foo' });
var message = new Message(data);
console.log("json message is created")
console.log('Sending message: ' + message.getData());
client.send(targetDevice, message, printResultFor('send'));
console.log("message has been sent");
}
});
function printResultFor(op) {
return function printResult(err, res) {
if (err) {
console.log(op + ' error: ' + err.toString());
} else {
console.log(op + ' status: ' + res.constructor.name);
}
};
}
: Burada
bu birine dayalı benim senaryom vardır.An unhandled exception occurred. Error: One of your scripts caused the service to become unresponsive and the service was restarted. This is commonly caused by a script executing an infinite loop or a long, blocking operation. The service was restarted after the script continuously executed for longer than 5000 milliseconds. at process.Server._registerUncaughtExceptionListenerAndCreateHttpServer._onUncaughtException (D:\home\site\wwwroot\node_modules\azure-mobile-services\runtime\server.js:218:17) at process.EventEmitter.emit (events.js:126:20)
Ve bazen bu IIS error kesinlikle biliyorum bu çizgi bu işlevi gerçekleşir görüyoruz: Ben Azure Mobile Services API koymak için denemek ve çalıştırmayı denediğinizde Ama günlükleri bu mesajı görmeniz müşteri .open (function .... Sadece client.open() 'i terk etmeyi ve bu işlevden bir mesaj göndermeyi denedim. Fakat bu durumda "client bağlı değil" görüyorum.
Github hakkında bu şey hakkında Bana burada sormamı tavsiye ettiler.Birisi bu sorunu nasıl çözeceğini biliyordur (script veya Azure ile) Çok çok iyi olurdum!
Teşekkür ederiz!
Teşekkür ederiz! Ancak Azure MS'mde tamamen ayarlarım var. İspatlar: http://prntscr.com/alx0jf http://prntscr.com/alx0vd – Sergey
@Sergey Sorun değil. Başka bir endişe var mı? –
Elbette) Bu sorunu atmaya hala devam edemiyorum – Sergey