Inspired by the Tutorial for Running Node.js TW5 on Microsoft Azure for Free I'd like to host TiddlyServer on Azure. As a first attempt I followed the instructions in the tutorial and was successful in getting Node.js TW5 working on Azure.
I deployed TiddlyServer on my desktop without any difficulty.
Then I did the following to get TiddlyServer running on Azure, but got stuck. What am I doing wrong?
I downloaded tiddlyserver-2.2.0-alpha-3.zip and tiddlywiki-production-5.1.22.zip from TiddlyServer's Github and placed the tiddlyserver files in the wwwroot, and the tiddlywiki-production files in the tiddlywiki folder. I also created a data folder and I moved my tiddlers there.
I edited the package.json adding "scripts" to the end:
I edited the settings.json with client keys, _datafoldertarget and bindInfo
I deployed to Azure
I navigated to the web page and logged in following the TiddlyServer authentication dialogue
I opened my TiddlyWiki and got the following errors, and found this in the log:
As another test, I tried uploading a file using TiddlyServer's upload functionality but was not successful.
Related
I have made a basic todo list React app (PERN stack), and can run it locally on my computer. I have not added any files (docker or web config) aside from a client folder and server(frontend) folder(backend) following this tutorial
Youtube: https://www.youtube.com/watch?v=ldYcgPKEZC8
Github code: https://github.com/ousecTic/pern-todo-app
I am now uploading this application onto an Azure Web app, via a GitHub repository linked onto VS code. Deployment goes fine, but the site does not run properly.
Here are the errors I am receiving from Azure's end
enter image description here
enter image description here
What node modules or other things could I be missing?
Thanks
The issue to my problem turned out to be that I was uploading my front end and back end at the same time, only uploading my front end worked. Also found in my case that deploying directly is more reliable than deploying via a connection on Github.
I created a function app on Azure Portal with below configuration.
And I created a simple HTTP trigger Function App on VS 2019 version of 16.7.6. The function is working successfuly on local machine. When I want to publish it to Azure, it returns below error;
Publish has encountered an error. The Publish URL
https://waws-prod-am2-xxx.publish.azurewebsites.windows.net/ is
unreachable. The application may be stopped, restarting or
unavailable. Try again once the publish target is available.
The publishing summary is;
When I check the publish profile on VS (.pubxml file), I see the line
<PublishUrl>https://waws-prod-am2-311.publish.azurewebsites.windows.net/</PublishUrl>
But it should be
<PublishUrl>http://myfuncappdss.scm.azurewebsites.net</PublishUrl>
I change it manually and there is any other error that is not detected
Publish has encountered an error. Publish has encountered an error. We
were unable to determine the cause of the error.
It hasn't published for 2 days. Before, I published successfully. I search it on google but I couldn't find any clue.
Btw, I can reach the FTP file of the function successfully. And the function running successfully on https://myfuncappdss.azurewebsites.net/ site.
I tried it with az command also but it wasn't work, too. All my teammates can't publish also. So, the problem is not just about my computer.
Why is the PublishUrl set with wrong URL?
When I check the publish profile in Visual Studio (.pubxml file), I see the line:
<PublishUrl>https://waws-prod-am2-311.publish.azurewebsites.windows.net/</PublishUrl>
But it should be
<PublishUrl>https://myfuncappdss.scm.azurewebsites.net</PublishUrl>
I changed it manually and then it started working fine.
Step 1: Do the above URL changes and save the .pubxml file
Step 2: Close Visual Studio.
Step 3: Open your project in Visual Studio.
Step 4: Now publish, it should work as expected…
Here we have successfully deployed the Function App.
Update:
Thanks for Aybuke's aharing, this is the reason of the problem:
The problem base is about function publish profile. When I follow the steps, (Go to Azure Portal-->Go to function app-->Overview menu-->Get Publish Profile) I can download the publish profile of function. So, I can see the publish settings of function. "publishUrl="https://waws-prod-am2-xxx.publish.azurewebsites.windows.net:443"" This line is in the publish profile file that I downloaded. But it should be "publishUrl="https://myfuncappdss.scm.azurewebsites.net"". That is why the published zip file is sent to wrong url. So, there are some problems while creating function on Azure Portal.
Original Answer:
Did you encounter this error?
I notice you change publish url to http://myfuncappdss.scm.azurewebsites.net, please change it to https://myfuncappdss.scm.azurewebsites.net and try again.
If I use http, I also can not publish my function app. I don't know why the publish url is not what you want, but the az command should work. Any details when you use az command?
Change http to https, it should work.
I had this issue and the problem was on the App Function Settings.
In Networking, Inbound Traffic had Access Restrictions ON.
I had to add my public IP Address and then I was able to publish.
I have deployed a Nodejs app (that is working on my local) to Azure Web app, however, I always a message in the browser as "You do not have permission to view this directory or page.". Is there any way I can debug it and find the cause of the this message or is it because of the some common issue in case any one has faced this before ?
There are several post around this issue. Here is something which you can try:
When you deploy the zip file, open KUDU or application editor from Azuer web app, which you can find it here:
Sometime if it is under your custom folder , you might get this issue.
Additionally please refer the below link for further troubleshooting
https://social.msdn.microsoft.com/Forums/azure/en-US/512e2eca-a2f2-4b32-a934-1081bddcdc86/nodejsweb-apps-azure-quotyou-do-not-have-permission-to-view-this-directory-or-pagequot?forum=opensourcedevwithazure
https://github.com/Azure-Samples/nodejs-docs-hello-world/issues/9
Also check this post for configuration:
https://github.com/projectkudu/kudu/wiki/Using-a-custom-web.config-for-Node-apps
Hope it helps.
The project was generated through Ionide and Visual Studio Code. I'm deploying to an Azure WebApp through GitHub.
The GitHub repository is: https://github.com/laygr/suave-dummy
The activity log says:
Command: build.cmd
The system cannot find the path specified.
�
The system cannot find the path specified.
D:\Program Files (x86)\SiteExtensions\Kudu\59.51109.2534\bin\Scripts\starter.cmd build.cmd
It is as simple as a Suave app gets. I hope that this can help others.
Edit
After restarting fresh again (new repo, new web app, new day, new hopes), azure showed a different error which allowed me to figure out the rest. I'll leave the repo so that anyone can see how to deploy the simplest Suave app as an Azure Web App through GitHub
So, after an improvement on the error shown by Azure, I could figure out how to deploy the app.
I had to:
remove .exe from the .gitignore generated by Ionide for Visual Studio Code.
create .deployment
create web.config
modify the build.cmd (I copied it from somewhere else)
modify the build.fsx to perform the correct build
modify the startup file (suave-dummy.fs) to use the correct port
Feel free to check the repo to see what I mean in code. Relevant files:
.gitignore
.deployment
suave-dummy\WebHost\web.config
build.cmd
build.fsx
suave-dummy\suave-dummy.fs
phew!
I have an Orchard CMS website deployed to Windows Azure using Git Deploy from BitBucket.
Just with my latest changes I'm getting an error when I try to deploy:
The process cannot access the file
'C:\DWASFiles\Sites[MyWebsite]\VirtualDirectory0\site\wwwroot\App_Data\Dependencies\Joel.Net.Akismet.dll'
because it is being used by another process.
Given its Azure Websites, I can't "stop the AppPool" or anything like that. I've tried stopping the site, but then I can't do a deployment with the site stopped. I'm out of ideas as to how to troubleshoot further.
Trying to update via ftp
There is no option to "restart" but I can stop and start the site, this does not work (502 web server error).
Deleting the files the the \App_Data\Dependencies folder via ftp does not work, and gets the same error.
Stopping the site and then uploading the files via ftp does work. But trying to redeploy via Git, I get a similar error:
Command: deploy.cmd Handling Basic Web Site deployment. KuduSync.NET
from:
'C:\DWASFiles\Sites[MyWebsite]\VirtualDirectory0\site\repository' to:
'C:\DWASFiles\Sites[MyWebsite]\VirtualDirectory0\site\wwwroot' Error:
The process cannot access the file
'C:\DWASFiles\Sites[MyWebsite]\VirtualDirectory0\site\wwwroot\App_Data\Dependencies\Markdown.dll'
because it is being used by another process. Copying file:
'App_Data\Dependencies\dependencies.compiled.xml' Copying file:
'App_Data\Dependencies\dependencies.xml' Copying file:
'App_Data\Dependencies\Ionic.Zip.dll' Copying file:
'App_Data\Dependencies\Joel.Net.Akismet.dll' Copying file:
'App_Data\Dependencies\Markdown.dll' An error has occurred during web
site deployment. Handling Basic Web Site deployment.
I'm sure its not just the one dll, but rather, all the dlls in the \App_Data\Dependencies folder don't get "stopped" during a Git deployment.
Trying to set up another site on Azure Websites to do the Git Deploy
I have set up another Azure site for Git to deploy the same branch of code to and this works fine.
But when I switch my domain name to the new Azure Website, my new site no longer works, but my old one can accept git deploy.
So the website with my domain name directed at it, must be getting activity causing the update to stop working. Is there a way to stop the site AND do a Git deploy?
So after removing the Dependencies folder from my repo as per #David's comments, I'm getting a new error:
Command: deploy.cmd Handling Basic Web Site deployment. KuduSync.NET
from:
'C:\DWASFiles\Sites[MyWebsite]\VirtualDirectory0\site\repository'
to: 'C:\DWASFiles\Sites[MyWebsite]\VirtualDirectory0\site\wwwroot'
Error: Access to the path 'Joel.Net.Akismet.dll' is denied. Copying
file: '.gitignore' Deleting file:
'App_Data\Dependencies\Joel.Net.Akismet.dll' An error has occurred
during web site deployment. Handling Basic Web Site deployment.
Seems like the Kudu sync is seeing that there are no files in the Dependencies folder, and trying to delete them! The same happens when I have no Dependencies folder at all - it tries to delete the Dependencies folder.
#David is there a kudu ignore file?
SOLVED!
OK I kept at it, and I have finally resolved it.
I deleted the entire app_data folder (backed it up first) then checked this into Git.
This was pushed into Azure, giving me a fresh Orchard site
I then re-added my app_data but chose to ignore the app_data/dependencies folder
pushed to Git and updated to Azure perfectly
Hope my next check in still works (fingers crossed)
I'm guessing that the root of the problem is that you are committing the App_Data\Dependencies folder into your repo. This folder is something that Orchard creates dynamically, and should not be in your repo.
I suspect that if you don't do this (by using .gitignore), everything will work fine and you won't get this error.
You can restart the website just before deployment, which is akin to recycling the app pool. Just hit the restart button from the footer on the dashboard.