Our company is starting with Service Fabric Microservices.
We install the Azure Service Fabric SDK as the MS documentation says (https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started). We install it from de WebPI, open the powershell as admin, and run the "Set-ExecutionPolicy" comand.
Later we install the Azure tools in Visual Studio and with that we could create an example project, an Stateless project.
Inmediatly after the project loaded all the dependencies, we "start" the project. (VS ran as admin)
The VS sets the local cluster with 1 node and deploy the microservice. Until this point everythings was OK.
Then we create another Stateless project and we did the same things. But, this time we got and error in the output console of VS and in Service Fabric Explorer.
2>Started executing script 'Deploy-FabricApplication.ps1'.
2>powershell -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command ". 'C:\Users\xxxxx\source\repos\Application2\Application2\Scripts\Deploy-FabricApplication.ps1' -ApplicationPackagePath
'C:\Users\xxxxx\source\repos\Application2\Application2\pkg\Debug' -PublishProfileFile
'C:\Users\xxxx\source\repos\Application2\Application2\PublishProfiles\Local.1Node.xml' -DeployOnly:$true -ApplicationParameter:#{_WFDebugParams_='[{"""CodePackageName""":"""Code""","""CodePackageLinkFolder""":"""C:\\Users\\xxxx\\source\\repos\\Application2\\Actor1\\bin\\Debug\\netcoreapp3.0\\win7-
x64""","""ConfigPackageName""":"""Config""","""ConfigPackageLinkFolder""":"""C:\\Users\\xxx\\source\\repos\\Application2\\Actor1\\PackageRoot\\Config""","""DataPackageName""":null,"""DataPackageLinkFolder""":null,"""LockFile""":"""C:\\Users\\xxxx\\source\\repos\\Application2\\Actor1\\bin\\Debug\\netcoreapp3.0\\win7-x64\\_VS_ServiceFabric_lock.txt""","""WorkingFolder""":"""C:\\Users\\xxxx\\source\\repos\\Application2\\Actor1""","""ServiceManifestName""":"""Actor1Pkg""",
"""EntryPointType""":"""Main""","""DebugExePath""":null,"""DebugArguments""":null,"""DebugParametersFile""":"""C:\\Users\\xxx\\source\\repos\\Application2\\
Actor1\\bin\\Debug\\netcoreapp3.0\\win7-x64\\_VS_ServiceFabric_debug.txt"""}]'} -
UnregisterUnusedApplicationVersionsAfterUpgrade $false -
OverrideUpgradeBehavior 'None' -OverwriteBehavior 'Always' -
SkipPackageValidation:$true -ErrorAction Stop"
2>Copying application to image store...
2>Upload to Image Store succeeded
2>Registering application type...
2>Register application type started. Use Get-ServiceFabricApplicationType to query for status.
2>Running Image Builder process ...
2>Downloading application package from 'Application2Type' ...
2>Validating package and computing checksums ...
2>FABRIC_E_IMAGEBUILDER_UNEXPECTED_ERROR: Se han producido uno o varios errores. --> AggregateException: Se han producido uno o varios errores. --> FileLoadException: El proceso no tiene acceso al archivo porque est siendo utilizado por otro proceso. (Excepci¢n de HRESULT: 0x80070020)
2>Registration of application type failed.
2>En C:\Program Files\Microsoft SDKs\Service
2>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-NewServiceFabricApplication.ps1: 308 Car cter: 17
2>+ throw "Registration of application type failed."
2>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> + CategoryInfo : OperationStopped: (Registration of application type failed.:String) [], RuntimeException
2> + FullyQualifiedErrorId : Registration of application type failed.
2>
2>Finished executing script 'Deploy-FabricApplication.ps1'.
2>Time elapsed: 00:00:13.0719235
2>The PowerShell script failed to execute.
========== Build: 1 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
We reseted the cluster and tried to deploy the 2 examples again, but we got the same error for the two microservices.
I was looking for a solution in Google, MS Docs and here, but no one has a solution.
According to your log powershel can't get access to some process. As a very wide guess it could be a problem with an antivirus or your first debug session.
Have you tried not to debug(start vs), but to publish solution (Deploy project->right click-> publish) after cluster reset\restart?
Related
So i started writing xunit test in net 6.0 with visual studio 2022 community preview.
Everything was working fine on the first PC.
But then when i set the dev environment on another PC (both windows 10) and i try running tests i get this :
========== Starting test run ==========
Testhost process exited with error: . Please check the diagnostic logs for more information.
Testhost process exited with error: . Please check the diagnostic logs for more information.
========== Test run aborted: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========
With no more information. Where can i find those "diagnostic logs" i don't find info about it on the web.
I tried running tests manually in command terminal with "dotnet test" but i get this :
**dotnet test
Determining projects to restore...
All projects are up-to-date for restore.
kis-project-information-core -> D:\Users\Thomas MEDARD\Documents\Apollo\Kis\Booth\Libraries\kis-project-information\sources\binaries\net6.0\kis-project-information-core.dll
kis-project-information-unit-tests -> D:\Users\Thomas MEDARD\Documents\Apollo\Kis\Booth\Libraries\kis-project-information\sources\binaries\net6.0\kis-project-information-unit-tests.dll
Test run for D:\Users\Thomas MEDARD\Documents\Apollo\Kis\Booth\Libraries\kis-project-information\sources\binaries\net6.0\kis-project-information-unit-tests.dll (.NETCoreApp,Version=v6.0)
Microsoft (R) Test Execution Command Line Tool Version 17.0.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Testhost process exited with error: . Please check the diagnostic logs for more information.
Test Run Aborted.**
I ran dotnet test -verbosity:diagnostic --diag:log.txt to see details and here is what i get
log.txt
log.host.21-11-30_10-19-44_26197_5.txt
So i see my test is detected but something is going wrong when running it
Ok so i found what is happening.
After reinstalling i thought everything worked but actually i found the same problem again.
What i realized is that i was in admin mode on my terminal. When i run the same command from non admin terminal, i get the problem explained.
So my problem is accessing to dotnet. I guess it has something to do with having my source code stored in a different drive from dotnet.
It's still weird that i can build without problem but testing need elevated privileges.
I have been deploying my C# MVC application for years now, as early as yesterday, successfully. Today however I started getting this error:
Step 6/6 : RUN npm install firebase-admin
---> Running in 6af72a3f9eaf
[91m/bin/sh: 1: npm: not found
The command '/bin/sh -c npm install firebase-admin' returned a non-zero code: 127
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 127
[0m
--------------------------------------------------------------------------------
ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/cloud-build/builds/ea90f766-e252-4b9b-b707-746acf8ad686?project=186443889098 Failure status: UNKNOWN: Error Response: [2] Build failed; check build logs for details
Failed to deploy project [Project Name] to App Engine Flex.
The logs say this:
Step 6/6 : RUN npm install firebase-admin
---> Running in 6af72a3f9eaf
/bin/sh: 1: npm: not found
The command '/bin/sh -c npm install firebase-admin' returned a non-zero code: 127
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 127
Has anyone seen this error or know whats casing it?
The problem was the node.js version was wrong. It was trying to use the wrong node version when publishing vs what was defined in the code.
Visual Studio 2015.update3 - fully updated & patched - windows 8.1 - .net 4.7.1
2>------ Publish started: Project: Prometheus, Configuration: Release x64 ------
2>Connecting to C:\Temp\publish...
2>Project "test.csproj" (GatherAllFilesToPublish target(s)):
2> Building with tools version "14.0".
2> Target "ValidateMSBuildToolsVersion" skipped. Previously built unsuccessfully.
2>Done building project "test.csproj" -- FAILED.
2>
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, **1 failed**, 0 skipped ==========
I have searched and tried every solution online - no joy. Have spent over 3 days trying to sort this out - getting super frustrated now. It appears to build fine but always fails to publish to a local folder on the pc.
Hoping someone can point me in the right direction.
Note: I have tried Any CPU, Debug, and Release configurations - all end the same. I have configured the build to output diagnostic information which is available on request.
I'm trying to host WebAPI service on local ServiceFabric cluster. However, I'm unable to start even a simple Web Api template provided by VS2017.
I did the following:
I prepared the environment: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started
I created a new project in Visual Studio, choosing "Service Fabric Application", and "Stateless Web API" service template
When I build it, and click run, it tries to deploy it but I get the following error:
Screen1
And the output is:
2>Copying application to image store... 2>Copy application
package succeeded 2>Registering application type...
2>Register-ServiceFabricApplicationType : Operation timed out.
2>At C:\Program Files\Microsoft SDKs\Service
Fabric\Tools\PSModule\ServiceFabricS
2>DK\Publish-NewServiceFabricApplication.ps1:251 char:9 2>+
Register-ServiceFabricApplicationType -ApplicationPathInImage ...
2>+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2>
+ CategoryInfo : OperationTimeout: (Microsoft.Servi...usterConnection:ClusterConnection)
[Register-ServiceFabricApplicationType], TimeoutException 2> +
FullyQualifiedErrorId :
RegisterApplicationTypeErrorId,Microsoft.Service 2>
Fabric.Powershell.RegisterApplicationType 2>Finished executing
script 'Deploy-FabricApplication.ps1'. 2>Time elapsed:
00:02:01.7559509 2>The PowerShell script failed to execute.
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
The interesting part is that when I choose basic "Stateless Service" template in Visual Studio, it works just fine. The problem I have is related to Web Api service on SF. My assumption is that the Web Api project has to write some additional info somewhere on the disk but does not have access to that path.
I tried reinstalling SF and SF SDK but with no results. I'm running VS2017 as an Administrator.
Any help greatly appreciated.
I' trying to publish ClickOnce Application to a webserver through sftp (Using Visual Studio 2015. The server is Centos 6.7).
My final config in the Publish Wizard:
The application will be published to:
sftp://10.1.0.88/home/www/sample/web/desktop/
Users will launch this application from:
http://sample.example.com/desktop/
When I published: (Output)
Connecting to 'sftp://10.1.0.88/home/www/sample/web/desktop/'...
Publishing files...
Publish success.
Warning: Unable to view published application at http://sample.example.com/desktop/publish.htm.
http://sample.example.com/desktop/publish.htm
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
Nothing was added in /home/www/sample/web/desktop/. But it says Publish success.
What should I do?
It turned out the deployment files were added to /root/home/www/sample/web/desktop/instead of /home/www/sample/web/desktop/
So I change publishing folder location from
sftp://10.1.0.88/home/www/sample/web/desktop/
to
sftp://10.1.0.88/../home/www/ecr/web/desktop/