1

I have launched my sails.js app to Azure Node.js shared infrastructure. App does not lift due to file permission. Seems like grunt tasks cannot create concatenated files in .tmp directory in the root.

I tried to give write access via FileZilla but it did not worked. When ever I try to hit URL I see file permissions are getting set into default values.

I also did not see any settings to give Folder permissions at Azure Dashboard.

Is there any workaround on this issue?

Error:

** Grunt :: An error occurred. **

------------------------------------------------------------------------ [31mAborted due to warnings.[39m Running "sails-linker:prodJs" (sails-linker) task[24m Autoinsert script tags in an html file [33mWarning: ENOTSUP: operation not supported on socket, scandir 'D:\home\site\wwwroot.tmp\public\concat\production.css' [39m ------------------------------------------------------------------------ Looks like a Grunt error occurred-- Please fix it, then restart Sails to continue running tasks (e.g. watching for changes in assets) Or if you're stuck, check out the troubleshooting tips below. [4mTroubleshooting tips:[24m

*-> Are "grunt" and related grunt task modules installed locally? Run npm install if you're not sure.

*-> You might have a malformed LESS, SASS, CoffeeScript file, etc.

*-> Or maybe you don't have permissions to access the .tmp directory? e.g., D:\home\site\wwwroot\.tmp ?

 If you think this might be the case, try running:
 sudo chown -R YOUR_COMPUTER_USER_NAME D:\home\site\wwwroot\.tmp
Peter Pan
  • 23,476
  • 4
  • 25
  • 43
Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158

1 Answers1

0

According to the error information below, it seems that the sails app default start up for websocket on the port 1337, but the Azure webapp only enable the ports 80 and 443.

Warning: ENOTSUP: operation not supported on socket

There was an SO thread Deploy sails.js to Windows Azure Website that discuss about deploying the sails app on Azure WebApp.

Hope it helps. Best Regards.

Community
  • 1
  • 1
Peter Pan
  • 23,476
  • 4
  • 25
  • 43
  • Thanks for your response. However, I deployed same app to cloud9 and there was no issue and was running on port 80. var port = process.env.PORT || 1337; according to this statement, Azure would have env port as 80 right? – Teoman shipahi Feb 16 '16 at 14:01
  • @Teomanshipahi Only for Azure WebApp, please see https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#network-endpoint-listening. – Peter Pan Feb 17 '16 at 01:23
  • What does it mean? sails.js tries to communicate via inner processes over port another than 80 or 433? Or you were highlighting somewhere else? – Teoman shipahi Feb 17 '16 at 04:16
  • @Teomanshipahi Sorry, the link from Kudu wiki said, "**Network endpoint listening** The only way an application can be accessed via the internet is through the already-exposed HTTP (80) and HTTPS (443) TCP ports; applications may not listen on other ports for packets arriving from the internet." I searched that the sails app default listen on the port 1337 for websocket, but it not be allowed on Azure WebApp. – Peter Pan Feb 17 '16 at 07:13
  • Please see http://sailsjs.org/documentation/reference/configuration/sails-config. Here it is stated as "By default, if it’s set, Sails uses the PORT environment variable. Otherwise it falls back to port 1337. In production, you’ll probably want to change this setting to 80 (http://) or 443 (https://) if you have an SSL certificate." On the other hand, I am getting error on sails/grunt task and not on request pipeline. Meaning, while grunt task wants to minimize files, it cannot write into .tmp folder. It creates files but cannot modify. I see files with 0 bytes. – Teoman shipahi Feb 17 '16 at 14:05
  • @Teomanshipahi On Azure WebApp, you can set environment variables via the `web.config` file or the `Application Settings` of the tab `Configuration` on Azure portal, but only port 80 and 443 are available. For the sails/grunt task, could you supply more information to help analysising the issue? – Peter Pan Feb 19 '16 at 09:53
  • Thanks for your help support, but I did not still get what is the relation with PORTS of Grunt tasks? Grunt tasks are (at least the one in here) nothing related with Ports or Sockets. All it is trying to do is minimize files and put them in correct folder. While it is doing that, it fails writing under .tmp folder. Even if I have some other port than 80, this should not be the issue at all. – Teoman shipahi Feb 19 '16 at 13:35