azure-xplat-cli
azure-xplat-cli copied to clipboard
azure servicefabric cluster connect not working
CLI Version: several versions tried out, same problem OS Type: Windows. In Linux it is working fine. Installation via: tried npm, github repo and windows installer
Mode: ARM
Environment: not sure...
Description:
azure servicefabric cluster connect http://myclusssteeer.com:19080
pops the message:
Cannot open the servicefabric config file. Please connect to the cluster by invoking the cluster connect command.
Steps to reproduce:
- Run
azure servicefabric cluster connect http://myclusssteeer.com:19080
Error stack trace:
error: Cannot open the servicefabric config file. Please connect to the cluster by invoking the cluster connect command. error: Error information has been recorded to ... error: servicefabric cluster connect command failed
I added some logs messages to debug this issue.
It comes down to a library missing:
Exception: TypeError: Object #<Object> has no method 'access'
In file serviceFabricUtils._js,
exports.isFileExist = function (filePath, _) { try { fs.access(filePath, fs.F_OK, _); return true; } catch (e) { console.log('Exception checking if file exists. File: ' + filePath); console.log('Exception: ' + e); return false; } };
The problem here was that the version of nodejs installed was too old, not yet having .access method in fs. There shoulnd't be a warning or something if nodejs version is too old?
Follow up on this issue: CLI Version: 0.10.12 0.10.13 OS Type: Win and Linux Ubuntu Installation via: 0.10.12 tried npm and cloning the repo, 0.10.13 tried cloning the repo Mode: ARM
Environment: AzureCloud/Azure Stack
Description:
Registering the application towards local cluster fails with error:
{"Error":{"Code":"FABRIC_E_FILE_NOT_FOUND","Message":"The Application Manifest file 'Debug\\ApplicationManifest.xml' is not found in the store."}}
If I use a cluster freshly set-up in Azure it works fine. However with the local cluster it fails. Is there something different in the way the local cluster handles the copied files?
Steps to reproduce:
- Run
azure servicefabric cluster connectto connect to your local cluster as usual. This suceeds - Then run
azure servicefabric application package copy /pathMyAppRoot/Debug fabric:ImageStore - Then run
azure servicefabric application type register Debug
Error stack trace:
- Register application type error: {"Error":{"Code":"FABRIC_E_FILE_NOT_FOUND","Message":"The Application Manifest file 'Debug\ApplicationManifest.xml' is not found in the store."}} error: Error information has been recorded to /root/.azure/azure.err error: servicefabric application type register command failed
But the file is really there in the package. Also works in Azure so it has to be really there.
I can see the local cluster is copying files to the hard disk when I do the package copy operation, i.e. I see it copies the files to C:\SfDevCluster\Data However I noticed the files have a random generated name, based on a hash I assume. How is servicefabric supposed to know the original name and folder structure of the updated package?
I tried also using store connection strings with file: but no success either.
@Jose-CF did you solve this? I'm running into similar issues using sfctl.
Running > sfctl application provision --application-type-build-path Voting --debug --verbose
I get the following...
(FABRIC_E_FILE_NOT_FOUND) The Application Manifest file 'Voting/ApplicationManifest.xml' is not found in the store.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/knack/cli.py", line 125, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/lib/python2.7/site-packages/knack/invocation.py", line 85, in execute
cmd_result = parsed_args.func(params)
File "/usr/local/lib/python2.7/site-packages/knack/commands.py", line 67, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/knack/commands.py", line 123, in _command_handler
result = op(client, **command_args) if client else op(**command_args)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/azure/servicefabric/service_fabric_client_ap_is.py", line 2696, in provision_application_type
raise models.FabricErrorException(self._deserialize, response)
FabricErrorException: (FABRIC_E_FILE_NOT_FOUND) The Application Manifest file 'Voting/ApplicationManifest.xml' is not found in the store.
(FABRIC_E_APPLICATION_TYPE_NOT_FOUND) Application type and version not found
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/knack/cli.py", line 125, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/lib/python2.7/site-packages/knack/invocation.py", line 85, in execute
cmd_result = parsed_args.func(params)
File "/usr/local/lib/python2.7/site-packages/knack/commands.py", line 67, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/knack/commands.py", line 123, in _command_handler
result = op(client, **command_args) if client else op(**command_args)
File "/usr/local/lib/python2.7/site-packages/sfctl/custom_app.py", line 251, in create
client.create_application(app_desc, timeout)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/azure/servicefabric/service_fabric_client_ap_is.py", line 3158, in create_application
raise models.FabricErrorException(self._deserialize, response)
FabricErrorException: (FABRIC_E_APPLICATION_TYPE_NOT_FOUND) Application type and version not found