none
"Input string was not in a correct format" error

    Question

  • Hi,

    I'm trying to complete the tutorial here: Get started running Excel and SOA workloads on an HPC Pack cluster in Azure

    While trying to run the  'Offload Excel workbooks' example, I get an "Input string was not in a correct format" error on the following line:

    HPCExcelClient.OpenSession headNode:=HPC_ClusterScheduler, remoteWorkbookPath:=HPCWorkbookPath, UserName:="hpc\azureuser", Password:="<YourPassword>"

    Here is my configuration:
    - I created a cluster on Azure using the "HPC Pack cluster for Excel workloads" template.
    - I'm using Excel 2016.
    - I installed the HPC 2012 R2 Update 3 client utilities.
    - I had to manually browse for the "Microsoft.Hpc.Excel" reference in the VBA project.

    Any idea what the issue is?





    Wednesday, August 29, 2018 2:06 PM

All replies

  • Hi,

    Please merge flowing segment into you excel.exe.config in the same dir of your excel.exe. If the .config file doesn't exist, create it instead. Then collect log from the configured place.

    <?xml version="1.0"?> 
    <configuration> 
      <startup useLegacyV2RuntimeActivationPolicy="true"> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
      </startup>
    
    <system.diagnostics>
    <trace autoflush="true" />
        <sharedListeners>  
     <add name="xml"
                  type="System.Diagnostics.XmlWriterTraceListener"
                  initializeData= "c:\TEMP\session.excel.svclog" />
    <add name="xmlc"
                  type="System.Diagnostics.XmlWriterTraceListener"
                  initializeData= "c:\TEMP\session.excelconnector.svclog" />
    
       </sharedListeners>
        <sources>
          <source name="SOA Session API" switchValue="All">
            <listeners>
              <remove name="Default" />
     <add name="xml"/>
            </listeners>
          </source>
    	  <source name="HPC SOA Excel" switchValue="All">
            <listeners>
              <remove name="Default" />
     <add name="xmlc"/>
            </listeners>
          </source>
    
        </sources>
      </system.diagnostics>
    
    </configuration>
    

    Thanks,
    Zihao

    Monday, September 3, 2018 6:52 AM
  • Hello Zihao,

    Here is the content of 'session.excelconnector.svclog':

    <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
      <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>0</EventID>
        <Type>3</Type>
        <SubType Name="Verbose">0</SubType>
        <Level>16</Level>
        <TimeCreated SystemTime="2018-09-04T12:45:08.4059686Z" />
        <Source Name="SOA Session API" />
        <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
        <Execution ProcessName="EXCEL" ProcessID="16684" ThreadID="1" />
        <Channel/>
        <Computer>DESKTOP-LQS648KS</Computer>
      </System>
      <ApplicationData>[Session:Unknown] Start to create session for on-premise cluster. IsDurable = False, RetryCount = 1, AskForCredentialTimes = 0, TimeCost = 09/04/2018 14:50:08</ApplicationData>
    </E2ETraceEvent>
    <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
      <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>0</EventID>
        <Type>3</Type>
        <SubType Name="Verbose">0</SubType>
        <Level>16</Level>
        <TimeCreated SystemTime="2018-09-04T12:45:08.4639707Z" />
        <Source Name="SOA Session API" />
        <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
        <Execution ProcessName="EXCEL" ProcessID="16684" ThreadID="1" />
        <Channel/>
        <Computer>DESKTOP-LQS648KS</Computer>
      </System>
      <ApplicationData>Start to upload data files to Azure blob</ApplicationData>
    </E2ETraceEvent>
    <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
      <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>0</EventID>
        <Type>3</Type>
        <SubType Name="Verbose">0</SubType>
        <Level>16</Level>
        <TimeCreated SystemTime="2018-09-04T12:45:08.6834984Z" />
        <Source Name="SOA Session API" />
        <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
        <Execution ProcessName="EXCEL" ProcessID="16684" ThreadID="1" />
        <Channel/>
        <Computer>DESKTOP-LQS648KS</Computer>
      </System>
      <ApplicationData>Source file D:\Excel\Upload\Test.xlsb md5: 1D4007420E0B79282DACA59C13096972</ApplicationData>
    </E2ETraceEvent>

    There wasn't a 'session.excel.svclog' file.

    Thanks,

    Julien


    Tuesday, September 4, 2018 1:57 PM
  • Hello Zihao,

    I also asked a few questions on the related GitHub issue here: "Input string was not in a correct format" error

    Thanks,

    Julien

    Thursday, September 6, 2018 11:41 AM
  • Hi Julien,

    Sorry for the late reply.

    From you log, the error is possibly thrown from SOA data or Session service. To check both parts, could you please:

    • Add new trace source in your excel.exe.config, and then repro
    <source name="SOA Data" switchValue="All">
            <listeners>
              <remove name="Default" />
              <add name="xml"/>
            </listeners>
     </source>

    • Collect session log (%CCP_LOGROOT_SYS%SOA\HpcSession_*.bin) from your head node.  Please collect at least 10 log files after repro.

    Thanks,
    Zihao

    Friday, September 7, 2018 2:27 AM
  • Hi Zihao,

    I added the trace listener, but there was no additional information in the log file.

    Here is a link to the shared folder where you can get the test workbook I'm using.

    https://1drv.ms/f/s!Ak_Jr5xyAiNqhYNFqcItxbNGQmnkaQ

    I also included the session logs from the head node, but they don't seem to have been modified. By the way, how can I read those?

    Here is also a follow up of the conversation started on GitHub with you:

    1. We'll suggest you use ARM template. But both ways should work. -> OK, I will try it next week

    2. It means you'll go through different pages (ARM template pages vs market place pages). -> OK
    3. As long as your head node is not also a compute node, no. -> OK
    4. Just to check if the cert is in client machine's Cert:\CurrentUser\Root. -> Sorry, but I don't know what that path references. Is it the same as [Certificates - Current User\Trusted Root Certification Authorities\Certificates]?
    5. Yes. HPC Cluster Manager cannot connect to a remote Azure cluster. Use Job Manager instead pease. -> I tried it, but I get the same error message (see screenshot in shared folder).
    6. If you are following this documentation, uploading is taken care of. -> OK

    Thanks for your help,

    Julien



    Friday, September 7, 2018 1:15 PM
  • Hi Julien,

    I read your xl work book, there is a line

    HPCExcelClient.Initialize ActiveWorkbook, HPC_DependFiles

    But the variable HPC_DependFiles is not set anywhere. Instead, a variable named HPC_UploadPath is set but not used any where. Please fix these two issues according to our examples.

    4. Yes.

    5. Let's check 4 first. It the issue still exists, I will ask my team for help.

    P.S. If you are willing to try out HPC Pack 2016 and Excel 2016 with ARM template, I can share you a tutorial for that.

    Thanks,
    Zihao

    Monday, September 10, 2018 2:44 AM
  • Hi Zihao,

    The variable HPC_DependFiles is set right before calling HPCExcelClient.Initialize (it uses the HPC_UploadPath variable):

    HPC_DependFiles = HPC_UploadPath & Application.PathSeparator & ActiveWorkbook.name & "=" & ActiveWorkbook.name
    
    ' Initialize the excel client object with the current workbook
    'HPCExcelClient.Initialize ActiveWorkbook
    HPCExcelClient.Initialize ActiveWorkbook, HPC_DependFiles

    (I modified it a bit w.r.t. the tutorial)

    4. See "Certificates.png".

    7. In the I references of the VBA editor, I had to manually add "Microsoft.Hpc.Excel.tlb". Can you confirm it's the correct one (see "References.png")?

    As for trying out HPC Pack 2016 and Excel 2016 with ARM template, my client is using Excel 2013 so I'd rather use that.

    Thanks,

    Julien


    Monday, September 10, 2018 11:48 AM
  • Hi Julien,

    I changed a line in your xlsb to

    HPCWorkbookPath = ActiveWorkbook.name

    And everything is working fine on my environment. If you still encountering errors, please try running our sample workbook first for trouble shooting.

    4. Yes the cert is in right place

    5. It may be related with TLS 1.2. Please add following reg key and retry

    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\.NETFramework\\v4.0.30319]
    "SchUseStrongCrypto"=dword:00000001
     
    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\.NETFramework\\v4.0.30319]
    "SchUseStrongCrypto"=dword:00000001

    Thanks,
    Zihao

    Tuesday, September 11, 2018 5:38 AM
  • Hi Zihao,

    I tried again with the change you suggested, but I still get the same error (see "HPC Calculation Error.png").

    I also tried with the sample workbook from the article but I get the exact same error (I added it to the shared folder).

    4. I tried re-importing the certificate, but I still get the same error when I try to connect with the HPC Job Manager.

    5. I added the keys to the registry, still the same error.

    7. ?

    8. My client computer runs Windows 10 with the latest updates. Although I'm located in Belgium, my system, as well as my regional settings are set to English. I'm giving you this info because the error message I get often occurs when trying to parse a number with the wrong decimal symbol. I don't know if it's related though...

    I don't think the issue is related to the cluster itself because I get the error even if the head node is turned off.

    Any other ideas?

    Thanks,

    Julien
    Wednesday, September 12, 2018 5:42 AM
  • Hi Julien,

    Can you check if there is anything in the event log Application and Services Logs/Microsoft/Excel ?

    5. I can find some suggested solutions on Stackoverflow, could you check if any of them can work for you?

    https://stackoverflow.com/questions/37925505/a-call-to-sspi-failed-see-inner-exception-the-local-security-authority-cannot

    https://stackoverflow.com/questions/34633972/wcf-a-call-to-sspi-failed-see-inner-exception

    7. Yes it is correct

    8.We also believe it is a client side issue. Let's find the clue about what is going on in the client machine.

    Thanks,
    Zihao

    Wednesday, September 12, 2018 6:41 AM
  • I also also added the WCF trace source in excel.exe.config.

    The result of the trace is in the shared folder (session.excel.svclog).

    Wednesday, September 12, 2018 6:53 AM
  • Hi Julien,

    I read session.excel.svcloglog. There is no unexpected errors in it.

    Thanks,
    Zihao

    Wednesday, September 12, 2018 7:12 AM
  • Hi Zihao,

    I was able to go a bit further in the execution, but it still does not work.

    Thanks to the event viewer, I was able to track down the issue to the username (osef.admin). Apparently, the '.' is not allowed when uploading to Azure storage (it's related to `DataClientId` in the code).

    So I re-created a cluster with a correct username and tried again. (BTW, I confirm that the certificate is correctly installed because I got an exception when it wasn't.)

    Now, the original error seems to be resolved.

    However, I get another error: "System.UnauthorizedAccessException: Access to the path '\\osef\Runtime$\SOA\UserJobs\osefadmin\osefadmin_9B47933EDA3586C0DAAB785EE12784B3' is denied." (see UnauthorizedAccessException.PNG, UnauthorizedAccessException.evtx for the full stack trace, and session.excel.svcloglog for the result of the trace).

    There also seem to have a related error in [Windows Logs/System]: "A fatal error occurred while creating a TLS client credential. The internal error state is 10013." (sse WindowsLogs-System-Error.evtx).

    All in all, it looks like the error is related to TLS (both from Excel and from HPC Job Manager).

    I tried the manipulation of the registry from the SO answers you linked, both on the server and the client, but that didn't work (I had already tried the first one).

    Hopefully, the new error messages and logs can hint you to a solution...

    I'm glad we were able to make some progress on this.

    Thanks,
    Julien

    Wednesday, September 12, 2018 11:01 AM
  • P.S.: I forgot to mention that the folder was empty on the server (see UserJobs.png).
    Wednesday, September 12, 2018 11:03 AM
  • I tried applying the fix from A fatal error occurred while creating an SSL client credential. The internal error state is 10013.
    It seems the HPC Job Manager is now able to reach the head node, but that also makes the Job Scheduler and Node Manager services fail to start with "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms." (see JobScheduler.evtx).

    Wednesday, September 12, 2018 12:16 PM
  • RijndaelManaged is not compliant with FIPS. To work around, add the following to the HpcNodeManager.exe.config, and hpcscheduler.exe.configure

      <runtime>

        <enforceFIPSPolicy enabled="false"/>

      </runtime>


    Qiufang Shi

    Thursday, September 13, 2018 12:00 AM
  • Hi Julien,

    Please try Qiufang's advice for the FIPS issue.

    Seems the session launcher service cannot access the file share in \\osef\Runtime$\SOA. As this is a brand new cluster, it should not because ACL setting error. Can you verify your user name that it includes the domain part? (e.g. hpc\hpcadmin instead of hpcadmin)

    If your username is with domain name and still not working, please share us your session launcher's log files.

    Thanks,
    Zihao

    Thursday, September 13, 2018 1:54 AM
  • Hi Zihao,
    Hi Qiufang,

    Do you have any idea what is causing this kind of complexity?
    Is it because I'm running Windows 10 on the client?

    Thanks,
    Julien

    Thursday, September 13, 2018 2:01 PM