Ticket #293 (closed Bugs: fixed)

Opened 15 months ago

Last modified 2 weeks ago

Better information on shout login failure

Reported by: mrpingouin Owned by: admin
Priority: 1 Milestone:
Component: Liquidsoap Version:
Keywords: Cc:
Mac OSX: yes Linux: yes
NetBSD: yes Other Operating System: yes
FreeBSD: yes

Description

Logging to icecast with a wrong password does not give very informative logs:

2009/06/20 11:14:26 [test(dot)ogg:3] Connecting mount test.ogg for source@localhost...
2009/06/20 11:14:26 [threads:3] Created thread "root" (1 total).
2009/06/20 11:14:26 [test(dot)ogg:2] Connection failed: not connected
2009/06/20 11:14:26 [threads:1] Thread "root" aborts with exception Cry.Error(6)!
Thread 4 killed on uncaught exception Cry.Error(6)

Change History

Changed 15 months ago by mrpingouin

I get the exact same log when the mountpoint is already taken.

Changed 15 months ago by toots

There is already an explicit message:

      (* Final *)
      try
        begin try
          Cry.connect connection source
        with
          | Cry.Error x as e ->
              self#log#f 2
                "Connection failed: %s"
                (Cry.string_of_error x) ;
              raise e
        end ;

The problem here seems to be that it fails with an error that should not happen upon connecting:

2009/06/20 11:14:26 [test(dot)ogg:2] Connection failed: not connected

Changed 12 months ago by toots

  • status changed from new to closed
  • resolution set to fixed

Hi !

I believe this ticket should be closed. As such, ocaml-cry is still being developped. I believe your issue was more an implementation issue than a wrong information. I also hope it is fixed now...

Changed 12 months ago by mrpingouin

  • status changed from closed to reopened
  • resolution fixed deleted

Here is the kind of log that I get with the latest cry and liquidsoap:

$ src/liquidsoap --no-pervasives 'output.icecast.vorbis(mount="bite.ogg",blank())'
2009/09/11 11:45:18 >>> LOG START
2009/09/11 11:45:18 [protocols.external:3] Didn't find "ufetch"
2009/09/11 11:45:18 [protocols.external:3] Found "/usr/bin/wget"
2009/09/11 11:45:18 [main:3] Liquidsoap 0.9.1+svn (trunk/liquidsoap@rev6727)
2009/09/11 11:45:18 [threads:3] Created thread "generic queue #1".
2009/09/11 11:45:18 [root:3] Waking up active nodes...
2009/09/11 11:45:18 [bite(dot)ogg:3] Connecting mount bite.ogg for source@localhost...
2009/09/11 11:45:18 [threads:3] Created thread "root" (1 total).
2009/09/11 11:45:18 [bite(dot)ogg:2] Connection failed: not connected
2009/09/11 11:45:18 [threads:1] Thread "root" aborts with exception Cry.Error(6)!
2009/09/11 11:45:18 [main:3] Shutdown started!
2009/09/11 11:45:18 [main:3] Waiting for threads to terminate...
Thread 3 killed on uncaught exception Cry.Error(6)
2009/09/11 11:45:18 [main:3] Cleaning downloaded files...
2009/09/11 11:45:18 >>> LOG END

Cry.Error(6) is not informative, so I reopen the ticket. Before ocaml-cry, the message was not great, saying it was either a mispelled password, hostname or whatever. But at least it was readable and a bit helpful.

Also, if possible I would like to avoid violent deaths of threads in "normal" situations like this. I'm not sure that we can get this easily, but this should not look like a bug.

Changed 12 months ago by toots

Ok, thanks for reopening, I though it was the fact that an exception is raised that worried you.

Anyway, your issue was in fact a small bug: cleanup actions done before reraising an exception were not protected, leading to the raise of a new exception. This is fixed now, thanks !

Changed 12 months ago by metamorph68

  • status changed from reopened to closed
  • resolution set to fixed

(In [6729]) Prevent any new exception raised when cleaning up before raising a catched exception. fixes #293

Changed 12 months ago by toots

I forgot.

The error message for wrong password is now:

2009/09/12 11:57:13 [test:3] Connecting mount test for source@localhost...
2009/09/12 11:57:13 [test:2] Connection failed: 401, Authentication Required (HTTP/1.0)

The error message for wrong server is now:

2009/09/12 12:07:57 [test:3] Connecting mount test for source@gni...
2009/09/12 12:07:57 [test:2] Connection failed: could not connect to host

Changed 2 weeks ago by metamorph68

(In [6729]) Prevent any new exception raised when cleaning up before raising a catched exception. fixes #293

Changed 2 weeks ago by metamorph68

(In [6729]) Prevent any new exception raised when cleaning up before raising a catched exception. fixes #293

Note: See TracTickets for help on using tickets.