azure-xplat-cli icon indicating copy to clipboard operation
azure-xplat-cli copied to clipboard

azure servicefabric cluster connect not working

Open JoseFMP opened this issue 8 years ago • 4 comments

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:

  1. 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

JoseFMP avatar Apr 26 '17 02:04 JoseFMP

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; } };

JoseFMP avatar May 01 '17 04:05 JoseFMP

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?

JoseFMP avatar May 03 '17 06:05 JoseFMP

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:

  1. Run azure servicefabric cluster connect to connect to your local cluster as usual. This suceeds
  2. Then run azure servicefabric application package copy /pathMyAppRoot/Debug fabric:ImageStore
  3. 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.

JoseFMP avatar May 03 '17 06:05 JoseFMP

@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

user1m avatar Mar 13 '18 14:03 user1m