Wednesday, August 27, 2014

changing servers with an upgrade

Migrating data from Internap (formerly Voxel) to Codero, we found that the upgrade from Ubuntu 10.04 to 14.04 breaks many of our configuration files. Apache and vsftpd in particular. Icecast remains at the same version, but our icecast scripts which use small binary files needed re-compiling, of course.

Apache:

  • Merely creating symlinks did not seem to work - we had to run a2enmod and a2ensite for them to work properly. This included a2enmod cgi , without which the awstats perl scripts were being shown as plain text :)
  • The default website name has changed from default to 000-default - without that, requests to the server using the ip address or using other names will not work. 
  • The configuration files in sites-available needed to have .conf at the end.
  • The old method of
    Order Allow, Deny
    Allow from all

    had to be changed as per this post to
    Require all granted
  • Many more changes in apache2.conf, so we just modified the newer apache2.conf step-by-step with our old requirements
Vsftpd:

This needed additional config lines as per this post, done by PB, added the lines 

chroot_local_user=YES
allow_writeable_chroot=YES
and restarted vsftpd to fix the problem with not being able to write using ftp. 

Icecast:

We created symlinks to mp3info, mp3splt etc since the paths to these given in the old scripts had changed. Also recompiled the "CCodes" files. cc filename.c -o filename_of_executable

We tried to run icecast from init scripts, but just changing the USERID and GROUPID in the icecast2 init script was not enough. Perhaps we have to add chroot and run as user parameters also in the xml config file - we have to explore this later. 

We also tried some techniques to try and get Telugustream to mirror the live from mandir stream only during live times, but the methods we tried did not work.

livefrommandirfortelugustream as an alias for livemandir, and having autotelugu as fallback-mount for livefrommandirfortelugustream did not work in that the alias does not work in cascaded fashion - we already have :8020/ aliased to telugustream, but this does not follow the alias to livemandir. 

Also, trying to make livefrommandirfortelugustream a relay of livemandir works, but when livemandir ends, it has the fallback-mount of autoasia, so livefrommandirfortelugustream continues to get the relay audio instead of falling back to autotelugu. 

So we have to retain our method of switching config files using a shell script and manually dumping telugustream users to the relevant mountpoint using icecast's /admin/moveclients.xsl called using wget. 



No comments:

Post a Comment