Error when deploying .NET Core webapp to Azure - asp.net

I am a complete beginner on the .NET world trying to get my first dummy .NET Core webapp to run on Azure App Service.
The code can be found here:
https://github.com/jordi-chacon/bcn_pollution
My development machine runs Ubuntu, so I am using Visual Studio Code.
I currently have my .NET Core webapp running on localhost:5000 just fine and now I want it to run on Azure App Service.
I have successfully configured Continuous Deployment on my App Service to fetch the code from Github.
Then Azure tried to deploy my webapp but it failed with the following error:
Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --aspNet5 "D:\home\site\repository\project.json" --aspNet5Version "1.0.0-rc1-final" --aspNet5Runtime "CLR" --aspNet5Architecture "x86"'.
Project file path: .\project.json
Generating deployment script for ASP.NET 5 Application
Generated deployment script files
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET 5 Web Application deployment.
Downloading dnx-clr-win-x86.1.0.0-rc1-final from https://www.nuget.org/api/v2
Unable to download package: An exception occurred during a WebClient request.
At C:\Program Files
(x86)\SiteExtensions\Kudu\50.41223.1987\bin\scripts\dnvm.ps1:694 char:13
+ throw "Unable to download package: {0}" -f
$Global:downloadData.Erro ...
+
Failed exitCode=1, command=PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';$CmdPathFile='"D:\local\UserProfile\.dnx\temp-set-envvars.cmd"';& 'C:\Program Files (x86)\SiteExtensions\Kudu\50.41223.1987\bin\scripts\dnvm.ps1' " install 1.0.0-rc1-final -arch x86 -r CLR
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Unable to downl...Client requ
An error has occurred during web site deployment.
est.:String) [], RuntimeException
+ FullyQualifiedErrorId : Unable to download package: An exception occurred during a WebClient request.
Anyone knows what I am doing wrong?
Thanks!

I guess you are hitting not enough disk space issue.
https://github.com/projectkudu/kudu/issues/1682
I tried your code, and repro the deployment failure.
when navigate to https://{site name}.scm.azurewebsites.net, i see below message
Parser Error Message: There is not enough space on the disk.
by default free site has 1 GB of disk space, but seems like it is an known issue that asp.net 5 application kind of require a lots of dependency and easily go over the limit. And they (Asp.net 5 folks) are working on addressing the issue.
walk-around is to deploy to a Basic or Standard site

Related

Could not authorize while connecting to the SonarQube server. Check your credentials and try again

I am trying to run SonarQube for my Xamarin Forms project, I am on the path where my .SLN file is there and executing the following command
Command:
$ mono /Users/akandasamy/Development/HIDProjects/sonar-scanner-msbuild-4.0.2.892/MSBuild.SonarQube.Runner.exe begin /k:"HIDReaderManagerApp" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="My Login Token"
Error:
SonarQube Scanner for MSBuild 4.0.2
Default properties file was found at /Users/akandasamy/Development/HIDProjects/sonar-scanner-msbuild-4.0.2.892/SonarQube.Analysis.xml
Loading analysis properties from /Users/akandasamy/Development/HIDProjects/sonar-scanner-msbuild-4.0.2.892/SonarQube.Analysis.xml
Pre-processing started.
Preparing working directories...
17:29:10.391 Updating build integration targets...
17:29:10.414 Fetching analysis configuration settings...
17:29:10.517 Failed to request and parse 'http://localhost:9000/api/settings/values?component=HIDReaderManagerApp': The remote server returned an error: (401) .
17:29:10.517 Could not authorize while connecting to the SonarQube server. Check your credentials and try again.
17:29:10.518 Pre-processing failed. Exit code: 1
The api/settings/values API requires Browse permission when the component argument is used. Please, see if the user you are authenticating with has the aforementioned permission.
More details about security and permissions here:
https://docs.sonarqube.org/latest/instance-administration/security

Publish to Azur fails with 500 internal Server Error

I have a cloud service on Windows Azure, I created a Asp.net WebAPI project and published to the cloud service, that was working fine from Visual Studio to publish before i updated visual studio to update 4 and azure SDK 2.2 to 2.6. But after updating when I publish, I got the following error messages. I tried several times, all failed. Can anyone help me?
even i am not able to publish a new created project on new azure service !
11:00:31 PM - Warning: There are package validation warnings.
11:00:31 PM - Checking for Remote Desktop certificate...
11:00:39 PM - Preparing deployment for TempAzure - 2/12/2014 10:58:23
PM with Subscription ID 'e94e9aeb-7003-4eae-be92-7b7ac0a1ba2c' using
Service Management URL 'https://management.core.windows.net/'...
11:00:39 PM - Connecting...
11:00:39 PM - Verifying storage account 'jasontest'...
11:00:41 PM - Uploading Package...
11:06:48 PM - Warning: The remote server returned an error: (500)
Internal Server Error.
11:11:50 PM - Warning: The remote server returned an error: (500)
Internal Server Error.
11:26:16 PM - Warning: The remote server returned an error: (500)
Internal Server Error.
12:00:27 AM - Warning: The remote server returned an error: (500)
Internal Server Error.
12:05:05 AM - Warning: The remote server returned an error: (500)
Internal Server Error.
12:27:54 AM - Unable to write data to the transport connection: An
existing connection was forcibly closed by the remote host.
After updating from Azure SDK2.5 to SDK 2.6, I had the same problem when trying publish to my Azure service from VS2013: Any deployment effort using Visual Studio fails after some minutes with 500 Internal server error.
As I found the reason is the very slow upload of the Azure package to the cloud - sometimes only between 30kB/s and 50kB/s. The deployment fails because of an timeout which also explains, that the Azure instance logs show no sign of any deployment...
Work around: Deploy from Azure storage
1: Package the Azure solution, either via VisualStudio or via command line:
MSBuild /t:Publish /p:TargetProfile=Cloud /P:Configuration=Release
2: Create an Azure storage container to upload your package to.
Continue using AzurePowerShell cmdlets:
3: Login
Add-AzureAccount
4: Upload the package to the your Azure storage container
$Ctx = New-AzureStorageContext -StorageAccountName "yourstoragename" -StorageAccountKey "yourkey"
Set-AzureStorageBlobContent -File "...\app.publish\yourservice.cspkg" -Container "yourazurestoragecontainer" -Blob "yourservice.cspkg" -Context $Ctx -Force
Determine the PackageURL of the uploaded package.
5: Deploy the cloud service referring to the package just uploaded to Azure cloud storage.
Set-AzureDeployment -Upgrade -Slot "Staging" -Package "PackageURL" -Configuration "PathToYourCloudConfiguration.cscfg" -label "SomeDeploymentInfo" -ServiceName "yourservicename" -Force
(Of course the entire process is scriptable. Kemp Brown wrote a great article: with a script you could adapt to explictly upload the package:
Continuous Delivery for Cloud Services in Azure)
Actually the problem was my network connection.
to identify this problem i created VM on azure with same windows 8.1 OS and same VS. i tried to deploy from there. deployment worked fine. latter I disconnected all other devices from my internet connection and i tried to publish from my machine. it worked !
so conclusion is slow internet connection or may be now we have less timeout time for publish from VS !

Error Installing Content Manager IBM Connections 4.5

I'm trying to install IBM Connections 4.5 on Oracle 11.2, but I'm having a problem with only 'Content Manager'. After Install process, the IBM Installation Manager appears this summary:
Install results :
CLFRP0038E: IBM Connections Content Manager failed to be configured on WebSphere Application Server. Error Step : Step "action-config-ce-ccm"
** One or more components failed installation. Please review. **
And in ConfigTrace log file appear this error:
config-ce-applicationserver-xml-config:
Target finished: config-ce-applicationserver-xml-config
Target started: config-ce-configurebootstrap-xml-config
c
Target finished: c
[echo] ... generating CCM Content Engine profile completed
[echo] Running Content Engine configuration tasks
[exec] There was an error executing the Configure GCD JDBC Data Sources task.
[exec] Running the task failed with the following message: The data source configuration failed:
[exec] WASX7209I: Connected to process "dmgr" on node svconnectionsCellManager01 using SOAP connector; The type of process is: DeploymentManager
[exec] testing Database connection
[exec] WASX7017E: Exception received while running file "E:/IBM/Connections/addons/ccm/ContentEngine/tools/configure/tmp/configurejdbcgcd.tcl"; exception information: javax.management.MBeanException
[exec] c: DSRA8000E: Java archive (JAR) or compressed files do not exist in the path or the required access is not allowed. Path: E:/app/Administrator/product/11.2.0/dbhome_1/jdbc/lib/ojdbc6.jar
The 'ojdbc6.jar' exist on the path, but the application report this error.
What can be this question?
Thanks
Can you confirm that KSH is installed? I have seen these errors on linux systems if the korne shell is not installed on the system. It is documented that CCM requires KSH but most people miss that part of the requirements.

Error While uploading to windows Azure using powershell Script

I am uploading the application to windows Azure using the powershell Script
New-AzureDeployment -ServiceName $servicename -Label MySite
-Slot "Staging" -Package "C:\Users\ronak\Documents\Visual Studio 2012\Projects\samplewebrole\samplewebrole\bin\Release\app.publish\samplewebrole.cspkg"
-Configuration "C:\Users\ronak\Documents\Visual Studio 2012\Projects\samplewebrole\samplewebrole\bin\Release\app.publish\ServiceConfiguration.Cloud.cscfg"
When I run this I receive an error as follows
New-AzureDeployment : Unable to write data to the transport connection: An
existing connection was forcibly closed by the remote host.
At line:14 char:1
+ New-AzureDeployment -ServiceName $servicename -Label MySite -Slot "Staging" -Pac...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureDeployment], StorageException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.HostedServices.NewAzureDeploymentCommand
To resolve this i found some suggestion to increase the size the asp.net can upload. Is there any other reason this is happening?
Also I am able to create cloud service and storage but cant upload my package to it.
I moved my script to the virtual machine which is hosted on azure and this error is no more so i think this error was due to my firewall or due to the slow internet connection.the script is running as desired on the virtual machine and i am able to automate my deployment process.

swagger-document-override/md-override-loader - FAILED

I am able to generate code using Autorest with my api when I host it on a server 2012R2 running IIS
However when I try to run it with the localhost url I get a could not read message.
I can read swagger.json in the browser
I am using the command
autorest --input-file=https://localhost:44348/api-docs/v1/swagger.json
--output-folder=generated --csharp --namespace=DD.MyApp.Connector
The output is
AutoRest code generation utility [version: 2.0.4283; node: v10.11.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core 'C:\Users\kirst\.autorest\#microsoft.azure_autorest-core#2.0.4289\node_modules\#microsoft.azure\autorest-core\dist' (2.0.4289)
Loading AutoRest extension '#microsoft.azure/autorest.csharp' (~2.3.79->2.3.82)
Loading AutoRest extension '#microsoft.azure/autorest.modeler' (2.3.55->2.3.55)
FATAL: swagger-document-override/md-override-loader - FAILED
FATAL: Error: Could not read 'https://localhost:44348/api-docs/v1/swagger.json'.
FATAL: swagger-document/loader - FAILED
FATAL: Error: Could not read 'https://localhost:44348/api-docs/v1/swagger.json'.
Process() cancelled due to exception : Could not read 'https://localhost:44348/api-docs/v1/swagger.json'.
Error: Could not read 'https://localhost:44348/api-docs/v1/swagger.json'.
After studying the issue on github I tried starting the api using dotnet run
but it did not help.
I tried running autorest in a dos command shell with admin priviledge
As per the github issue I can save the swagger.json to a file and generate the code by referencing the file.
That isn't a great solution.
Are you attempting to use https with localhost ? If you haven't put a certificate on there, you shouldn't be using https.
Try it with http://localhost...

Resources