1. Sanjay B
  2. PowerServer
  3. Wednesday, 30 June 2021 22:43 PM UTC

Error dialog while accessing the app from the browser to install the launcher for first time. Also tried closing PB before trying browser launcher install but no luck:

PowerBuilder application execution error (R0222)

Application terminated.

Error: Cannot connect to server when creating the session.

 

I launched PowerBuilder 2021 beta as administrator and deployed the app to remote IIS server.

I'm getting the above error while accessing the app from the browser to install the launcher probably due to the "Compile & Run Web APIs" errors below:

 

info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]

      User profile is available. Using 'D:\Users\Sanjay\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.

info: System.Net.Http.HttpClient.PowerServer.LogicalHandler[100]

      Start processing HTTP request GET https://apips.appeon.com/

info: System.Net.Http.HttpClient.PowerServer.ClientHandler[100]

      Sending HTTP request GET https://apips.appeon.com/

info: System.Net.Http.HttpClient.PowerServer.ClientHandler[101]

      Received HTTP response headers after 234.2772ms - 407

info: System.Net.Http.HttpClient.PowerServer.LogicalHandler[101]

      End processing HTTP request after 251.0256ms - 407

info: System.Net.Http.HttpClient.PowerServer.LogicalHandler[100]

      Start processing HTTP request GET https://apipsoa.appeon.com/

info: System.Net.Http.HttpClient.PowerServer.ClientHandler[100]

      Sending HTTP request GET https://apipsoa.appeon.com/

info: System.Net.Http.HttpClient.PowerServer.ClientHandler[101]

      Received HTTP response headers after 106.819ms - 407

info: System.Net.Http.HttpClient.PowerServer.LogicalHandler[101]

      End processing HTTP request after 107.0852ms - 407

info: System.Net.Http.HttpClient.PowerServer.LogicalHandler[100]

      Start processing HTTP request GET https://apips.appeon.com/health

info: System.Net.Http.HttpClient.PowerServer.ClientHandler[100]

      Sending HTTP request GET https://apips.appeon.com/health

info: System.Net.Http.HttpClient.PowerServer.ClientHandler[101]

      Received HTTP response headers after 4.2414ms - 407

info: System.Net.Http.HttpClient.PowerServer.LogicalHandler[101]

      End processing HTTP request after 4.428ms - 407

fail: PowerServer[0]

      Response status code does not indicate success: 407 (authenticationrequired).

System.Net.Http.HttpRequestException: Response status code does not indicate success: 407 (authenticationrequired).

   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()

   at System.Net.Http.HttpClient.GetStringAsyncCore(Task`1 getTask)

   at   ..MoveNext()

fail: PowerServer[300001]

      Failed to connect to the license server.

crit: Microsoft.AspNetCore.Server.Kestrel[0]

      Unable to start Kestrel.

System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions.

   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)

   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.Sockets.Socket.Bind(EndPoint localEP)

   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()

   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)

   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass21_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)

   at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context)

   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context)

   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)

   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)

Unhandled exception. System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions.

   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)

   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.Sockets.Socket.Bind(EndPoint localEP)

   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()

   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)

   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass21_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)

   at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context)

   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context)

   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)

   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)

   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)

   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)

   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)

   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)

   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)

   at RestApi.Program.Main(String[] args) in C:\C#\Sales\PowerServer\ServerAPIs\Program.cs:line 19

Press any key to continue . . .

Please help

TIA

David Xiong @Appeon Accepted Answer Pending Moderation
  1. Friday, 2 July 2021 11:05 AM UTC
  2. PowerServer
  3. # 1

Hi Sanjay,

I suspect whether you are using the same port for both the App files and the Web APIs. Please note that a PowerServer project is consists of the App files and the Web APIs. You can use the default 80 port for the App files and another port for the Web API.

As shown below, you will have different port numbers in the App URL on the Run Options tab and the Web API URL on the Web APIs tab, where the port for the App URL should match your IIS Server.

 

 

Regards,

David

 

 

 

Comment
  1. Sanjay B
  2. Saturday, 3 July 2021 21:29 PM UTC
I mistakenly Removed the previous comment and re-posted the comment (just so you know).
  1. Helpful
  1. David Xiong @Appeon
  2. Monday, 5 July 2021 09:57 AM UTC
Please open a ticket through our support portal at https://www.appeon.com/standardsupport/newbug and we will schedule a remote meeting to check the issue on your machine.
  1. Helpful
  1. Sanjay B
  2. Tuesday, 6 July 2021 00:44 AM UTC
Created ticket.

Thanks!
  1. Helpful
There are no comments made yet.
Sanjay B Accepted Answer Pending Moderation
  1. Thursday, 1 July 2021 15:49 PM UTC
  2. PowerServer
  3. # 2

I setup a new website in IIS with port 5009, configured Web APIs tab with http://localhost:5009 and when I tried to Compile & Publish Web APIs, I got the exact, same errors and also cannot run the app from within PB or the browser to install the launcher.

Windows 10, PB 2021 beta

Please help

Comment
There are no comments made yet.
David Xiong @Appeon Accepted Answer Pending Moderation
  1. Thursday, 1 July 2021 05:48 AM UTC
  2. PowerServer
  3. # 3

Hi Sanjay,

 

This issue may be caused by the fact that another program has taken the port used by the Web APIs. Please check the port setting for the Web API URL on the Web APIs tab of the PowerServer Project. You can try to change it to an unused port and then redeploy your application to verify whether it resolves your issue.

 

Regards,

David

Comment
  1. Sanjay B
  2. Thursday, 1 July 2021 16:19 PM UTC
The errors indicate auth errors and connection to license server issues:



fail: PowerServer[0]



Response status code does not indicate success: 407 (authenticationrequired).



System.Net.Http.HttpRequestException: Response status code does not indicate success: 407 (authenticationrequired).





fail: PowerServer[300001]



Failed to connect to the license server.





crit: Microsoft.AspNetCore.Server.Kestrel[0]



Unable to start Kestrel.



  1. Helpful
  1. Sanjay B
  2. Thursday, 1 July 2021 18:53 PM UTC
Tried on another PC with identical setup but this time, it gets stuck after the following first log message in the console and does NOT complete compile/run Web APIs:



info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]

User profile is available. Using 'C:\Users\Sanjay\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest





Anybody?
  1. Helpful
  1. Sanjay B
  2. Thursday, 1 July 2021 21:41 PM UTC
Got some errors when tried to access localhost/sales:

It needed write access to "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files"



After giving access, got the following errors:



Cloud App Launcher dialog (Cannot copy error message to clipboard. Can you please allow us to copy the error text from this dialog?)



Application terminated.

[Detail] [OK] buttons



NOTE: These files do exist in the path but for some reason/glitch, the app is unable to download them.



ERROR [17244] Application terminated.

ERROR [14908] Failed to download the file. URL: http://<ip-address>/Sales/deploylist.ini.zip. Error description: Couldn't connect to server.(curl error code: 7) .

ERROR [14908] Failed to download the file. URL: http://<ip-address>/CloudAppPublisher/CloudAppInstall/LauncherSetup.json, Error description: Couldn't connect to server.(curl error code: 7) .



INFO [10940] Application command line parameter:

INFO [10940] Application name: Sales

INFO [10940] Application path:

INFO [10940] Application server port: 80

INFO [10940] Application host name: <ip-address>

INFO [10940] Application protocol: http

INFO [10940] Application command line parameter: C:\Users\Sanjay\AppData\Local\Launcher\CloudAppShell.exe cloudapp://http://<ip-address>/Sales

INFO [17244] Application command line parameter: C:\Users\Sanjay\AppData\Local\Launcher\CloudAppShell.exe cloudapp://http://<ip-address>/Sales

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.