2

This is copy from question of some guy on other forum that never got satisfiably answered.

I encountered the same error few days ago on Ubuntu 13.04 Desktop. It seems like Red5 is installed but it cannot be run for some reason. Can anyone explain what is going on here? Why should dpkg fail? I mean, this is checked repo, it should work fine.

apt-get install red5-server
Selecting previously deselected package red5-server.
(Reading database ... 53491 files and directories currently installed.) Unpacking red5-server (from .../red5-server_0.9.1-4squeeze1_all.deb) ...
Setting up red5-server (0.9.1-4squeeze1) ...
Starting Flash streaming server : red5-server failed!
invoke-rc.d: initscript red5-server, action "start" failed.
dpkg: error processing red5-server (--configure):
subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
Errors were encountered while processing:
red5-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Logfile error.log in /usr/share/red5/log was completely empty. Other logs were not but according to them, there were no problems at all.


I solved the problem, but I doubt that other people to whom the same happens will be happy with the solution. I tried everything I know, then I lost my nerves and reinstalled whole Ubuntu.

Put on Ubuntu server 12.10.
I discovered that Ubuntu 13 is not quite stable, and must admit that I am somewhat angry with the developers. Well, on Ubuntu 12.10 I did:

# apt-get install red5-server

without getting java in advance, and everything went fine. But afterwards I succeeded only to run the Red5 HTTP server, but any demo i tried to run never connected to it and never played any VOD.
In fact, I tried to install adminpanel plugin, but this crashed whole Red5 and it was unable to start.
I deleted the plugin, and Red5 started again normally. Finally I went mad and gave up on Red5. Installed Flumotion instead and cannot tell that I have more success with it.

Nevertheless it would be nice if someone finally give us the real answer to the question.

fossfreedom
  • 172,746
Dalen
  • 31
  • 1
  • 9
  • Welcome to Ask Ubuntu! Well, this is usually because there are still configuration files left behind in a state in which Red5 is not able to start. Do you indeed have Red5 installed earlier on that machine? A valid start of the service is required by APT/DPKG in the last step. Also: what do the logs of Red5 say? Do they provide you with a clue as to why it cannot start? Please edit your question to provide all these details. – gertvdijk Jun 23 '13 at 22:29
  • It is a fresh installation of Ubuntu 13.04 Desktop. I doubt that the Red5 was preinstalled. I heard that Red5 is now part of OpenMeetings, but I don't know whether 13.04 has OpenMeetings preinstalled as well. I will happyly edit the Q and add log details, but I currently don't have access to the machine in question. I will edit it after couple of days, sorry. Do you think that apt-getting Java in advance caused the problem? Should I left to Red5 the dependency fetching? I rarely deal with Java apps, so I don't know. – Dalen Nov 17 '15 at 03:02
  • It is a fresh installation of Ubuntu 13.04 Desktop. I doubt that the Red5 was preinstalled. I heared that Red5 is now part of OpenMeetings, but I don't know whether 13.04 has OpenMeetings preinstalled as well. I will happyly edit the Q and add log details, but I currently don't have access to the machine in question. I will edit it after couple of days, sorry. Do you think that apt-getting Java in advance caused the problem? Should I left to Red5 the dependency fetching? I rarely deal with Java apps, so I don't know. – Dalen Jun 24 '13 at 18:04
  • Are you experiencing this problem again? In any case removing set -e from /var/lib/dpkg/info/red5-server.postrm should do, as this will force dpkg to ignore errors in the post removal script thus preventing it from exiting on error. – kos Nov 17 '15 at 18:17
  • I'm not sure that I understand what your question is. As the server is installed correctly? As the admin panel is installed? For which Ubuntu release: Precise, Trusty, Wily? – A.B. Nov 17 '15 at 18:26
  • The confusion is caused by fossfreedom's edit. From line "I solved the problem..." onward was posted as an answer before. Now is part of Q. Server installed all right only when Java wasn't installed before on the OS. I reinstalled Ubuntu and did apt-get red5 from the start, and then it installed OK, but wasn't showing any intentions of working correctly. – Dalen Nov 17 '15 at 23:23
  • @kos : Would you mind posting your solution as an answer? – Dalen Nov 17 '15 at 23:26
  • No, I never tried it again, simply wrote myown server and am not having any troubles with it nor with its configuration. It's only that I was notified that the Q gets big attention. That can only mean that people are having still this problem and lend from Google right here. And here is no real answer still. So I felt that I can try reactivating this Q in a hope that someone found the solution in these few years. – Dalen Nov 17 '15 at 23:31
  • Anyway this Q is becoming a mess with all these edits deletions etc. Perhaps I should conclude that nobody has this problem any longer and just delete the Q. Leave people to struggle themselves and ask their own Qs if they need. – Dalen Nov 17 '15 at 23:37
  • I could install the thing without problems in Wily. – A.B. Nov 18 '15 at 17:00
  • And you had Java preinstalled manually using apt-get? – Dalen Nov 18 '15 at 17:17
  • Yes, Java was installed. – A.B. Nov 22 '15 at 13:13
  • @Dalen, I got similar case within fresh Ubuntu 14.04. Here is the full log. The installation passed ok after I have installed libtomcat6-java , I've already all source component active (main, universe, multiverse, restricted). However the red5-server service stopped/killed just a second after starting it and most of the tries was failing to start. – user.dz Nov 22 '15 at 15:09
  • @Sneetsher : would you mind elaborating a bit and posting your solution as an answer? Please. – Dalen Nov 22 '15 at 22:46
  • @Dalen, that does not count as answer, because the red5-server still fail to start. As the only current way to install it is through tarball. this question may be better marked a duplicate of http://askubuntu.com/q/674859/26246. – user.dz Nov 22 '15 at 23:46
  • Unfortunately it is a valid, and in many cases probably correct, answer. Because I asked how to install it, not how to make it work. Having reference to another Q will be enough. As I said, technically you answered the Q. When I started having non-working red5 but installed OK, I threw it away thinking that Ubuntu 13 or Java are to blame. – Dalen Nov 23 '15 at 00:08
  • I sincerely hope that this and the Q mentioned by Sneetsher will help anyone who lends here from search engine now. I'll leave a bounty opened a bit longer, but I think this is now everything we can squeeze out of this Q. Now I know that red5 should be installed from tarball I'd probably give it a second chance. – Dalen Nov 23 '15 at 00:15

2 Answers2

1

Installing a server has nothing to do with luck. Either it works or not. Software isn't magic. For this reason, first force to finish the installation, because with a broken package system you can't install other needed packages, if they are needed.

After that, you can solve the server start problem.


In a fresh Ubuntu 15.10 Wily (VM) installation is nothing more to do than

sudo apt-get install red5-server

All needed dependencies will be installed correctly. If you do not trust me, then I install Ubuntu again and give you the full output of the installation. ;)


However, if problems occur in an installation script, in your case in

/var/lib/dpkg/info/red5-server.postinst

then it is always a good idea to take a look at the script. If there is this line

set -e

replace with

# set -e

and run

sudo apt-get install -f

or find, where the server will be started, something like

invoke-rc.d red5-server start

and comment out the start procedure. And run

sudo apt-get install -f

Then you'll need to find out why the server fails to start, but the installation can be completed.

A.B.
  • 90,397
  • OK, so you think it is OK to ignore these errors and say to dpkg that everything went fine. I mean, will this work. Usually when there is an error, there is a reason for it, and, usually it shouldn't be ignored. So, is this one safe to ignore? – Dalen Nov 22 '15 at 22:51
  • 1
    Yes, but in this case, it's an error during the start of a service. And it's better to finish the installation first. After that, you can solve the other problem. But I have this already written in my answer. – A.B. Nov 23 '15 at 06:55
  • And I've never said, you should ignore an error. What do you talking about? – A.B. Nov 23 '15 at 07:05
  • Sorry A.B, I forget to mention that in my answer. @Dalen, The problem you got was due failing to start service Starting Flash streaming server : red5-server failed! ... red5-server, action "start" failed.. As mentioned in A.B.'s answer #set -e is the quickest solution to let installation complete as it possible to comment only the service related commands in postinst script. :) A.B it's still a luck for installation be cause i still facing a racing condition here starting the service manual sometime came [OK] other times [FAIL] so it's possible to face one of these ways. – user.dz Nov 23 '15 at 10:01
  • No, no, a-b, I just worded it wrong. Not ignore in a sense that you forget all about it. Just I didn't know that installation broke because postscript was trying to start the server. Well, of course, it depends upon why installation tried to do it, but usually installations of servers do start them after installing them just to be active and for nothing more. Your answer is accepted. @Sneetsher: It is never late to edit and add what you missed before. I really hope that this is now a complete answer and that it will help people to get going. – Dalen Nov 23 '15 at 16:04
  • About red5 not working after installing with apt-get, well, referenced Q by Sneetsher should solve that part. Sneetsher you may add that link in your A as well, to be easier for people to find it. – Dalen Nov 23 '15 at 16:06
1

Quick way

Here is the closed upstream bug report: Installation fails on Ubuntu 14.04 #29 seem the deb package is not updated and the original author suggest using the upstream tarball. He also mentioned:

If anyone knows how to update the .deb stuff, let us know and we will take care of it.

Follow the accepted answer in Ubuntu Trusty red5-server installation fails to start which contains the instructions to install the upstream package.


The problem was due failing to start service:

Starting Flash streaming server : red5-server failed!
invoke-rc.d: initscript red5-server, action "start" failed.

As mentioned in A.B.'s answer #set -e is the quickest solution to let installation complete as it possible to comment only the service related commands in postinst script:

#invoke-rc.d red5-server start || exit $?

As 12.10/13.04 are not LTS and no longer supported here. I test it on a fresh Ubuntu 14.04. All source component are active (main, universe, multiverse, restricted).

  1. Update package list

    sudo apt-get update
    
  2. Trying to install red5-server

    sudo apt-get install red5-server

    [sudo] password for user: 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     red5-server : Depends: libtomcat6-java (>= 6.0.20-7) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    
  3. So install libtomcat6-java first:

    sudo apt-get install libtomcat6-java
    
  4. Then install red5-server

    sudo apt-get install red5-server
    

Here is the full log. The installation passed ok after I have installed libtomcat6-java ,

However the red5-server service stopped/killed just a second after starting it and most of the tries was failing to start.

user@user-14-sudo:~$ sudo service red5-server status
[sudo] password for user: 
 * Checking status of Flash streaming server red5-server                 [fail] 

user@user-14-sudo:~$ sudo service red5-server start
 * Starting Flash streaming server  red5-server                          [ OK ] 

user@user-14-sudo:~$ sudo service red5-server status
 * Checking status of Flash streaming server red5-server                 [fail] 

Even if the service started OK is will crash in a second. So I think my success to install it without error was just a luck. It's possible to raise an error if the service fail when started by postinst.

I looked around for similar case, there is many unresolved bug report raised for this:

user.dz
  • 48,105