Ubuntu can be weird with some sudo commands, frequently the cause is missing environment settings or it gets confused by the trailing &. To rule that out, and possibly give you better error messages or results, try running your commands like this to see if it works better for you:
[brad@servername ~]$ sudo su - [root@servername ~]# trafficserver start Then see what is running. Mine looks like this (on RHEL, not Ubuntu, but should be similar with yours being in /usr/bin) [root@servername ~]# ps -ef|grep traff root 6797 1 0 Jan15 ? 00:00:21 /usr/local/bin/traffic_cop nobody 6799 6797 0 Jan15 ? 00:10:05 /usr/local/bin/traffic_manager nobody 6834 6799 1 Jan15 ? 11:44:36 /usr/local/bin/traffic_server -M --httpport 80:fd=7,8080:fd=8 root 7903 7833 0 07:10 pts/0 00:00:00 grep traff Brad -----Original Message----- From: G. T. Stresen-Reuter [mailto:[email protected]] Sent: Thursday, February 14, 2013 4:48 AM To: [email protected] Subject: Re: How to Start Trafficserver on Init (Ubuntu Precise 12.04) On Feb 12, 2013, at 3:02 PM, Williamson, Brad wrote: > I've had this script kicking around for a while. I'm sure the purists > will have other ways of doing things, but this works for me and added SNMP > abilities to ATS that were not otherwise available. I've posted it here: > http://www.8layer8.com/?p=997 Feel free to use and modify for your use. > Brad Thanks a lot for the ideas. Nice script! When I know more about this product I'm sure I'll appreciate it even more... I reviewed the script and see right off the bat that there are some inconsistencies among platforms and/or versions. For example, in your script you use the trafficserver command (located in /usr/local/bin) to control the server. On my installation (Ubuntu precise 12.04) that command doesn't exist (probably because I installed it from a package). Rather, there are a series of commands in /urs/bin starting with traffic_* Somewhere else on the interwebs I saw someone say you should use traffic_manager to control the server, but there is no man page associated with the program. If I run "sudo traffic_manager start" everything seems to run properly but "sudo traffic_manager start &" or "sudo nohup traffic_manager start" a really weird thing happens.... the process continues to run but the command returns either 1 or 2 (can't remember) with a message saying it quit, and although ps ax shows the service running, users seem unable to connect (but I could be wrong about that... haven't tested thoroughly enough because I saw the error). I've also tried using traffic_line as documented here: http://trafficserver.apache.org/docs/trunk/admin/traffic-line-commands/index.en.html but no love here either. The result of the command "sudo traffic_line -L" (which the documentation would lead me to believe is to start up the service) is "error: the requested command failed" So, any additional pointers would be greatly appreciated! Sincerely, Ted Stresen-Reuter
