Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception calling "Start" with "0" argument(s): "Address already in use" #4

Open
ziggekatten opened this issue Oct 18, 2019 · 1 comment

Comments

@ziggekatten
Copy link

ziggekatten commented Oct 18, 2019

I have a strange behavior.

Running an OpenFaaS installation, where things works as they shoulh (normally) and we have some functions running on node10-express template as base.

Now, we tried the powershell-http-template.

Procedure:

faas-cli template store pull powershell-http-template
faas-cli new --lang powershell-http psdemo
faas-cli up -f psdemo.yml

It all deploys, running as a service(Docker Swarm), but invoking gives the error:

Exception calling "Start" with "0" argument(s): "Address already in use"
At /server.ps1:20 char:1

  • $listener.Start()
  • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
  • FullyQualifiedErrorId : HttpListenerException

'Exception calling "GetContext" with "0" argument(s): "Cannot access a disposed object.
Object name: 'System.Net.HttpListener'."
At /server.ps1:25 char:5

  • $context = $listener.GetContext()
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
  • FullyQualifiedErrorId : ObjectDisposedException

Exception calling ".ctor" with "2" argument(s): "Value cannot be null.
Parameter name: stream"
At /server.ps1:32 char:5

  • $reader = [System.IO.StreamReader]::new($reqStream, $reqEncoding)
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
  • FullyQualifiedErrorId : ArgumentNullException

You cannot call a method on a null-valued expression.
At /server.ps1:35 char:5

  • $fnContext.Body = $reader.ReadToEnd()
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : InvalidOperation: (:) [], RuntimeException
  • FullyQualifiedErrorId : InvokeMethodOnNull

The property 'StatusCode' cannot be found on this object. Verify that the property exists and can be set.
At /server.ps1:53 char:85

  • ... de = $(If ($fnResponse.Status) {$fnResponse.Status} Else {500}) #defa ...
  •                                                           ~~~
    
  • CategoryInfo : InvalidOperation: (:) [], RuntimeException
  • FullyQualifiedErrorId : PropertyNotFound

The property 'Headers' cannot be found on this object. Verify that the property exists and can be set.
At /server.ps1:56 char:5

  • $response.Headers = $fnResponse.Headers
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : InvalidOperation: (:) [], RuntimeException
  • FullyQualifiedErrorId : PropertyNotFound

The property 'ContentLength64' cannot be found on this object. Verify that the property exists and can be set.
At /server.ps1:57 char:5

  • $response.ContentLength64 = $Content.Length
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : InvalidOperation: (:) [], RuntimeException
  • FullyQualifiedErrorId : PropertyNotFound

You cannot call a method on a null-valued expression.
At /server.ps1:58 char:5

  • $response.OutputStream.Write($Content, 0, $Content.Length)
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : InvalidOperation: (:) [], RuntimeException
  • FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At /server.ps1:59 char:5

  • $response.Close()
    
  • ~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : InvalidOperation: (:) [], RuntimeException
  • FullyQualifiedErrorId : InvokeMethodOnNull

nodejs and go that we runs woks perfectly.

@MnrGreg
Copy link

MnrGreg commented Oct 20, 2019

@ziggekatten see fixes in #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants