My C# Systemd service show inactive(dead) after starting - c#

I made a .sh file to run my c# service.
Inside sh file folder setup is
#!/bin/bash
/usr/bin/dotnet /opt/aid-dotnet/publish/IncidentDetection.dll
And My Service file is in
/etc/systemd/system
Name of service is sharpradar.service
[Unit]
Description=CSHARPSERVICE
[Service]
Type=forking
ExecStart= dotnet IncidentDetection.dll
WorkingDirectory=/opt/aid-dotnet/netcoreapp3.1/
Restart=on-abort
RemainAfterExit=yes
KillSignal=SIGINT
SyslogIdentifier=dotnet-example
Environment=AMQP_USERNAME=test
Environment=AMQP_PASSWORD=test123654
Environment=AMQP_HOST=192.168.2.181
Environment=AID_ID=3
Environment=ASPNETCORE_ENVIRONMENT=Development
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
But when I start my service I get this message
systemctl status sharpradar.service
● cshradar.service - CSHARPSERVICE
Loaded: loaded (/etc/systemd/system/cshradar.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2023-01-25 15:57:46 IST; 1h 22min ago
Process: 20016 ExecStart=/usr/bin/dotnet IncidentDetection.dll (code=exited, status=0/SUCCESS)
Jan 25 15:56:37 aidmain-Standard-PC-i440FX-PIIX-1996 dotnet-example[20016]: 01/25/2023 15:56:37 [INF] Connected to
configuration request queue.
Jan 25 15:56:37 aidmain-Standard-PC-i440FX-PIIX-1996 dotnet-example[20016]: 01/25/2023 15:56:37 [INF] Connected to
congfiguraiton queue for AID_ID = 3.
Jan 25 15:56:37 aidmain-Standard-PC-i440FX-PIIX-1996 dotnet-example[20016]: 01/25/2023 15:56:37 [INF] Requesting
configuration for AID_ID = 3.
Jan 25 15:56:37 aidmain-Standard-PC-i440FX-PIIX-1996 dotnet-example[20016]: 01/25/2023 15:56:37 [INF] Received new
configuration.
Jan 25 15:56:37 aidmain-Standard-PC-i440FX-PIIX-1996 dotnet-example[20016]: 01/25/2023 15:56:37 [INF]
{"printReceivedData":false,"ruleConstraints":{"SpeedTooHigh":{"MaximumAllowedSpeed":15>
Jan 25 15:56:37 aidmain-Standard-PC-i440FX-PIIX-1996 dotnet-example[20016]: 01/25/2023 15:56:37 [INF] Succesfully reloaded
configuration.
Jan 25 15:56:38 aidmain-Standard-PC-i440FX-PIIX-1996 dotnet-example[20016]: 01/25/2023 15:56:38 [INF] Start waiting for
data.
Jan 25 15:56:38 aidmain-Standard-PC-i440FX-PIIX-1996 systemd[1]: Started CSHARPSERVICE.
Jan 25 15:57:46 aidmain-Standard-PC-i440FX-PIIX-1996 systemd[1]: cshradar.service: Succeeded.
Jan 25 15:57:46 aidmain-Standard-PC-i440FX-PIIX-1996 systemd[1]: Stopped CSHARPSERVICE.
The service becomes dead when my C# service wait for data and get freeze at http request.
But if I run this code directly inside tmux then it run properly, but not with systemd, I am unable to understand this.
I am attaching screenshot of running example using tmux(Sorry for attacing this screenshot because its not getting formatted on stack overflow)
I tried multiple different aspects to run but still showing dead when I use systemd.

Related

Couchbase with Azure Linux VM

I installed ubuntu server VM on Azure there I installed couchbase community edition on now i need to access the couchbase using dotnet SDK but code gives me bucket not found or unreachable error.
even i try configuring a public dns and gave it as ip during cluster creation but still its giving the same.
even i added public dns to the host file like below
127.0.0.1 public dns
The SDK log includes below 2 statements
Attempted bootstrapping on endpoint "name.eastus.cloudapp.azure.com" has failed. (e80489ed)
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
SDK Doctor Log:
09:51:20.331 INFO ▶ Parsing connection string `couchbases://hsotname.eastus.cloudapp.azure.com/travel-sample`
09:51:20.334 INFO ▶ Connection string was parsed as a potential DNS SRV record
09:51:31.316 INFO ▶ Connection string specifies to use secured connections
09:51:31.316 INFO ▶ Connection string identifies the following CCCP endpoints:
09:51:31.316 INFO ▶ 1. hsotname.eastus.cloudapp.azure.com:11207
09:51:31.316 INFO ▶ Connection string identifies the following HTTP endpoints:
09:51:31.316 INFO ▶ 1. hsotname.eastus.cloudapp.azure.com:18091
09:51:31.316 INFO ▶ Connection string specifies bucket `travel-sample`
09:51:31.316 WARN ▶ No certificate authority file specified (--tls-ca), skipping server certificate verification for this run.
09:51:42.453 WARN ▶ Your connection string specifies only a single host. You should consider adding additional static nodes from your cluster to this list to improve your applications fault-tolerance
09:51:42.462 INFO ▶ Performing DNS lookup for host `hsotname.eastus.cloudapp.azure.com`
09:51:42.462 INFO ▶ Bootstrap host `hsotname.eastus.cloudapp.azure.com` refers to a server with the address `13.82.80.55`
09:51:42.462 INFO ▶ Attempting to connect to cluster via CCCP
09:51:42.463 INFO ▶ Attempting to fetch config via cccp from `hsotname.eastus.cloudapp.azure.com:11207`
09:51:44.474 ERRO ▶ Failed to fetch configuration via cccp from `hsotname.eastus.cloudapp.azure.com:11207` (error: dial tcp 13.82.80.55:11207: i/o timeout)
09:51:44.474 INFO ▶ Attempting to connect to cluster via HTTP (Terse)
09:51:44.474 INFO ▶ Attempting to fetch terse config via http from `hsotname.eastus.cloudapp.azure.com:18091`
09:51:46.480 ERRO ▶ Failed to fetch terse configuration via http from `hsotname.eastus.cloudapp.azure.com:18091` (error: Get "http://hsotname.eastus.cloudapp.azure.com:18091/pools/default/b/travel-sample": context deadline exceeded (Client.Timeout exceeded while awaiting headers))
09:51:46.480 INFO ▶ Attempting to connect to cluster via HTTP (Full)
09:51:46.480 INFO ▶ Failed to connect via HTTP (Full), as it is not yet supported by the doctor
09:51:46.481 INFO ▶ Selected the following network type:
09:51:46.481 ERRO ▶ All endpoints specified by your connection string were unreachable, further cluster diagnostics are not possible
09:51:46.481 INFO ▶ Diagnostics completed
Summary:
←[33m[WARN]←[0m No certificate authority file specified (--tls-ca), skipping server certificate verification for this run.
←[33m[WARN]←[0m Your connection string specifies only a single host. You should consider adding additional static nodes from your cluster to this list to improve your applications fault-tolerance
←[31m[ERRO]←[0m Failed to fetch configuration via cccp from `hsotname.eastus.cloudapp.azure.com:11207` (error: dial tcp 13.82.80.55:11207: i/o timeout)
←[31m[ERRO]←[0m Failed to fetch terse configuration via http from `hsotname.eastus.cloudapp.azure.com:18091` (error: Get "http://hsotname.eastus.cloudapp.azure.com:18091/pools/default/b/travel-sample": context deadline exceeded (Client.Timeout exceeded while awaiting headers))
←[31m[ERRO]←[0m All endpoints specified by your connection string were unreachable, further cluster diagnostics are not possible
Found multiple issues, see listing above.
Both 18091 and 11207 port i added as inbound rule.
my ufw status is inactive
The above mentioned 2 ports are not listening
couchbaseadm#couchbasedbserver:~$ sudo lsof -i -P -n | grep LISTEN
systemd-r 926 systemd-resolve 13u IPv4 18715 0t0 TCP 127.0.0.53:53 (LISTEN)
sshd 1103 root 3u IPv4 21086 0t0 TCP *:22 (LISTEN)
sshd 1103 root 4u IPv6 21088 0t0 TCP *:22 (LISTEN)
beam.smp 6323 couchbase 17u IPv4 3937812 0t0 TCP 127.0.0.1:21200 (LISTEN)
epmd 6354 couchbase 3u IPv4 3937267 0t0 TCP *:4369 (LISTEN)
epmd 6354 couchbase 4u IPv6 3937268 0t0 TCP *:4369 (LISTEN)
beam.smp 6465 couchbase 34u IPv4 3943391 0t0 TCP *:21100 (LISTEN)
beam.smp 6465 couchbase 48u IPv4 3938657 0t0 TCP *:8091 (LISTEN)
beam.smp 6514 couchbase 17u IPv4 3938608 0t0 TCP 127.0.0.1:21300 (LISTEN)
beam.smp 6514 couchbase 27u IPv4 3938628 0t0 TCP *:8092 (LISTEN)
prometheu 6563 couchbase 9u IPv4 3938650 0t0 TCP 127.0.0.1:9123 (LISTEN)
goxdcr 6583 couchbase 11u IPv4 3938705 0t0 TCP 127.0.0.1:9998 (LISTEN)
memcached 6592 couchbase 5u IPv4 3938689 0t0 TCP 127.0.0.1:11280 (LISTEN)
memcached 6592 couchbase 12u IPv4 3937931 0t0 TCP *:11210 (LISTEN)
memcached 6592 couchbase 13u IPv4 3937932 0t0 TCP *:11209 (LISTEN)
memcached 6592 couchbase 14u IPv6 3937933 0t0 TCP *:11210 (LISTEN)
memcached 6592 couchbase 15u IPv6 3937934 0t0 TCP *:11209 (LISTEN)
indexer 6741 couchbase 16u IPv4 3944492 0t0 TCP *:9101 (LISTEN)
indexer 6741 couchbase 19u IPv4 3944066 0t0 TCP *:9100 (LISTEN)
indexer 6741 couchbase 20u IPv4 3944500 0t0 TCP *:9102 (LISTEN)
indexer 6741 couchbase 69u IPv4 3946013 0t0 TCP *:9105 (LISTEN)
projector 6762 couchbase 9u IPv4 3944075 0t0 TCP *:9999 (LISTEN)
cbq-engin 6782 couchbase 7u IPv6 3944534 0t0 TCP *:8093 (LISTEN)
cbq-engin 6782 couchbase 8u IPv4 3944535 0t0 TCP *:8093 (LISTEN)
cbft 6799 couchbase 8u IPv4 3944112 0t0 TCP *:9130 (LISTEN)
cbft 6799 couchbase 9u IPv4 3944149 0t0 TCP *:8094 (LISTEN)
sync_gate 11950 sync_gateway 8u IPv4 4119414 0t0 TCP 127.0.0.1:4985 (LISTEN)
sync_gate 11950 sync_gateway 9u IPv6 4119422 0t0 TCP *:4984 (LISTEN)
Here is the stacktrace:
StackTrace " at Couchbase.Core.ClusterContext.d__58.MoveNext()\r\n
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Threading.Tasks.ValueTask1.get_Result()\r\n at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable1.ConfiguredValueTaskAwaiter.GetResult()\r\n
at Couchbase.Cluster.<>c__DisplayClass30_0.<b__0>d.MoveNext()\r\n
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n
at System.Threading.Tasks.ValueTask1.get_Result()\r\n at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable1.ConfiguredValueTaskAwaiter.GetResult()\r\n
Dotnet SDK Log
2022-02-09T17:28:46.3409884+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:28:48.8643285+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:28:48.8649060+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:28:51.3664735+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:28:51.3667541+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:28:53.8811651+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:28:53.8814100+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:28:56.3823825+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:28:56.3826183+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:28:58.8964320+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:28:58.8967224+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:01.4007664+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:01.4010274+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:01.7019750+05:30 [INF] Error trying to retrieve DNS SRV entries. (addddf06)
DnsClient.DnsResponseException: Query 12389 => _couchbases._tcp.hsotname.eastus.cloudapp.azure.com IN SRV on 192.168.8.1:53 timed out or is a transient error.
---> System.OperationCanceledException: The operation was canceled.
at System.Threading.Tasks.TaskExtensions.WithCancellation[T](Task`1 task, CancellationToken cancellationToken, Action onCancel)
at DnsClient.LookupClient.ResolveQueryAsync(IReadOnlyList`1 servers, DnsQuerySettings settings, DnsMessageHandler handler, DnsRequestMessage request, LookupClientAudit audit, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at DnsClient.LookupClient.ResolveQueryAsync(IReadOnlyList`1 servers, DnsQuerySettings settings, DnsMessageHandler handler, DnsRequestMessage request, LookupClientAudit audit, CancellationToken cancellationToken)
at DnsClient.LookupClient.QueryInternalAsync(DnsQuestion question, DnsQuerySettings queryOptions, IReadOnlyCollection`1 servers, CancellationToken cancellationToken)
at Couchbase.DnsClientDnsResolver.GetDnsSrvEntriesAsync(Uri bootstrapUri, CancellationToken cancellationToken)
at Couchbase.Core.ClusterContext.BootstrapGlobalAsync()
2022-02-09T17:29:01.7034867+05:30 [DBG] Bootstrapping with node "hsotname.eastus.cloudapp.azure.com" (98ca0e33)
2022-02-09T17:29:03.9124149+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:03.9127285+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:06.4201295+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:06.4205385+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:08.9317820+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:08.9320832+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:11.4459313+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:11.4463142+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:12.1488979+05:30 [DBG] Attempted bootstrapping on endpoint "hsotname.eastus.cloudapp.azure.com" has failed. (e80489ed)
System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
at Couchbase.Core.IO.Connections.ConnectionFactory.CreateAndConnectAsync(HostEndpointWithPort hostEndpoint, CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.ConnectionPoolBase.CreateConnectionAsync(CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.<>c__DisplayClass30_0.<<AddConnectionsAsync>g__StartConnection|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.AddConnectionsAsync(Int32 count, CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.InitializeAsync(CancellationToken cancellationToken)
at Couchbase.Core.ClusterNode.InitializeAsync()
at Couchbase.Core.DI.ClusterNodeFactory.CreateAndConnectAsync(HostEndpointWithPort endPoint, BucketType bucketType, NodeAdapter nodeAdapter, CancellationToken cancellationToken)
at Couchbase.Core.ClusterContext.BootstrapGlobalAsync()
2022-02-09T17:29:33.3259787+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:33.3262710+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:35.8341848+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:35.8343993+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:36.9552318+05:30 [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:36.9596725+05:30 [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:37.0170984+05:30 [INF] Cannot bootstrap bucket "travel-sample" as Couchbase. (1ecb21a9)
System.IO.IOException: The operation is not allowed on non-connected sockets.
at System.Net.Sockets.NetworkStream..ctor(Socket socket, FileAccess access, Boolean ownsSocket)
at Couchbase.Core.IO.Connections.ConnectionFactory.CreateAndConnectAsync(HostEndpointWithPort hostEndpoint, CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.ConnectionPoolBase.CreateConnectionAsync(CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.<>c__DisplayClass30_0.<<AddConnectionsAsync>g__StartConnection|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.AddConnectionsAsync(Int32 count, CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.InitializeAsync(CancellationToken cancellationToken)
at Couchbase.Core.ClusterNode.InitializeAsync()
at Couchbase.Core.DI.ClusterNodeFactory.CreateAndConnectAsync(HostEndpointWithPort endPoint, BucketType bucketType, NodeAdapter nodeAdapter, CancellationToken cancellationToken)
at Couchbase.Core.ClusterContext.CreateAndBootStrapBucketAsync(String name, HostEndpointWithPort endpoint, BucketType type)
at Couchbase.Core.ClusterContext.GetOrCreateBucketAsync(String name)
2022-02-09T17:29:38.3360012+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:38.3361875+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:40.3244490+05:30 [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:40.3507801+05:30 [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:40.3525230+05:30 [INF] Cannot bootstrap bucket "travel-sample" as Memcached. (1ecb21a9)
System.IO.IOException: The operation is not allowed on non-connected sockets.
at System.Net.Sockets.NetworkStream..ctor(Socket socket, FileAccess access, Boolean ownsSocket)
at Couchbase.Core.IO.Connections.ConnectionFactory.CreateAndConnectAsync(HostEndpointWithPort hostEndpoint, CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.ConnectionPoolBase.CreateConnectionAsync(CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.<>c__DisplayClass30_0.<<AddConnectionsAsync>g__StartConnection|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.AddConnectionsAsync(Int32 count, CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.InitializeAsync(CancellationToken cancellationToken)
at Couchbase.Core.ClusterNode.InitializeAsync()
at Couchbase.Core.DI.ClusterNodeFactory.CreateAndConnectAsync(HostEndpointWithPort endPoint, BucketType bucketType, NodeAdapter nodeAdapter, CancellationToken cancellationToken)
at Couchbase.Core.ClusterContext.CreateAndBootStrapBucketAsync(String name, HostEndpointWithPort endpoint, BucketType type)
at Couchbase.Core.ClusterContext.GetOrCreateBucketAsync(String name)
2022-02-09T17:29:40.8385667+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:40.8387609+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:43.3380840+05:30 [DBG] Done waiting, polling... (93018145)
2022-02-09T17:29:43.3382393+05:30 [DBG] Waiting for 00:00:02.5000000 before polling. (c8639b24)
2022-02-09T17:29:43.6633010+05:30 [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:43.6842924+05:30 [DBG] Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01. (d66a37aa)
2022-02-09T17:29:43.6862758+05:30 [INF] Cannot bootstrap bucket "travel-sample" as Ephemeral. (1ecb21a9)
System.IO.IOException: The operation is not allowed on non-connected sockets.
at System.Net.Sockets.NetworkStream..ctor(Socket socket, FileAccess access, Boolean ownsSocket)
at Couchbase.Core.IO.Connections.ConnectionFactory.CreateAndConnectAsync(HostEndpointWithPort hostEndpoint, CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.ConnectionPoolBase.CreateConnectionAsync(CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.<>c__DisplayClass30_0.<<AddConnectionsAsync>g__StartConnection|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.AddConnectionsAsync(Int32 count, CancellationToken cancellationToken)
at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.InitializeAsync(CancellationToken cancellationToken)
at Couchbase.Core.ClusterNode.InitializeAsync()
at Couchbase.Core.DI.ClusterNodeFactory.CreateAndConnectAsync(HostEndpointWithPort endPoint, BucketType bucketType, NodeAdapter nodeAdapter, CancellationToken cancellationToken)
at Couchbase.Core.ClusterContext.CreateAndBootStrapBucketAsync(String name, HostEndpointWithPort endpoint, BucketType type)
at Couchbase.Core.ClusterContext.GetOrCreateBucketAsync(String name)
Thanks!!
Thank you for providing so much detailed information! I suspect the immediate issue is that you are trying to connect using TLS, which is not supported by Couchbase Community Edition (at least not as of February 2022). Ports 11207 and 18091 are for TLS connections; as you observed in the lsof output, the server is not listening on those ports.
I resolve the issue by changing the connection string for couchbase
from
couchbase://
to
http://

kestrel + nginx intermittent 502

I have an ASP.NET core 1.0 app running on ubuntu 16.04 behind nginx/1.10.0. However, I notice that intermittently nginx throws the following error (in nginx error-log)
2017/06/08 05:19:19 [error] 11572#11572: *119049 upstream prematurely closed connection while reading response header from upstream, client: <ipaddress>, server: <servername>, request: "POST /<uri> HTTP/1.1", upstream: "http://127.0.0.1:5000/<uri>", host: "<servername>"
which results in a 502 Bad Gateway to the client although the request completes successfully in the application
2017-06-08 05:19:14.399 [DBG] Executed action method "<Controller.Action>", returned result "Microsoft.AspNetCore.Mvc.CreatedAtRouteResult
Could this be an nginx configuration issue or ASP.NET/Kestrel issue? Can someone give me hints to debug this?
Further notes:
I also see the following in the application log just after request completion
2017-06-08 05:19:14.399 [DBG] Executed action method "<Controller.Action>", returned result "Microsoft.AspNetCore.Mvc.CreatedAtRouteResult
2017-06-08 05:19:18.632 [DBG] Some connections failed to close gracefully during server shutdown.
2017-06-08 05:19:22.402 [DBG] Hosting starting
2017-06-08 05:19:22.689 [DBG] Hosting started
and the nginx error is just around the same time 2017/06/08 05:19:19
Also, normally in the logs I see messages around Executing ObjectResult and Executed time etc. which I don't see with the above request
2017-06-08 00:10:14.391 [DBG] Selected output formatter '"Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter"' and content type '"application/json"' to write the response.
2017-06-08 00:10:14.391 [INF] Executing ObjectResult, writing value "Microsoft.AspNetCore.Mvc.ControllerContext".
2017-06-08 00:10:14.504 [INF] Executed action "<Controller.Action>" in 1875.3845ms

SignalR client connection error (UWP & JavaScript Client)

I have both, a simple UWP app running on local machine in Visual Studio and a simple AngularJS SPA. I have also an OWIN based self hosted server running in a Service Fabric Cluster. The server use web api and signalR.
When I'm hosting the Service Fabric Cluster on my local machine, the UWP app and the angular app can open a connection to a signalR hub on the server. When I'm hosting the Service Fabric Cluster on Azure, the clients are not able to connect to the signalR hub. I'm getting: failed: Error during WebSocket handshake: Unexpected response code: 400
Server side code in startup class:
public void Configuration(IAppBuilder appBuilder)
{
HttpConfiguration httpConfig = this.ConfigureWebApi();
FileServerOptions fileServerOptions = this.ConfigureFileSystem(appBuilder); appBuilder.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
appBuilder.UseWebApi(this.ConfigureWebApi());
appBuilder.UseFileServer(fileServerOptions);
appBuilder.MapSignalR();
SignalR hub class on server:
public class SensorDataHub : Hub
{
public void UpdateSensorData(SensorDataModel data)
{
Clients.All.updateChartData(data);
}
}
UWP code:
private async void OpenSignalRConnection()
{
//this.SensorDataHubCon = new HubConnection("http://localhost:80/");
this.SensorDataHubCon = new HubConnection("http://rivutec.westeurope.cloudapp.azure.com/");
this.SensorDataHubProxy = this.SensorDataHubCon.CreateHubProxy("SensorDataHub");
await this.SensorDataHubCon.Start();
}
AngularJS code:
var connection = $.hubConnection("http://localhost:80/");
//var connection = $.hubConnection("http://test.server.com/");
var proxy = connection.createHubProxy("SensorDataHub");
proxy.on("updateChartData", function (data) {
console.log(data.current);
});
connection.start()
.done(function () { console.log('Now connected, connection ID=' + $.connection.hub.id); })
.fail(function () { console.log('Could not Connect!'); });
As I wrote above, the UWP client and the angular client can open the hub connection to localhost.
But when I'm trying to connect the UWP client to a signalR hub published on a cloud, I'm getting a Bad Request error:
Microsoft.AspNet.SignalR.Client.HttpClientException was unhandled by user code
HResult=-2146233088
Message=StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Server: Microsoft-HTTPAPI/2.0
Transfer-Encoding: chunked
Date: Sun, 07 Feb 2016 13:59:09 GMT
X-Content-Type-Options: nosniff
}
Source=Microsoft.AspNet.SignalR.Client
StackTrace:
at Microsoft.AspNet.SignalR.Client.Http.DefaultHttpClient.<>c__DisplayClass6.<Post>b__5(HttpResponseMessage responseMessage)
at Microsoft.AspNet.SignalR.TaskAsyncHelper.<>c__DisplayClass19`2.<Then>b__17(Task`1 t)
at Microsoft.AspNet.SignalR.TaskAsyncHelper.TaskRunners`2.<>c__DisplayClass42.<RunTask>b__41(Task`1 t)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at SerialSample.MainPage.<OpenSignalRConnection>d__9.MoveNext()
InnerException:
And the signalR trace says:
13:59:02.3510728 - ac120389-8e08-4690-8e38-4538b602260e - SSE: GET http://test.server.com/signalr/connect?clientProtocol=1.4&transport=serverSentEvents&connectionData=[{"Name":"SensorDataHub"}]&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAVQGqCkfcnkONWeEawJYNqQAAAAACAAAAAAAQZgAAAAEAACAAAADhW4uMBq5ClXKT3X5UGNGLq3YzdxgD4blCiGSRFL8b8AAAAAAOgAAAAAIAACAAAABGZnghjduUUMHt3QMlhMxIRsajzvG0kWW4ECTpnppl4DAAAAALVIQ46T3%2BdnUpON%2FrpgZO8idns8YNkRrK9lMMxKQz7xYTgM8ViIcxeMNx7%2FamQsRAAAAA5KtFAgG0yKxNVlzAfGNc0cHP8NXxEmaK1i%2Blf52xb7SNmpz%2B5O%2BJxZmVz71Z3pdHV4Z1LyGJixJsRxnQEJOtfA%3D%3D&noCache=28c5a100-2796-4287-958b-0c2ccbd1e91a
The thread 0x4b04 has exited with code 0 (0x0).
13:59:07.3914634 - ac120389-8e08-4690-8e38-4538b602260e - Auto: Failed to connect to using transport serverSentEvents. System.TimeoutException: Transport timed out trying to connect
13:59:07.3994644 - ac120389-8e08-4690-8e38-4538b602260e - LP Connect: http://test.server.com/signalr/connect?clientProtocol=1.4&transport=longPolling&connectionData=[{"Name":"SensorDataHub"}]&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAVQGqCkfcnkONWeEawJYNqQAAAAACAAAAAAAQZgAAAAEAACAAAADhW4uMBq5ClXKT3X5UGNGLq3YzdxgD4blCiGSRFL8b8AAAAAAOgAAAAAIAACAAAABGZnghjduUUMHt3QMlhMxIRsajzvG0kWW4ECTpnppl4DAAAAALVIQ46T3%2BdnUpON%2FrpgZO8idns8YNkRrK9lMMxKQz7xYTgM8ViIcxeMNx7%2FamQsRAAAAA5KtFAgG0yKxNVlzAfGNc0cHP8NXxEmaK1i%2Blf52xb7SNmpz%2B5O%2BJxZmVz71Z3pdHV4Z1LyGJixJsRxnQEJOtfA%3D%3D&noCache=78a5c718-439d-440f-9b68-c0658135209f
'SerialSample.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Users\...\Downloads\samples-develop\samples-develop\SerialSample\CS\bin\x86\Debug\AppX\System.Net.Requests.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
13:59:07.5434999 - ac120389-8e08-4690-8e38-4538b602260e - Auto: Failed to connect to using transport longPolling. Microsoft.AspNet.SignalR.Client.HttpClientException: StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Server: Microsoft-HTTPAPI/2.0
Transfer-Encoding: chunked
Date: Sun, 07 Feb 2016 13:59:09 GMT
X-Content-Type-Options: nosniff
}
at Microsoft.AspNet.SignalR.Client.Http.DefaultHttpClient.<>c__DisplayClass6.<Post>b__5(HttpResponseMessage responseMessage)
at Microsoft.AspNet.SignalR.TaskAsyncHelper.<>c__DisplayClass19`2.<Then>b__17(Task`1 t)
at Microsoft.AspNet.SignalR.TaskAsyncHelper.TaskRunners`2.<>c__DisplayClass42.<RunTask>b__41(Task`1 t)
13:59:07.5755002 - ac120389-8e08-4690-8e38-4538b602260e - OnError(Microsoft.AspNet.SignalR.Client.HttpClientException: StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Server: Microsoft-HTTPAPI/2.0
Transfer-Encoding: chunked
Date: Sun, 07 Feb 2016 13:59:09 GMT
X-Content-Type-Options: nosniff
}
at Microsoft.AspNet.SignalR.Client.Http.DefaultHttpClient.<>c__DisplayClass6.<Post>b__5(HttpResponseMessage responseMessage)
at Microsoft.AspNet.SignalR.TaskAsyncHelper.<>c__DisplayClass19`2.<Then>b__17(Task`1 t)
at Microsoft.AspNet.SignalR.TaskAsyncHelper.TaskRunners`2.<>c__DisplayClass42.<RunTask>b__41(Task`1 t))
13:59:07.6070094 - ac120389-8e08-4690-8e38-4538b602260e - Disconnected
13:59:07.6100082 - ac120389-8e08-4690-8e38-4538b602260e - Transport.Dispose(ac120389-8e08-4690-8e38-4538b602260e)
13:59:07.6135102 - ac120389-8e08-4690-8e38-4538b602260e - Closed
Exception thrown: 'Microsoft.AspNet.SignalR.Client.HttpClientException' in mscorlib.ni.dll
And the angular client error says:
[21:52:32 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Client subscribed to hub 'sensordatahub'.
jquery.signalR.min.js:8 [21:52:32 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Negotiating with 'http://test.server.com//signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B%22name%22%3A%22sensordatahub%22%7D%5D'.
jquery.signalR.min.js:8 [21:52:32 GMT+0100 (Mitteleuropäische Zeit)] SignalR: webSockets transport starting.
jquery.signalR.min.js:8 [21:52:32 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Connecting to websocket endpoint 'ws://test.server.com/signalr/connect?transport=webSockets&clientProtocol=1.5&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAVQGqCkfcnkONWeEawJYNqQAAAAACAAAAAAAQZgAAAAEAACAAAAC8DLAeriEnbunGPma3%2F%2FChRl1tm6XCfCHDLEEBfpjszgAAAAAOgAAAAAIAACAAAACANAtQqijBRvg4FloVq0JnylH9%2Bm6j5coY3Yr0yP60mzAAAAD4qw2VdYIQJ3CYQPcPbr2LhyfPhhJtPPgJ33FZuPLQh8owubvHYD5jhRsXdMxHfitAAAAAJX0cLVthvatbmOa%2BNbRSt%2B8CnVJ%2FQ9ks1x%2Bzlk2wA8iF6OVU03wXaNK17FXK2%2BlFmU6hIk8euqJVXeZMz7%2Bfnw%3D%3D&connectionData=%5B%7B%22name%22%3A%22sensordatahub%22%7D%5D&tid=4'.
jquery.signalR.min.js:8 WebSocket connection to 'ws://test.server.com/signalr/connect?transport=webSockets&clientProtocol=1.5&connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAVQGqCkfcnkONWeEawJYNqQAAAAACAAAAAAAQZgAAAAEAACAAAAC8DLAeriEnbunGPma3%2F%2FChRl1tm6XCfCHDLEEBfpjszgAAAAAOgAAAAAIAACAAAACANAtQqijBRvg4FloVq0JnylH9%2Bm6j5coY3Yr0yP60mzAAAAD4qw2VdYIQJ3CYQPcPbr2LhyfPhhJtPPgJ33FZuPLQh8owubvHYD5jhRsXdMxHfitAAAAAJX0cLVthvatbmOa%2BNbRSt%2B8CnVJ%2FQ9ks1x%2Bzlk2wA8iF6OVU03wXaNK17FXK2%2BlFmU6hIk8euqJVXeZMz7%2Bfnw%3D%3D&connectionData=%5B%7B%22name%22%3A%22sensordatahub%22%7D%5D&tid=4' failed: Error during WebSocket handshake: Unexpected response code: 400
jquery.signalR.min.js:8 [21:52:32 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Websocket closed.
jquery.signalR.min.js:8 [21:52:32 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Closing the Websocket.
jquery.signalR.min.js:8 [21:52:32 GMT+0100 (Mitteleuropäische Zeit)] SignalR: webSockets transport failed to connect. Attempting to fall back.
jquery.signalR.min.js:8 [21:52:32 GMT+0100 (Mitteleuropäische Zeit)] SignalR: serverSentEvents transport starting.
jquery.signalR.min.js:8 [21:52:32 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Attempting to connect to SSE endpoint 'http://test.server.com/signalr/connect?transport=serv…nw%3D%3D&connectionData=%5B%7B%22name%22%3A%22sensordatahub%22%7D%5D&tid=6'.
jquery.signalR.min.js:8 [21:52:37 GMT+0100 (Mitteleuropäische Zeit)] SignalR: serverSentEvents transport timed out when trying to connect.
jquery.signalR.min.js:8 [21:52:37 GMT+0100 (Mitteleuropäische Zeit)] SignalR: EventSource calling close().
jquery.signalR.min.js:8 [21:52:37 GMT+0100 (Mitteleuropäische Zeit)] SignalR: serverSentEvents transport failed to connect. Attempting to fall back.
jquery.signalR.min.js:8 [21:52:37 GMT+0100 (Mitteleuropäische Zeit)] SignalR: foreverFrame transport starting.
jquery.signalR.min.js:8 [21:52:37 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Forever Frame is not supported by SignalR on browsers with SSE support.
jquery.signalR.min.js:8 [21:52:37 GMT+0100 (Mitteleuropäische Zeit)] SignalR: foreverFrame transport failed to connect. Attempting to fall back.
jquery.signalR.min.js:8 [21:52:37 GMT+0100 (Mitteleuropäische Zeit)] SignalR: longPolling transport starting.
jquery.signalR.min.js:8 [21:52:38 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Opening long polling request to 'http://test.server.com/signalr/connect?transport=long…z7%2Bfnw%3D%3D&connectionData=%5B%7B%22name%22%3A%22sensordatahub%22%7D%5D'.
jquery.min.js:4 POST http://test.server.com/signalr/connect?transport=long…z7%2Bfnw%3D%3D&connectionData=%5B%7B%22name%22%3A%22sensordatahub%22%7D%5D 400 (Bad Request)l.cors.b.crossDomain.send # jquery.min.js:4n.extend.ajax # jquery.min.js:4r.transports._logic.ajax # jquery.signalR.min.js:8e # jquery.signalR.min.js:8(anonymous function) # jquery.signalR.min.js:8
jquery.signalR.min.js:8 [21:52:38 GMT+0100 (Mitteleuropäische Zeit)] SignalR: longPolling transport failed to connect. Attempting to fall back.
jquery.signalR.min.js:8 [21:52:38 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Fallback transports exhausted.
signalRHubService.js:13 Could not Connect!
jquery.signalR.min.js:8 [21:52:38 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Stopping connection.
jquery.signalR.min.js:8 [21:52:38 GMT+0100 (Mitteleuropäische Zeit)] SignalR: Fired ajax abort async = true.
jquery.signalR.min.js:8 [21:52:38 GMT+0100 (Mitteleuropäische Zeit)] SignalR: LongPolling failed to connect.
jquery.min.js:4 POST http://test.server.com//signalr/abort?transport=longP…z7%2Bfnw%3D%3D&connectionData=%5B%7B%22name%22%3A%22sensordatahub%22%7D%5D 400 (Bad Request)l.cors.b.crossDomain.send # jquery.min.js:4n.extend.ajax # jquery.min.js:4r.transports._logic.ajax # jquery.signalR.min.js:8r.transports._logic.ajaxAbort # jquery.signalR.min.js:8r.transports.longPolling.abort # jquery.signalR.min.js:8r.fn.r.stop # jquery.signalR.min.js:8a.state.r.connectionState.connecting.d # jquery.signalR.min.js:8v # jquery.signalR.min.js:8h.transportFailed # jquery.signalR.min.js:8(anonymous function) # jquery.signalR.min.js:8y # jquery.signalR.min.js:8s.pollXhr.i.ajax.error # jquery.signalR.min.js:8i # jquery.min.js:2j.fireWith # jquery.min.js:2z # jquery.min.js:4(anonymous function) # jquery.min.js:4
I'm getting failed: Error during WebSocket handshake: Unexpected response code: 400. Why can I connect on localhost, but not on cloud?
Without seeing more of your code, this is just a WAG, but...
Based on the fact that it was a 'Bad Request' error and the log says it timed out on all the transport types, my instincts are telling me that on your local machine,
when you configure the uri for the OWIN self host, you tell it to bind to localhost:80.
When the service fabric local cluster starts and runs the
Stateful/lessService (or I suppose you could do it with Actors) it
instantiates the OWIN self-host
OWIN binds to localhost:80 and requests to localhost:80 are correctly routed there
Warm fuzzies are had.
However, when moving the cluster up to Azure:
you want to change the OWIN uri address, because localhost is no longer appropriate,
so you chose 'test.server.com', or whatever it actually was.
Now though, the cluster isn't on a single machine, it's up in Azure
and whatever binding you want to use probably isn't valid.
Meaning, your OWIN host may be listening for 'test.server.com' requests, but none are coming because no DNS is pointing 'test.server.com' to the service fabric machine(s) hosting the service (which is hosting the OWIN self-host).
Some documentation I read noted that the service fabric framework has its own name servers which resolve the service fabric references to actual machine address, which is why you refer to service fabric services using the 'fabric:' protocol and let the routing magic happen behind the scenes. So the same limitation that means you can't directly expose an HTTP endpoint for a Service Fabric service without using an intermediary (see this MSDN article for details), is going to limit your ability to self host and bind to a uri that external clients can use.
This article talks about using OWIN to self-host Web API in an Azure Worker role, but the example is limited to using the local emulator and doesn't seem to address the fact that the ip address assigned to the endpoint could and would change in the cloud, making it hard to address reliably on the client.
If you were trying to move the SignalR hub to Service Fabric because you wanted to be able to take advantage of Service Fabric's scalability, check here. The currently recommended/supported path to scale out SignalR that looks like the best fit for what you've got there would be using Web Roles and Azure Service Bus as shown here.

Wrapping an existing RTP stream with RTSP

I have a RTP multicast stream from ffmpeg that requires users to use external SDP files, as this sometimes becomes a problem I was thinking of wrapping the stream using RTSP.
I have an application that already makes some management for the RTP stream, so it would be useful to have the RTSP wrapper inside it as well, although I don't want the wrapper to do anything beyond delivering the SDP information. Right now I'd say I'm correctly delivering the SDP information (otherwise it's stuck in that request), however I'm not getting any PLAY command, the player is stuck after the SETUP request, so I guess my reply is wrong, but after testing many different values for the Transport header I haven't been able to get anything beyond this point.
This is the SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 236.0.0.1
t=0 0
a=tool:libavformat 56.7.102
m=video 2000 RTP/AVP 96
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1
This is a sample SETUP request from VLC:
SETUP rtsp://127.0.0.1:34343/live.sdp/ RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.1.5 (LIVE555 Streaming Media v2014.05.27)
Transport: RTP/AVP;multicast;client_port=2000-2001
And one of many replies I've tried:
RTSP/1.0 200 OK
CSeq: 4
Transport: RTP/AVP;multicast;client_port=2000-2001;source=236.0.0.1;port=2000-2001
Session: 0456804596
I've tried using destination instead of source, server_port instead of port, also, although the RTP multicast port is 2000, I've seen the streaming is also using other ports like 57927 and 57928, so I've tried those ones as well, etc.
Just my two cents, but from the logical point of view a PLAY command for a multicast RTSP stream does not make any sense since the clients will get the media as soon as they join the group. The multicast stream as such does not have state.
Is the multicast RTP stream active at this point? Maybe VLC is actually joining the group after the SETUP response but no data is being transmitted to it? Also you can use VLC error log to see what is going on.
EDIT
Here is an example RTSP session with a multicast stream between VLC and an IP camera:
DESCRIBE rtsp://192.168.3.142/stream/profile1=m RTSP/1.0
CSeq: 5
User-Agent: LibVLC/2.0.1 (LIVE555 Streaming Media v2011.12.23)
Accept: application/sdp
RTSP/1.0 200 OK
CSeq: 5
Connection: Keep-alive
Date: Sat, 10 Jan 2015 16:54:28 GMT
Content-Type: application/sdp
Content-Length: 352
v=0
o=- 0 0 IN IP4 192.168.3.142
s=rtsp://192.168.3.142/stream/profile1
t=0 0
a=control:*
m=video 2014 RTP/AVP 99
a=rtpmap:99 H264/90000
a=fmtp:99 sprop-parameter-sets=Z0LgKdoB4Aiflm4CAgwE,aM48gA==;packetization-mode=1;profile-level-id=42e029
a=control:rtsp://192.168.3.142/stream/profile1/AVCESEnc
a=framerate:30.0
c=IN IP4 239.100.10.10/1
SETUP rtsp://192.168.3.142/stream/profile1/AVCESEnc RTSP/1.0
CSeq: 6
User-Agent: LibVLC/2.0.1 (LIVE555 Streaming Media v2011.12.23)
Transport: RTP/AVP;multicast;client_port=2014-2015
RTSP/1.0 200 OK
CSeq: 6
Connection: Keep-alive
Date: Sat, 10 Jan 2015 16:54:28 GMT
Session: 241934337;timeout=60
Transport: RTP/AVP;multicast;destination=239.100.10.10;port=2014-2015;ttl=1
PLAY rtsp://192.168.3.142/stream/profile1=m RTSP/1.0
CSeq: 7
User-Agent: LibVLC/2.0.1 (LIVE555 Streaming Media v2011.12.23)
Session: 241934337
Range: npt=0.000-
RTSP/1.0 200 OK
CSeq: 7
Connection: Keep-alive
Date: Sat, 10 Jan 2015 16:54:28 GMT
Session: 241934337
RTP-Info: url=rtsp://192.168.3.142/stream/profile1/AVCESEnc;seq=14604;rtptime=3766807430
GET_PARAMETER rtsp://192.168.3.142/stream/profile1=m RTSP/1.0
CSeq: 8
User-Agent: LibVLC/2.0.1 (LIVE555 Streaming Media v2011.12.23)
Session: 241934337
RTSP/1.0 200 OK
CSeq: 8
Connection: Keep-alive
Date: Sat, 10 Jan 2015 16:54:29 GMT
Session: 241934337
TEARDOWN rtsp://192.168.3.142/stream/profile1=m RTSP/1.0
CSeq: 9
User-Agent: LibVLC/2.0.1 (LIVE555 Streaming Media v2011.12.23)
Session: 241934337
RTSP/1.0 200 OK
CSeq: 9
Connection: Close
Date: Sat, 10 Jan 2015 16:54:31 GMT
Session: 241934337
EDIT 2
As can be seen lower in the comments, Neverbirth pointed out that the issue was not in the SETUP command but in the HTTP headers for the DESCRIBE command - a wrong content length was used in the response. After fixing that the problem was solved.

IIS status 200(Browser) - 404(Wcf)

I have a WCF service, IIS hosted. It is protected with Basic Authentication.
When I browse with a browser, I get a 401 (nt challenge) and a 200 (successful response).
The same website, page etc, with a WCF request via a console app, I get 401, then 404 (page not found).
Both use the same username and password which are correct. The machine is just a desktop for development. Not on a domain. The host is hostwebsite.local via host file binding to 127.0.0.1
Here are the IIS logs.
The first two lines are the failed WCF called. The last 2 lines is the successful browser call.
The only real difference is the GET/POST. The WCF works when authentication is anonymous.
How can I debug this issue? thank you.
#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2011-03-31 22:53:58
#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
2011-03-31 22:56:37 W3SVC2 MIKEV-WS 127.0.0.1 POST /Services/EchoService.svc - 80 - 127.0.0.1 HTTP/1.1 - - - hostwebsite.local 401 2 5 6633 362 3
2011-03-31 22:56:37 W3SVC2 MIKEV-WS 127.0.0.1 POST /Services/EchoService.svc - 80 admin 127.0.0.1 HTTP/1.1 - - - hostwebsite.local 404 0 0 210 568 2
2011-03-31 22:57:07 W3SVC2 MIKEV-WS 127.0.0.1 GET /Services/EchoService.svc - 80 - 127.0.0.1 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.1;+en-US)+AppleWebKit/534.16+(KHTML,+like+Gecko)+Chrome/10.0.648.133+Safari/534.16 - - hostwebsite.local 401 2 5 6633 442 1
2011-03-31 22:57:10 W3SVC2 MIKEV-WS 127.0.0.1 GET /Services/EchoService.svc - 80 admin 127.0.0.1 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.1;+en-US)+AppleWebKit/534.16+(KHTML,+like+Gecko)+Chrome/10.0.648.133+Safari/534.16 - - hostwebsite.local 200 0 0 1287 485 23
New Information
Problem is now solved and I have listed the answer below.
There was a configuration error causing the listening server to listen on http://hostwebsite.local/Services/EchoService.svc/Services/EchoService.svc
instead of
http://hostwebsite.local/Services/EchoService.svc
I cleared the address in the server endpoint which was /Services/EchoService.svc
<services>
<service name="API.Proxy.EchoProxy" behaviorConfiguration="MyServiceTypeBehaviors">
<endpoint address="[CLEARED]" binding="basicHttpBinding" contract="API.Contract.IEcho" bindingConfiguration="NewBinding" />
The client config already had the address
<client>
<endpoint address="http://hostwebsite.local/Services/EchoService.svc" binding="basicHttpBinding" bindingConfiguration="SecureBinding" contract="API.Contract.IEcho" name="SecureEndpoint">
Notice your one request... is POST and the other is a GET... perhaps that is the issue!

Categories

Resources