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

CH03 - nerd-dinner-web #12

Open
marciogmorales opened this issue Jan 3, 2020 · 2 comments
Open

CH03 - nerd-dinner-web #12

marciogmorales opened this issue Jan 3, 2020 · 2 comments

Comments

@marciogmorales
Copy link

When trying to run the container ch-03-nerd-dinner-web I'm receiving the error below (the same as the last issue):
PS C:\DockerStudy\ch03\ch03-nerd-dinner-web> docker container logs 596bb08cab53

_Invoke-WebRequest : Unable to connect to the remote server
At line:1 char:180

  • ... w3svc; Invoke-WebRequest http://localhost -UseBasicParsing | Out ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:Htt
      pWebRequest) [Invoke-WebRequest], WebException
    • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
      ll.Commands.InvokeWebRequestCommand

Get-Content : Cannot find path 'C:\iislog\W3SVC\u_extend1.log' because it does
not exist.
At line:1 char:291

  • ... t-Null; Get-Content -path 'C:\iislog\W3SVC\u_extend1.log' -Tail 1 ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\iislog\W3SVC\u_extend1.log:S
      tring) [Get-Content], ItemNotFoundException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetCo
      ntentCommand_
@ArranDev
Copy link

@marciogmorales did you manage to get things working?

I was experiencing the same issue, I'm not really sure whats going wrong on lines 42 - 46 but breaking it down:

  • First, it runs ServiceMonitor which monitors the IIS process (w3svc)
  • Then it tries to access the website running on localhost. - 1st error is for this.
  • Then it forces IIS to write the current log to the disk.
  • Lastly, it attempts to show/get the contents of the "C:\iislog\W3SVC\u_extend1.log" file. - 2nd error is for this.

I decided to try and build the image from the source to try to work out what was wrong. First (like with a few of the Dockerfile files in the repository) I needed to update the image to use the mcr.microsoft.com repository:
image

For me, it seems when I ran the image I built (which just has the changes mentioned to use the mcr.microsoft.com repository), it works fine.

As I only get issues if I run the dockeronwindows/ch03-nerd-dinner-web:2e image I'm not sure what's wrong.

@marciogmorales
Copy link
Author

No,
It has been a while since I went through this book. It is a good book, but no support from the author once published.

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