My network environment is a follows. I have a Windows Server 2016 domain controller and a member server.
On the member server I have IIS and Visual Studio 2019 installed.
I created a webapi in VS2019 that writes data to a SQL server. I am using Postman for testing.
Everyting works fine when I runt postman on the member server and on the DC. However when I run postman from my workstation which is NOT a member of the domain I get error 500.
Below is a snipit from the IIS log.
192.168.100.222 is my DC
192.168.100.10 is my stand alone Windows 10 workstation.
2020-11-02 15:31:13 ::1 POST /api/SleepDiary sSleepGuy=guy2#there.com&sPilotName=Rick%20Doe 80 - ::1 PostmanRuntime/7.26.5 - 204 0 0 834
2020-11-02 15:31:52 192.168.100.223 POST /api/SleepDiary sSleepGuy=guy2#there.com&sPilotName=Rick%20Doe 80 - 192.168.100.222 PostmanRuntime/7.26.5 - 204 0 0 16
2020-11-02 15:32:14 192.168.100.223 POST /api/SleepDiary sSleepGuy=guy1#there.com&sPilotName=Rick%20Doe 80 - 192.168.100.10 PostmanRuntime/7.26.8 - 500 0 0 225
Related
I tried to set up API Platform on my local machine to explore it.
I tried to performed all the operations according to API Platform's "Getting Started" page. So I downloaded the latest offical distribution which happens to be v2.4.2 (https://github.com/api-platform/api-platform/releases/tag/v2.4.2) and I started it using Docker.
I cannot however access the administration backend at http://localhost:81 receiving "Unable to retrieve API documentation."
I searched for help at https://api-platform.com/docs/admin/getting-started/, but it describes steps that seems to be already done in the distribution
How can I enable the admin component or debug what went wrong?
Edit (2019-04-14)
$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
40a5d5213cfe quay.io/api-platform/nginx "nginx -g 'daemon of…" 45 hours ago Up 6 minutes 0.0.0.0:8080->80/tcp apiplatformdemo_api_1
d53711c0ba0c quay.io/api-platform/php "docker-entrypoint p…" 45 hours ago Up 6 minutes 9000/tcp apiplatformdemo_php_1
2d4eb8d09e3e quay.io/api-platform/client "/bin/sh -c 'yarn st…" 45 hours ago Up 6 minutes 0.0.0.0:80->3000/tcp apiplatformdemo_client_1
abe3e3b41810 quay.io/api-platform/admin "/bin/sh -c 'yarn st…" 45 hours ago Up 6 minutes 0.0.0.0:81->3000/tcp apiplatformdemo_admin_1
4596a7f81cd8 postgres:10-alpine "docker-entrypoint.s…" 45 hours ago Up 6 minutes 0.0.0.0:5432->5432/tcp apiplatformdemo_db_1
c805fc2f11c9 dunglas/mercure "./mercure" 45 hours ago Up 6 minutes 443/tcp, 0.0.0.0:1337->80/tcp apiplatformdemo_mercure_1
Edit 2 (2019-04-14)
It is worth mentioning that although the API component at http://localhost:8080 works, the HTTPS variant at https://localhost:8443 does not. (Connection refused if I try to telnet it.)
Now it turned out it escaped my notice earlier that there is a message in the JS console saying there was a failed connection to https://localhost:8443. (It says about CORS, but I think the real reason is 8443 simply refuses connection). So although I entered the HTTP variant of Admin at http://localhost:81 it tried to access the API via HTTPS. What could be the reason HTTPS doesn't work?
Edit 3 (2019-04-15)
After looking into the logs of docker compose, I see it is relevant the Varnish container failed. h2-proxy depends on it and it is h2-proxy that governs the 8443 port.
cache-proxy_1 | Error:
cache-proxy_1 | Message from VCC-compiler:
cache-proxy_1 | Expected return action name.
cache-proxy_1 | ('/usr/local/etc/varnish/default.vcl' Line 67 Pos 13)
cache-proxy_1 | return (miss);
cache-proxy_1 | ------------####--
cache-proxy_1 |
cache-proxy_1 | Running VCC-compiler failed, exited with 2
cache-proxy_1 | VCL compilation failed
apiplatform242_cache-proxy_1 exited with code 2
h2-proxy_1 | 2019/04/15 08:09:17 [emerg] 1#1: host not found in upstream "cache-proxy" in /etc/nginx/conf.d/default.conf:58
h2-proxy_1 | nginx: [emerg] host not found in upstream "cache-proxy" in /etc/nginx/conf.d/default.conf:58
apiplatform242_h2-proxy_1 exited with code 1
I have solved this error by getting API Platform by cloning the current master and not download the tar.tgz release version (2.4.2)
git clone https://github.com/api-platform/api-platform.git
docker-compose build
docker-compose up -d
Works like a charm !
I'm developing a Node App. I need https for receiving callback URLs from 3rd party Apps. So I added SSL certificate.
ngrok works only with http URL (http://localhost:3000).
I'm using the command ngrok http 3000. But when I access ngrok https URL, I'm getting 502 Bad Gateway error in browser.
How do I make ngrok work with https://localhost:3000 URL.
If you are using for signup or login with google/facebook then I can suggest you another way. You can use
https://tolocalhost.com/
configure how it should redirect a callback to your localhost. This is only for development purposes.
ngrok can itself provide https support - this is one of its major use cases (at least for me) so you don't need to create any ssl certificates
Step-by-step guide
Here's a simple testing file:
$ cat t.html
<body>
<h1>test</h1>
</body>
Bringing it up a simple http server on localhost:
python -m SimpleHTTPServer 7070
Running ngrok
$ ngrok http 7070
grok by #inconshreveable (Ctrl+C to quit)
Session Status online
Session Expires 7 hours, 59 minutes
Update update available (version 2.2.8, Ctrl-U to update)
Version 2.2.4
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://4580e823.ngrok.io -> localhost:7070
Forwarding https://4580e823.ngrok.io -> localhost:7070
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
Checking
curl -D - https://4580e823.ngrok.io/t.html
HTTP/1.0 200 OK
Server: SimpleHTTP/0.6 Python/2.7.10
Date: Tue, 23 Oct 2018 20:03:45 GMT
Content-type: text/html
Content-Length: 33
Last-Modified: Tue, 23 Oct 2018 19:53:09 GMT
Connection: keep-alive
<body>
<h1>test</h1>
</body>
That's it
I've got GitLab 10.5.6. I'd like to use Health Check information in my monitoring system. I can configure it by using Health Check endpoints with health check access token, but as this solution is depracated, I want to use IP whitelist. And I have some problems with it.
According to this article https://docs.gitlab.com/ee/administration/monitoring/ip_whitelist.html I edited /etc/gitlab/gitlab.rb and added this line (as this GitLab was installed around version 7 or even older I think):
gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '192.168.0.1', 'X.X.X.X', 'Y.Y.Y.Y']
where X.X.X.X is IP of my computer and Y.Y.Y.Y is IP of server with GitLab. After it I executed reconfiguration (gitlab-ctl reconfigure). And started tests... Below logs are from production.log file.
Execution of curl http://127.0.0.1:8888/-/readiness on server Y.Y.Y.Y returns proper JSON with expected data:
Started GET "/-/readiness" for 127.0.0.1 at 2018-03-24 20:01:31 +0100
Processing by HealthController#readiness as /
Completed 200 OK in 27ms (Views: 0.6ms | ActiveRecord: 0.5ms)
Execution of curl http://Y.Y.Y.Y:8888/-/readiness on server Y.Y.Y.Y returns error:
Started GET "/-/readiness" for Y.Y.Y.Y at 2018-03-24 21:20:04 +0100
Processing by HealthController#readiness as /
Filter chain halted as :validate_ip_whitelisted_or_valid_token! rendered or redirected
Completed 404 Not Found in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)
Accessing address http://Y.Y.Y.Y:8888/-/readiness through Firefox browser on computer X.X.X.X returns error:
Started GET "/-/readiness" for X.X.X.X at 2018-03-24 20:03:04 +0100
Processing by HealthController#readiness as HTML
Filter chain halted as :validate_ip_whitelisted_or_valid_token! rendered or redirected
Completed 404 Not Found in 2ms (Views: 0.8ms | ActiveRecord: 0.0ms)
Accessing address http://Y.Y.Y.Y:8888/-/readiness?token=ZZZZZZZZZZZZZ through Firefox browser on computer X.X.X.X returns proper JSON with expected data.
I don't have any idea what I can check more. Maybe there's lack of any more configuration in /etc/gitlab/gitlab.rb as it's quite old GitLab instance.
I'm setting up a WebDAV server in my Windows 7 desktop, using IIS 7.5. The aim is for a WebDAV client app in my Iphone to be able to access and sync a series of files in a given folder in the PC. It's all in my own home network, and I'll be the only one syncing files.
Anyway, I've set everything up, but here is something really odd:
If I create a file in my Iphone, and then sync it to the Windows desktop, and then delete it in my Iphone... it deletes the file in the Windows desktop the next time I sync, as it should.
But if I create a file in my PC, sync it to my Iphone, and then delete it in my Iphone, the next time I sync it won't delete the file in the PC. It will return the HTTP error code 412 (Precondition failed).
I have enabled tracing in IIS, and looking at the request headers, I don't see the WebDAV client sending any precondition. Here is what it says:
Data about the HTTP request:
SiteId 1
AppPoolId DefaultAppPool
ConnId 1610612964
RawConnId 0
RequestURL http://192.168.1.111:80/Notebooks/filename.txt
RequestVerb DELETE
Request headers:
Headers Connection: keep-alive
Content-Length: 0
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: es-es
Host: 192.168.1.111
If-Modified-Since: Wed, 07 Oct 2015 19:37:37 GMT
If-None-Match: "1ab8c9f371d11:0"
User-Agent: Notebooks 8.1.2 ( iPhone; iOS 8.4.1; es_ES)
And here is the only thing that the module says in its warning message:
ModuleName WebDAVModule
Notification 128
HttpStatus 412
HttpReason Precondition Failed
HttpSubStatus 0
ErrorCode 0
ConfigExceptionInfo
Notification EXECUTE_REQUEST_HANDLER
ErrorCode The operation was correctly completed. (0x0)
The above were the errors shown in IIS tracing. As for the regular Web server log:
192.168.1.230 - (my PC name) [07/Oct/2015:23:13:59 +0200] "PROPFIND /Notebooks/filename.txt HTTP/1.1" 207 509
192.168.1.230 - (my PC name) [07/Oct/2015:23:13:59 +0200] "DELETE /Notebooks/filename.txt HTTP/1.1" 412 1738
I have been in touch with the developer of the Iphone WebDAV client, and he says that, in his experience, this tends to suggests permission problems, but I have checked the permissions of the files in Windows, and they are fine. By this I mean that I check the files that I can delete from WebDAV, and then the ones that give me the 412 error... and both have identical permissions.
What else could it be?
I have an existing ClickOnce application which began to time-out during initial installation on new clients. I'm not sure if it is my IIS configuration or an external factor. The Windows Server 2003 is configured with the ".application" MIME type of "application/x-ms-application" and this hasn't changed. Directly running the .application file from a UNC share path works on the client machine. Also, a client which already had the ClickOnce application installed can successfully update with a new version. I must be overlooking something, so I thought I'd put it out there. It really seems to point to the MIME type, however I even tried to add a wildcard "*" type of "octet/stream".
dgp
Timeout message
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://{server}/{rootpath}/{appname}.application resulted in exception. Following failure messages were detected:
+ Downloading http://{server}/{rootpath}/{appname}.application did not succeed.
+ The operation has timed out
Details
OPERATION PROGRESS STATUS
* [2/29/2012 8:25:22 AM] : Activation of http://{server}/{rootpath}/{appname}.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [2/29/2012 8:27:02 AM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading http://{server}/{rootpath}/{appname}.application did not succeed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
After running WireShark I can confirm the MIME type on the client and see a successful HTTP 200. Not sure about the iden-ralp conversation.
38 47.798381 {server IP} {client IP} HTTP 94 HTTP/1.1 200 OK (application/x-ms-application)
39 47.798394 {client IP} {server IP} TCP 54 iden-ralp > http [ACK] Seq=2519 Ack=23684 Win=65535 Len=0
45 112.804146 {client IP} {server IP} TCP 54 iden-ralp > http [RST, ACK] Seq=2519 Ack=23684 Win=0 Len=0