When I try to enable Iaas Azure Diagnostics on my VM, I encounter the following errors. I was able to track down the local log files and found these entries.
How do you repair the Azure Diagnostics extension, without recycling the VM?
"C:\Packages\Plugins\Microsoft.Azure.Diagnostics.IaaSDiagnostics\1.3.1.6\Logs\DiagnosticsPluginLauncher.log"
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:05:43 AM] No DiagnosticsPlugin is running.
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:05:43 AM] Killing any DiagnosticsPlugin that might remain.
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:05:43 AM] Killing any MonAgentHost that might remain.
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:05:44 AM] Diagnostics plugin stopped successfully
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:05:44 AM] Resetting DiagnosticPlugin
DiagnosticsPluginLauncher.exe Error: 0 : [1/10/2015 1:05:53 AM] DiagnosticsPlugin launch failed with exit code -108
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:06:01 AM] DiagnosticPlugin exited with code -108
"C:\Packages\Plugins\Microsoft.Azure.Diagnostics.IaaSDiagnostics\1.3.1.6\Logs\DiagnosticsPlugin.log"
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] Found namespace http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration in schema schema\WADPrivateConfigSchema.xsd
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] WadCfg is provided in initial configuration. Using that to initialize Diagnostics.
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] <PublicConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"><WadCfg><DiagnosticMonitorConfiguration overallQuotaInMB="4096" xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"><DiagnosticInfrastructureLogs scheduledTransferLogLevelFilter="Verbose" /><Directories scheduledTransferPeriod="PT1M"><IISLogs containerName="wad-iis-logfiles" /><FailedRequestLogs containerName="wad-failedrequestlogs" /></Directories><WindowsEventLog><DataSource name="Application!*" /><DataSource name="System!*" /><DataSource name="Security!*" /></WindowsEventLog><Logs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Verbose" /></DiagnosticMonitorConfiguration></WadCfg></PublicConfig>
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] Private setting is loaded
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] Checkpoint file is presentC:\WindowsAzure\Logs\Plugins\Microsoft.Azure.Diagnostics.IaaSDiagnostics\1.3.1.6\WAD0103\Configuration\Checkpoint.txt
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] Will use local resource directory C:\WindowsAzure\Logs\Plugins\Microsoft.Azure.Diagnostics.IaaSDiagnostics\1.3.1.6\WAD0103
DiagnosticsPlugin.exe Error: 0 : [1/10/2015 1:05:44 AM] System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Cis.Monitoring.SecUtil.dll' or one of its dependencies. The specified module could not be found.
File name: 'Microsoft.Cis.Monitoring.SecUtil.dll'
at Microsoft.Azure.Plugins.Plugin.StandardConfig.EncryptKey(String key, String thumbprint)
at Microsoft.Azure.Plugins.Plugin.StandardConfig..ctor(String nameSpace, Int32 eventVersion, Int64 overallQuota, String accountName, String accountKey, String accountUri, String accountCertStore, Int32 retention, String thumbprint)
at Microsoft.Azure.Plugins.Plugin.WadParser.Translate(String baseMaResourcePath, Int32 actualDiskQuota, String& fullConfigFilePath)
DiagnosticsPlugin.exe Error: 0 : [1/10/2015 1:05:48 AM] Failed to convert WAD1.1 config to Monagent config format
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:52 AM] DiagnosticPlugin.exe exit with code -108
Probably the easiest way to rebuild is to uninstall then reinstall the VM Extension.
Related
I need to be able to get to the queue item itself (not the string), so that I can manipulate it from my function.
In run.csx code blelow runs and i get access to CloudQueueMessage
#r "Microsoft.WindowsAzure.Storage"
using Microsoft.WindowsAzure.Storage.Queue;
using System;
public static void Run(CloudQueueMessage myQueueItem, ILogger log)
{
log.LogInformation($"Queue ID: {myQueueItem.Id}");
log.LogInformation($"Queue Insertion Time: {myQueueItem.InsertionTime}");
log.LogInformation($"Queue Expiration Time: {myQueueItem.ExpirationTime}");
log.LogInformation($"Queue Payload: {myQueueItem.AsString}");
}
In my local development this code throws an error.
I use all latest Nuget's.
VS2017 15.8.8
Azure Function and Web Job Tools: 15.10.2046.0
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using Microsoft.WindowsAzure.Storage.Queue;
namespace AzurePumps.MyForce
{
public static class PersonQueueProcessor
{
[FunctionName("PersonQueueProcessor")]
public static void Run([QueueTrigger("sfcontact-update-error", Connection = "storage-queue-connection")]CloudQueueMessage myQueueItem, ILogger log)
{
log.LogInformation($"Queue ID: {myQueueItem.Id}");
log.LogInformation($"Queue Insertion Time: {myQueueItem.InsertionTime}");
log.LogInformation($"Queue Expiration Time: {myQueueItem.ExpirationTime}");
log.LogInformation($"Queue Payload: {myQueueItem.AsString}");
}
}
}
Log:
Azure Functions Core Tools (2.1.748 Commit hash: 5db20665cf0c11bedaffc96d81c9baef7456acb3)
Function Runtime Version: 2.0.12134.0
Skipping 'SF_SecurityToken' from local settings as it's already defined in current environment variables.
[10/26/2018 8:07:51 PM] Building host: startup suppressed:False, configuration suppressed: False
[10/26/2018 8:07:52 PM] Reading host configuration file 'D:\Projects\Force\bin\Debug\netstandard2.0\host.json'
[10/26/2018 8:07:52 PM] Host configuration file read:
[10/26/2018 8:07:52 PM] {
[10/26/2018 8:07:52 PM] "version": "2.0"
[10/26/2018 8:07:52 PM] }
[10/26/2018 8:07:53 PM] Initializing Host.
[10/26/2018 8:07:53 PM] Host initialization: ConsecutiveErrors=0, StartupCount=1
[10/26/2018 8:07:53 PM] Starting JobHost
[10/26/2018 8:07:53 PM] Starting Host (HostId=vddk35x1fmsnlt-1608145051, InstanceId=e9842cc2-f4a1-46c2-80d0-3e0aad9ae83b, Version=2.0.12134.0, ProcessId=16720, AppDomainId=1, Debug=False, FunctionsExtensionVersion=)
[10/26/2018 8:07:53 PM] Loading functions metadata
[10/26/2018 8:07:53 PM] 2 functions loaded
[10/26/2018 8:07:54 PM] Generating 2 job function(s)
[10/26/2018 8:07:55 PM] Found the following functions:
[10/26/2018 8:07:55 PM] AzurePumps.MyForce.PersonProcessor.Run
[10/26/2018 8:07:55 PM] AzurePumps.MyForce.PersonQueueProcessor.Run
[10/26/2018 8:07:55 PM]
[10/26/2018 8:07:55 PM] Host initialized (1859ms)
[10/26/2018 8:08:00 PM] Host started (6876ms)
[10/26/2018 8:08:00 PM] Job host started
Hosting environment: Production
Content root path: D:\Projects\Force\bin\Debug\netstandard2.0
Now listening on: http://0.0.0.0:7071
Application started. Press Ctrl+C to shut down.
Listening on http://0.0.0.0:7071/
Hit CTRL-C to exit...
[10/26/2018 8:08:06 PM] Host lock lease acquired by instance ID '0000000000000000000000006DB263D8'.
[10/26/2018 8:08:22 PM] Executing 'PersonQueueProcessor' (Reason='New queue message detected on 'sfcontact-update-error'.', Id=1e37d3a4-a992-41c8-b6ca-595787e5224e)
[10/26/2018 8:08:23 PM] Executed 'PersonQueueProcessor' (Failed, Id=1e37d3a4-a992-41c8-b6ca-595787e5224e)
**[10/26/2018 8:08:23 PM] System.Private.CoreLib: Exception while executing function: PersonQueueProcessor. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'myQueueItem'. Microsoft.Azure.WebJobs.Extensions.Storage: Binding parameters to complex objects (such as 'CloudQueueMessage') uses Json.NET serialization.
1. Bind the parameter type as 'string' instead of 'CloudQueueMessage' to get the raw values and avoid JSON deserialization, or
2. Change the queue payload to be valid json. The JSON parser failed: Unexpected character encountered while parsing value: i. Path '', line 0, position 0.**
Make sure you don't reference/install WindowsAzure.Storage latest version 9.3.2, there seems a bug when integrating with Function SDK. See the issue tracked.
Right now when we create a v2 Function Project, the dependencies in the template, e.g. Microsoft.NET.SDK.Functions references WindowsAzure.Storage 9.3.1 by default. This version works well(as you have seen in Azure portal), no need to install the package separately.
Besides, recommend you to update Microsoft.Azure.WebJobs.Extensions.Storage to 3.0.1 to avoid some first chance exception throwing.
I am having the exact same issue as this question
But none of the answers works, been googling for a long time and my versions are updated etc and still I get that same error
Code is the sample template
using System;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
namespace NWMPosNGPimFeeder
{
public static class Function1
{
[FunctionName("Function1")]
public static void Run([TimerTrigger("0 */1 * * * *")]TimerInfo myTimer, TraceWriter log)
{
log.Info($"C# Timer trigger function executed at: {DateTime.Now}");
}
}
}
Versions of host etc is as follows including the actual error
[21/5/2018 2:03:29 AM] Host has been specialized
Listening on http://localhost:7071/
Hit CTRL-C to exit...
[21/5/2018 2:03:29 AM] Reading host configuration file 'C:\Users\MattDouhan\source\repos\NWMPosNGPimFeeder\NWMPosNGPimFeeder\bin\Debug\net461\host.json'
[21/5/2018 2:03:29 AM] Host configuration file read:
[21/5/2018 2:03:29 AM] {
[21/5/2018 2:03:29 AM] }
[21/5/2018 2:03:30 AM] Loaded custom extension 'BotFrameworkConfiguration'
[21/5/2018 2:03:30 AM] Loaded custom extension 'SendGridConfiguration'
[21/5/2018 2:03:30 AM] Loaded custom extension 'EventGridExtensionConfig'
[21/5/2018 2:03:31 AM] Generating 1 job function(s)
[21/5/2018 2:03:31 AM] Starting Host (HostId=desktop7cks1do-1972353084, Version=1.0.11232.0, ProcessId=2668, Debug=False, Attempt=0)
[21/5/2018 2:03:31 AM] A ScriptHost error has occurred
[21/5/2018 2:03:31 AM] Microsoft.Azure.WebJobs.Host: Error indexing method 'Function1.Run'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'log' to type TraceWriter. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
[21/5/2018 2:03:31 AM] Error indexing method 'Function1.Run'
Problem locates at the old function cli VS is using.
Version=1.0.11232.0
It means the cli version is 1.0.4. This old version does cause your issue but it has already been fixed in new ones.
Check your Azure Functions and Web Jobs Tools version.
Latest extension 15.0.40502.0, will make VS use cli 1.0.4 if VS fails to download new version cli. This downloading process is in background and seems no explicit warning. See This GitHub issue.
Solution
I recommend you to delete C:\Users\UserName\AppData\Local\AzureFunctionsTools folder and restart your VS to download it again.
When we create a function app, we can see tip on the dialog that Making sure all templates are up to date...
Wait for a while, we can see the tip changes as
If it doesn't change after 3m(time to download 200M files on your side), check C:\Users\UserName\AppData\Local\AzureFunctionsTools\Releases\1.0.12.1 folder to see whether it's empty. If it's empty, which means downloading can't be done through VS. We have to do it manually.
You can find download link of cli, itemTemplates and projectTemplates in C:\Users\UserName\AppData\Local\AzureFunctionsTools\feed.json.
You can refer to 1.0.10 folder to build similar folder structure.
[15/03/2018 11:03:14 PM] Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=8.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)
[15/03/2018 11:03:14 PM] at Tux.Workers.RollCall.Azure.AzureTable.<Init>d__1.MoveNext()
[15/03/2018 11:03:14 PM] at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
[15/03/2018 11:03:14 PM] at Tux.Workers.RollCall.Azure.AzureTable.Init(String tableName)
[15/03/2018 11:03:14 PM] at Tux.Workers.RollCall.Function1.<Run>d__0.MoveNext()
[15/03/2018 11:03:14 PM] Function completed (Success, Id=438dae86-18a8-4c85-b121-3918e2307ca4, Duration=122ms)
[15/03/2018 11:03:14 PM] Executed 'Function1' (Succeeded, Id=438dae86-18a8-4c85-b121-3918e2307ca4)
No matter how I do this error always occur whenever trying to calling Cloud Service in Azure function project. I can see the Microsoft.WindowsAzure.Storage.dll file in the bin directory inside the project. I also see the dll inside
C:\Users\klam0\.nuget\packages\windowsazure.storage\8.6.0
When I create a basic console application, I have no problem calling the Cloud to get the table reference.
Do I need to configure something on the portal if I just run the project locally?
I'm trying to move some functionality to Azure Functions. Created a project for EF Core 2 code, and referenced it to the Azure Functions project. Added the EF Core+SQLServer nugget packages to the Azure Functions project. When the function attempts to execute, this is the errors in the screen. I can see that the Microsoft.EntityFrameworkCore assembly is in the same directory as our azure functions dll.
Can anyone shed some light on why it's not finding it and how to fix this?
[1/3/2018 6:49:56 AM] A ScriptHost error has occurred
[1/3/2018 6:49:56 AM] Exception while executing function: Accounting. AS.Jobs: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
[1/3/2018 6:49:56 AM] Exception while executing function: Accounting
[1/3/2018 6:49:56 AM] Exception while executing function: Accounting. AS.Jobs: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
[1/3/2018 6:49:56 AM] Function completed (Failure, Id=56ba500b-7c3a-45c1-a9eb-8be4d52d1592, Duration=159ms)
[1/3/2018 6:49:56 AM]
[1/3/2018 6:49:56 AM] Executed 'Accounting' (Failed, Id=56ba500b-7c3a-45c1-a9eb-8be4d52d1592)
[1/3/2018 6:49:56 AM] System.Private.CoreLib: Exception while executing function: Accounting. AS.Jobs: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
[1/3/2018 6:49:56 AM] Function had errors. See Azure WebJobs SDK dashboard for details. Instance ID is '56ba500b-7c3a-45c1-a9eb-8be4d52d1592'
[1/3/2018 6:49:56 AM] System.Private.CoreLib: Exception while executing function: Accounting. AS.Jobs: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
Update: 1/3/2018
I have VS 2017 15.5.2 installed, and I am building this in VS.
Here is the output of the function host when I run it from VS.
[1/4/2018 3:47:03 AM] Host configuration file read:
[1/4/2018 3:47:03 AM] {
[1/4/2018 3:47:03 AM] }
[1/4/2018 3:47:04 AM] Generating 1 job function(s)
[1/4/2018 3:47:04 AM] Starting Host (HostId=jlt03-962556955, Version=2.0.11353.0, ProcessId=21200, Debug=False, Attempt=0, FunctionsExtensionVersion=)
[1/4/2018 3:47:04 AM] Found the following functions:
[1/4/2018 3:47:04 AM] Jobs.Accounting.Run
[1/4/2018 3:47:04 AM]
Listening on http://localhost:7071/
So after much much more searching, I came across this GitHub posted issue. It is the exact same issue that I am seeing here. Apparently it is a issue with Azure Functions 1.0.7 and EF Core 2.0.1.
I had to role back AF back to 1.0.6 AND I also had to role EF Core back to 2.0.0. Afterwards the function executed as expected.
I will be monitoring the GitHub issue and update this answer once it is confirmed to be fixed.
Update
This is now fixed with Azure Functions Core Tools 2.1.0 release.
https://github.com/Azure/app-service-announcements/issues/109
what worked for me was to delete all folders under bin folder and build the app!!
I have a very Strange problem, in my BPEL process I have used java embed Activity. on that activity if I am using Task class. then I am not able to deploy my process. its giving me following message.
when I remove that line then I am able to deploy that process.
following error comes when deployment.
[10:29:41 AM] ---- Deployment
started. ---- [10:29:41 AM] Target
platform is (Weblogic 10.3).
[10:29:41 AM] Running dependency
analysis... [10:29:41 AM] Building...
[10:29:52 AM] Deploying profile...
[10:30:19 AM] Wrote Archive Module to
D:\RegistrationUpload\RegistrationUpload\RegistrationUpload\deploy\sca_RegistrationUpload_rev21.0.jar
[10:30:19 AM] Deploying
sca_RegistrationUpload_rev21.0.jar to
partition "default" on server
soa_server1
[WIN-73I7I7QL8Z3.uradevt.gov.sg:8002]
[10:30:19 AM] Processing
sar=/D:/RegistrationUpload/RegistrationUpload/RegistrationUpload/deploy/sca_RegistrationUpload_rev21.0.jar
[10:30:19 AM] Adding sar file -
D:\RegistrationUpload\RegistrationUpload\RegistrationUpload\deploy\sca_RegistrationUpload_rev21.0.jar
[10:30:19 AM] Preparing to send HTTP
request for deployment [10:30:19 AM]
Creating HTTPS connection to
host:WIN-73I7I7QL8Z3.uradevt.gov.sg,
port:8002 [10:30:19 AM] Sending
internal deployment descriptor
[10:30:20 AM] Sending archive -
sca_RegistrationUpload_rev21.0.jar
[10:33:45 AM] Received HTTP response
from the server, response code=500
[10:33:45 AM] Error deploying archive
sca_RegistrationUpload_rev21.0.jar to
partition "default" on server
soa_server1
[WIN-73I7I7QL8Z3.uradevt.gov.sg:8002]
[10:33:45 AM] HTTP error code returned
[500] [10:33:45 AM] Error message from
server: Error during deployment: Error
occurred during deployment of
component: OfficerList to service
engine: implementation.bpel, for
composite: RegistrationUpload:
ORABPEL-01005
Failed to compile bpel generated
classes. failure to compile the
generated BPEL classes for BPEL
process "OfficerList" of composite
"default/RegistrationUpload!21.0*soa_27af417b-20d6-48d0-821c-4f26b3c4ce94" The class path setting is incorrect.
Ensure that the class path is set
correctly. If this happens on the
server side, verify that the custom
classes or jars which this BPEL
process is depending on are deployed
correctly. Also verify that the run
time is using the same
release/version. . [10:33:45 AM]
Check server log for more details.
[10:33:45 AM] Error deploying archive
sca_RegistrationUpload_rev21.0.jar to
partition "default" on server
soa_server1
[WIN-73I7I7QL8Z3.uradevt.gov.sg:8002]
[10:33:45 AM] #### Deployment
incomplete. #### [10:33:45 AM] Error
deploying archive
file:/D:/RegistrationUpload/RegistrationUpload/RegistrationUpload/deploy/sca_RegistrationUpload_rev21.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
follwing code I have used in snippet.
<bpelx:exec import="org.w3c.dom.Element"/>
<bpelx:exec import="com.ura.dams.workflow.process.OfficerList"/>
<bpelx:exec import="oracle.bpel.services.workflow.task.model.Task"/>
<bpelx:exec name="getTaskInfoForPO" version="1.5" language="java">
<![CDATA[try
{
OfficerList officerlist= new OfficerList();
String JobAssignmentType1= (String)getVariableData("JobAssignmentType");
String officerLevel1= (String)getVariableData("officerLevel");
String applicationType1= (String)getVariableData("applicationType");
String functionId1= (String)getVariableData("functionId");
String dcConservationFlag1= (String)getVariableData("dcConservationFlag");
String app_id_key1= (String)getVariableData("app_id_key");
String app_id_value1= (String)getVariableData("app_id_value");
String taskID1= (String)getVariableData("taskID");
String officer="";
String DConservatiionFlag="";
java.util.Hashtable keyValues= new java.util.Hashtable();
keyValues.put(app_id_key1, app_id_value1);
Task taskinfo= null;
}
catch(Exception e)
{
System.out.println("error occured" + e);
}]]>
</bpelx:exec>
Will anyone please tell me do I need to refer jar file in terms of BPEL process also.
even same class I can use in my java files in the same project. (for other class its working like OfficerList)
Environment is : Oracle SOA 11g, Jdeveloper
please suggest something.
I am suspecting that the IMPORT statements does not work. Most of the time I do import, but turn around and use the full package/class name for it. Have you try using the full package/class as follow?
com.ura.dams.workflow.process.OfficerList officerlist=
new com.ura.dams.workflow.process.OfficerList();
...
oracle.bpel.services.workflow.task.model.Task taskinfo= null;