Gstreamer got fails in streaming when enable Auth/TLS - gstreamer

I also failed with demo of gstreamer with TLS and Authentication. From the client side I cannot access to the stream. I also enable debug log for both server/client and this is the error log.
Server:
0:00:08.457924872 13546 0x8758400 DEBUG GST_REGISTRY gstregistry.c:1363:gst_registry_scan_path_internal: scanning path /usr/lib/i386-linux-gnu/gstreamer-1.0
0:00:08.458218532 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/home/zcam/.frei0r-1/lib) failed: Error opening directory '/home/zcam/.frei0r-1/lib': No such file or directory
0:00:08.458235068 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/lib/i386-linux-gnu/frei0r-1) failed: Error opening directory '/usr/lib/i386-linux-gnu/frei0r-1': No such file or directory
0:00:08.458248094 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/lib/frei0r-1) failed: Error opening directory '/usr/lib/frei0r-1': No such file or directory
0:00:08.458260771 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/local/lib/frei0r-1) failed: Error opening directory '/usr/local/lib/frei0r-1': No such file or directory
0:00:08.458272452 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/lib32/frei0r-1) failed: Error opening directory '/usr/lib32/frei0r-1': No such file or directory
0:00:08.458283767 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/local/lib32/frei0r-1) failed: Error opening directory '/usr/local/lib32/frei0r-1': No such file or directory
0:00:08.458294682 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/lib64/frei0r-1) failed: Error opening directory '/usr/lib64/frei0r-1': No such file or directory
0:00:08.458305114 13546 0x8758400 DEBUG GST_PLUGIN_LOADING gstplugin.c:1532:gst_plugin_ext_dep_scan_dir_and_match_names: g_dir_open(/usr/local/lib64/frei0r-1) failed: Error opening directory '/usr/local/lib64/frei0r-1': No such file or directory
0:25:53.406568056 13546 0x8881290 INFO rtspclient rtsp-client.c:2372:handle_request: client 0x8828440: received a request OPTIONS rtsp://127.0.0.1:8554/test 1.0
0:25:53.406591435 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:597:gst_rtsp_auth_check: check authorization 'auth.check.url'
0:25:53.407338684 13546 0x8881290 INFO rtspclient rtsp-client.c:2372:handle_request: client 0x8828440: received a request DESCRIBE rtsp://127.0.0.1:8554/test 1.0
0:25:53.407356700 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:597:gst_rtsp_auth_check: check authorization 'auth.check.url'
0:25:53.407364899 13546 0x8881290 DEBUG default rtsp-mount-points.c:79:data_item_dump: inspect: /test 0x87620f8
0:25:53.407371316 13546 0x8881290 DEBUG default rtsp-mount-points.c:79:data_item_dump: prefix: /test 0x87620f8
0:25:53.407376672 13546 0x8881290 DEBUG default rtsp-mount-points.c:79:data_item_dump: result: /test 0x87620f8
0:25:53.407381633 13546 0x8881290 INFO rtspmountpoints rtsp-mount-points.c:294:gst_rtsp_mount_points_match: found media factory 0x87620f8 for path /test
0:25:53.407387357 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:597:gst_rtsp_auth_check: check authorization 'auth.check.media.factory.access'
0:25:53.407393389 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:348:default_authenticate: authenticate
0:25:53.407398028 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:381:default_authenticate: no authorization header found
0:25:53.407402002 13546 0x8881290 DEBUG rtspauth rtsp-auth.c:428:ensure_authenticated: no authorization token found
0:25:53.407446055 13546 0x8881290 ERROR rtspclient rtsp-client.c:645:find_media: client 0x8828440: not authorized to see factory path /test
0:25:53.407453993 13546 0x8881290 ERROR rtspclient rtsp-client.c:2204:handle_describe_request: client 0x8828440: no media
0:25:53.407974988 13546 0x8881290 INFO rtspclient rtsp-client.c:3157:closed: client 0x8828440: connection closed
0:25:53.407992854 13546 0x8881290 INFO rtspclient rtsp-client.c:3383:client_watch_notify: client 0x8828440: watch destroyed
0:25:53.408002874 13546 0x8881290 DEBUG rtspserver rtsp-server.c:999:unmanage_client: unmanage client 0x8828440
0:25:53.408012196 13546 0x8881290 DEBUG rtspserver rtsp-server.c:979:free_client_context: free context 0x88854c0
0:25:53.408027277 13546 0x8881290 DEBUG default rtsp-thread-pool.c:173:gst_rtsp_thread_stop: stop thread 0x87547a0
0:25:53.408031920 13546 0x8881290 DEBUG default rtsp-thread-pool.c:176:gst_rtsp_thread_stop: add idle source to quit mainloop of thread 0x87547a0
Client:
Progress: (open) Retrieving media info 0:00:00.193900827 13655 0x8c19980 DEBUG rtspsrc gstrtspsrc.c:5403:gst_rtspsrc_try_send: received response message
0:00:00.193918406 13655 0x8c19980 DEBUG rtspsrc gstrtspsrc.c:5418:gst_rtspsrc_try_send: got response message 401
0:00:00.193928678 13655 0x8c19980 DEBUG rtspsrc gstrtspsrc.c:5310:gst_rtspsrc_setup_auth: Attempting authentication using credentials from the properties
0:00:00.193939675 13655 0x8c19980 WARN rtspsrc gstrtspsrc.c:5630:gst_rtspsrc_send: error: Got error response: 401 (Unauthorized).
0:00:00.193970211 13655 0x8c19980 DEBUG rtspsrc gstrtspsrc.c:6903:gst_rtspsrc_retrieve_sdp: free connection
0:00:00.193980213 13655 0x8c19980 DEBUG rtspsrc gstrtspsrc.c:4208:gst_rtsp_conninfo_close: closing connection... ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
Is there anyone faced the same with me? It seems that I cannot send the authorization information to the server. Below is the pipeline from the client:
gst-laucnh-1.0 -v rtspsrc location=rtsps://127.0.0.1:8554 tls-validation-flags=generic-error user-id=user user-pwd=password ! decodebin ! autovideosink
Thanks for your advices and supports.

I can make it work now.
Enable too much log level influenced to the parsing object from client.
And the correct pipeline from client side should be:
gst-launch-1.0 -v rtspsrc location=rtsps://user:password#127.0.0.1:8554/stream tls-validation-flags=generic-error ! decodebin ! autovideosink
Thanks.

Related

Airflow task won't start because Failed to fetch log file from worker. Request URL is missing

I have several task in our dag that won't start running. When I checked the airflow log, there was an error and the error was below.
FYI , we are using Airflow 2.2.5
*** Log file does not exist:
*** Fetching from:
*** Failed to fetch log file from worker. Request URL is missing an 'http://' or 'https://' protocol.
Does anybody can help me resolving this issue?
Thank you

404 - The file you requested could not be found

My icecast2 server is running and I can see my admin. My config file is setup also with a normal mount set. My source client is liquidsoap, this is my code:
#!/usr/bin/liquidsoap
# Log dir
set("log.file.path","/var/log/liquidsoap/basic-radio.log")
jazz = playlist("/var/www/html/stream/audio/mp3/jazz")
popular = playlist.safe("/var/www/html/stream/audio/mp3/popular-music")
radio = fallback(
[ switch(
[
({ 0h-12h }, jazz),
({ 12h01-23h59 }, popular),
]),
jazz])
#radio = random(weights=[1,5],[ jazz, radio ])
# Stream it out
output.icecast(%mp3,
host = "18.221.199.44", port = 8000,
, mount = "ssp-radio",
radio)
My .liq file is inside /etc/liquidsoap/, filename is radio.liq
But when I try to load from the browser my streaming at http://someserver.com:8000/ssp-radio an error "404 - The file you requested could not be found! " is returned
I also found these in my error log:
[2018-01-10 11:49:21] INFO fserve/fserve_client_create checking for
file /icecast.png (/etc/icecast2/web/icecast.png)
[2018-01-10 11:49:21] WARN fserve/fserve_client_create req for file
"/etc/icecast2/web/icecast.png" No such file or directory
[2018-01-10 11:49:23] INFO fserve/fserve_client_create checking for
file /style.css (/etc/icecast2/web/style.css)
[2018-01-10 17:09:13] INFO fserve/fserve_client_create checking for
file /style.css (/etc/icecast2/web/style.css)
[2018-01-10 17:22:26] INFO fserve/fserve_client_create checking for
file /style.css (/etc/icecast2/web/style.css)
[2018-01-10 17:22:28] INFO fserve/fserve_client_create checking for
file /style.css (/etc/icecast2/web/style.css)
[2018-01-10 18:16:04] INFO sighandler/_sig_die Caught signal 15,
shutting down...
[2018-01-10 18:16:04] INFO main/main Shutting down
[2018-01-10 18:16:04] INFO fserve/fserve_shutdown file serving stopped
[2018-01-10 18:16:05] INFO slave/_slave_thread shutting down current
relays
[2018-01-10 18:16:05] INFO slave/_slave_thread Slave thread shutdown
complete
[2018-01-10 18:16:05] INFO auth/auth_shutdown Auth shutdown
[2018-01-10 18:16:05] INFO yp/yp_shutdown YP thread down
[2018-01-10 18:16:05] INFO stats/stats_shutdown stats thread finished
[2018-01-10 18:16:05] INFO auth/auth_run_thread Authenication thread
shutting down
When I try to load this one: http://some-ip:8000/admin/listclients?mount=/ssp-radio
it says:
400 - Source does not exist
it's looping and I can't stop the server so I need to exit the terminal
What does this mean? No mountpoint is listed in my admin as well. Please help. Thanks
Update:
This is the output from liquidsoap:
2018/01/15 13:08:15 [popular-music:3] Successfully loaded a playlist of
23 tracks.
2018/01/15 13:08:15 [jazz:3] Prepared
"/var/www/html/mediafiles/audio/jazz/1-14_Let_Me_Be_The_One.mp3" (RID
3).
2018/01/15 13:08:15 [tea-media:3] Connecting mount tea-media for
source#my-server-ip-here...
2018/01/15 13:08:15 [tea-media:2] Connection failed: 403, Forbidden
(HTTP/1.0)
2018/01/15 13:08:15 [tea-media:3] Will try again in 3.00 sec.
strange error flushing buffer ...
strange error flushing buffer ...
2018/01/15 13:08:15 [threads:3] Created thread "wallclock_main" (1
total).
2018/01/15 13:08:15 [clock.wallclock_main:3] Streaming loop starts,
synchronized with wallclock.
2018/01/15 13:08:15 [fallback_4970:3] Switch to random_4968.
2018/01/15 13:08:15 [random_4968:3] Switch to jazz.
2018/01/15 13:08:19 [tea-media:3] Connecting mount tea-media for
source#my-server-ip-here...
2018/01/15 13:08:19 [tea-media:2] Connection failed: 403, Forbidden
(HTTP/1.0)
2018/01/15 13:08:19 [tea-media:3] Will try again in 3.00 sec.
strange error flushing buffer ...
strange error flushing buffer ...
2018/01/15 13:08:23 [tea-media:3] Connecting mount tea-media for
source#my-server-ip-here...
2018/01/15 13:08:23 [tea-media:2] Connection failed: 403, Forbidden
(HTTP/1.0)
2018/01/15 13:08:23 [tea-media:3] Will try again in 3.00 sec.
strange error flushing buffer ...
strange error flushing buffer ...
2018/01/15 13:08:27 [tea-media:3] Connecting mount tea-media for
source#my-server-ip-here...
2018/01/15 13:08:27 [tea-media:2] Connection failed: 403, Forbidden
(HTTP/1.0)
2018/01/15 13:08:27 [tea-media:3] Will try again in 3.00 sec.
strange error flushing buffer .
...and so on
As you can see from the liquidsoap log, it fails to connect, apparently:
2018/01/15 13:08:19 [tea-media:2] Connection failed: 403, Forbidden (HTTP/1.0)
So likely you supplied the wrong username or password in liquidsoap, and therefore liquidsoap can't connect to the Icecast server.
Make sure you are using the correct source authentication username (usually source) and password (configured in your icecast.xml as source password).

Web deploy issue with sitecore media files

I am using File system for media and trying to get Web Deploy to work between CM and CD but running into issue when I try to publish media item.
My WebDeploy.config looks like this:
<targetDatabase>web</targetDatabase>
<targetServer>cd-site</targetServer>
<userName>Administrator</userName>
<password>pwd</password>
<localRoot>C:\inetpub\wwwroot\CM\Website</localRoot>
<remoteRoot>C:\inetpub\wwwroot\CD\Website</remoteRoot>
<items hint="list:AddPath">
<media>App_Data/MediaFiles</media>
</items>
I cant seem to get pass this error in sitecore after publish, any ideas?:
5652 02:01:11 INFO Job started: Publish to 'web'
ManagedPoolThread #13 02:01:11 INFO MSDEPLOY: Performing synchronization for App_Data/MediaFiles
ManagedPoolThread #13 02:01:11 ERROR MSDEPLOY: Failed to synchronize folder App_Data/MediaFiles. Please verify that the folder exists and is accessible.
Exception: Microsoft.Web.Deployment.DeploymentAgentUnavailableException: Remote agent (URL http://cd-site/MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer. ---> Microsoft.Web.Deployment.DeploymentException: An unsupported response was received. The response header 'MSDeploy.Response' was '' but 'v1' was expected. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request)
at Microsoft.Web.Deployment.AgentClientProvider.CreateStatusThread(DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Sitecore.Publishing.WebDeploy.DeploymentTaskRunner.Execute()
I fixed this by installing Web Deploy from WebPI. For some reason when I only installed Web Deploy 3.6 independently the services were not registered properly. After installing via WebPI the publishing job instantly started working.

NXLog TCP Module Not Working

I am trying to use NXLog to forward logs from a file on one computer to a file on another computer. I am new to NXLog but feel like I now have a good handle on it after consulting the documentation. Below is my configuration file for first the "from" computer and then the "to" computer. However, it does not seem to work.
I think the problems lies in one or more of the following:
NXLog config file
AWS Windows ec2 box ip/port setup
Network setup
Here what I have done:
"From" computer NXLog config file:
define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension _syslog>
Module xm_syslog
</Extension>
<Input file>
Module im_file
File "C:\Logs\AllLogItems.txt"
InputType LineBased
</Input>
<Output tcp>
Module om_tcp
Host 52.91.47.52
Port 3389
OutputType LineBased
</Output>
<Route 1>
Path file => tcp
</Route>
"To" computer NXLog config file:
define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension _syslog>
Module xm_syslog
</Extension>
<Input in>
Module im_tcp
InputType LineBased
</Input>
<Output out>
Module om_file
File "C:\Users\Administrator\logs\\nxlog_test.txt"
CreateDir FALSE
Truncate FALSE
OutputType LineBased
</Output>
<Route 1>
Path in => out
</Route>
For the "to" computer, according to the documentation, if no Host is specified, localhost is the default.
When I start the NXLog service on the "from" computer this is what the log looks like:
2016-01-21 19:37:05 INFO nxlog-ce-2.9.1504 started
2016-01-21 19:37:05 INFO connecting to 52.91.47.52:3389
And then when I run my application which will write logs(which will then cause nxlog to react), the nxlog log looks like this:
2016-01-21 19:37:05 INFO nxlog-ce-2.9.1504 started
2016-01-21 19:37:05 INFO connecting to 52.91.47.52:3389
2016-01-21 19:40:25 INFO reconnecting in 1 seconds
2016-01-21 19:40:26 INFO connecting to 52.91.47.52:3389
When I start NXLog on the "to" computer, every seems to be fine as the nxlog log file looks like this:
2016-01-22 01:05:04 INFO nxlog-ce-2.9.1504 started
Now, the "to" computer is a AWS ec2 Windows box. The port I'm using in the nxlog (3389) is the RDP port assigned to the instance:
My thought was that even though the nxlog log didn't show an error, that this port was causing issues as is may be in use. Hence, I tried to open some more tcp ports (5000-5010) as shown in the picture. However, when I try any of these ports (5000-5010) in the nxlog config file, I get this error:
2016-01-21 19:50:32 INFO nxlog-ce-2.9.1504 started
2016-01-21 19:50:32 INFO connecting to 52.91.47.52:5005
2016-01-21 19:50:53 INFO reconnecting in 1 seconds
2016-01-21 19:50:53 ERROR couldn't connect to tcp socket on 52.91.47.52:5005; 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.
I kind of expected this as when I go to a site like yougetsignal.com, it still says that ports 5000-5010 are closed. So it might be a problem with this.
I've tried to debug this for days and have ran out of options. Thanks for your help.
Decided this was a question more appropriate on ServerFault and so I posted it there are received a working answer. It can be found here

`lein deploy clojars` gives Connection reset by peer: socket write error

I get the error I/O exception (java.net.SocketException)
caught when processing request: Connection reset by peer:
socket write error when I try to deploy a lib to clojars. I
tried it several times, in a span of 20 days.
C:\Users\oskarkv\Desktop\jmonkeyengine-read-only\engine>lein deploy clojars
No credentials found for clojars
See `lein help deploy` for how to configure credentials.
Username: oskarkv
Password:
Wrote C:\Users\oskarkv\Desktop\jmonkeyengine-read-only\engine\pom.xml
Created C:\Users\oskarkv\Desktop\jmonkeyengine-read-only\engine\target\jmonkeyengine-3.0.1-SNAPSHOT.jar
Could not find metadata org.clojars.oskarkv:jmonkeyengine:3.0.1-SNAPSHOT/maven-metadata.xml in clojars (https://clojars.org/repo/)
Sending org/clojars/oskarkv/jmonkeyengine/3.0.1-SNAPSHOT/jmonkeyengine-3.0.1-20130817.134749-1.pom (2k)
to https://clojars.org/repo/
Sending org/clojars/oskarkv/jmonkeyengine/3.0.1-SNAPSHOT/jmonkeyengine-3.0.1-20130817.134749-1.jar (79156k)
to https://clojars.org/repo/
aug 17, 2013 3:48:24 EM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
aug 17, 2013 3:48:24 EM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
aug 17, 2013 3:48:54 EM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
aug 17, 2013 3:48:54 EM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
aug 17, 2013 3:49:24 EM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
aug 17, 2013 3:49:24 EM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
Could not transfer artifact org.clojars.oskarkv:jmonkeyengine:jar:3.0.1-20130817.134749-1 from/to clojars (https://clojars.org/repo/): Connection rese
t by peer: socket write error
Failed to deploy artifacts: Could not transfer artifact org.clojars.oskarkv:jmonkeyengine:jar:3.0.1-20130817.134749-1 from/to clojars (https://clojars
.org/repo/): Connection reset by peer: socket write error
Maybe size matters, because I tried to deploy a project I
just created by doing lein new testclojars, and that seemed
to work.
C:\Users\oskarkv\Desktop\jmonkeyengine-read-only\test\testclojars>lein deploy clojars
WARNING: please set :description in project.clj.
WARNING: please set :url in project.clj.
No credentials found for clojars
See `lein help deploy` for how to configure credentials.
Username: oskarkv
Password:
Wrote C:\Users\oskarkv\Desktop\jmonkeyengine-read-only\test\testclojars\pom.xml
Created C:\Users\oskarkv\Desktop\jmonkeyengine-read-only\test\testclojars\target\testclojars-0.1.0-SNAPSHOT.jar
Could not find metadata org.clojars.oskarkv:testclojars:0.1.0-SNAPSHOT/maven-metadata.xml in clojars (https://clojars.org/repo/)
Sending org/clojars/oskarkv/testclojars/0.1.0-SNAPSHOT/testclojars-0.1.0-20130817.133946-1.pom (2k)
to https://clojars.org/repo/
Sending org/clojars/oskarkv/testclojars/0.1.0-SNAPSHOT/testclojars-0.1.0-20130817.133946-1.jar (2k)
to https://clojars.org/repo/
Could not find metadata org.clojars.oskarkv:testclojars/maven-metadata.xml in clojars (https://clojars.org/repo/)
Sending org/clojars/oskarkv/testclojars/0.1.0-SNAPSHOT/maven-metadata.xml (1k)
to https://clojars.org/repo/
Sending org/clojars/oskarkv/testclojars/maven-metadata.xml (1k)
to https://clojars.org/repo/
C:\Users\oskarkv\Desktop\jmonkeyengine-read-only\test\testclojars>
Any ideas of what could be wrong?
Apparently there is a 20 MB limit on files that one sends to clojars.