You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2009/11/03 02:57:59 UTC

[jira] Created: (TS-6) traffic_manager does not start

traffic_manager does not start
------------------------------

                 Key: TS-6
                 URL: https://issues.apache.org/jira/browse/TS-6
             Project: Traffic Server
          Issue Type: Bug
          Components: Build
            Reporter: Leif Hedstrom


Seems some paths aren't properly set via the configure script or something:

root@fc11 204/0 # ./bin/traffic_manager 
Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
(last system error 2: No such file or directory)root@fc11 205/0 # 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-6) traffic_manager does not start

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779483#action_12779483 ] 

Leif Hedstrom commented on TS-6:
--------------------------------

I should use the --prefix as the home dir.

> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TS-6) traffic_manager does not start

Posted by "Andrew Hsu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Hsu reassigned TS-6:
---------------------------

    Assignee: Andrew Hsu

> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-6) traffic_manager does not start

Posted by "George Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Paul updated TS-6:
-------------------------

    Attachment: TS-6_traffic_manager_patch4.diff

Last patch was prepared a little to quickly :-(

This updated patch replaces TS-6_traffic_manager_patch3.diff

patch -p0 -i TS-6_traffic_manager_patch4.diff

It addresses 2 more cases of TS_ROOT instead of ATS_ROOT.

-George

> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>         Attachments: TS-6_traffic_manager_patch1.diff, TS-6_traffic_manager_patch2.diff, TS-6_traffic_manager_patch3.diff, TS-6_traffic_manager_patch4.diff
>
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-6) traffic_manager does not start

Posted by "George Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Paul updated TS-6:
-------------------------

    Attachment: TS-6_traffic_manager_patch2.diff

This updated patch replaces TS-6_traffic_manager_patch1.diff and reflects changes incorporated by patch TS-21_stats_patch3.diff. 

patch -p0 -i TS-6_traffic_manager_patch2.diff

You need to set 'proxy.config.cluster.ethernet_interface' in 'proxy/config/records.config.in' to a valid interface like 'eth0'.

You can bring up Traffic manager on linux:

sudo  $PREFIX/bin/traffic_manager 

Traffic Manger will come up with the Web interface disabled but you can execute the 'sudo $PREFIX/bin/traffic_shell' command and see some stats.

When this ticket gets closed a new ticket should be opened up regarding the Traffic Manager WebUI.

-George

> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>         Attachments: TS-6_traffic_manager_patch1.diff, TS-6_traffic_manager_patch2.diff
>
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-6) traffic_manager does not start

Posted by "Zhao Yongming (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779355#action_12779355 ] 

Zhao Yongming commented on TS-6:
--------------------------------

there is /home/trafficserver dir hard coded in many place, we need to fix this, solutions:
1, create /home/trafficserver dir.
2, change to a system dir such as /tmp or /var/trafficserver
If we don't install the user trafficserver then we should not use /home/traffcserver, the /tmp is prefer for me.

any comment?

> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-6) traffic_manager does not start

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790381#action_12790381 ] 

Leif Hedstrom commented on TS-6:
--------------------------------

Couple of comments:

+ $(INSTALL) -d -o nobody -g nobody $(pkglocalstatedir) $(pkglogdir) $(pkgsysconfdir) $(pkgsysconfdir)/internal
+ $(INSTALL) -d $(pkglibexecdir)
+ echo $(prefix) > /etc/traffic_server


We need to try to avoid hardcoding nobody / nobody, and use something in autoconf to specify this. There's a separate Jira ticket filed for tihs as well, TS-15. It'd be great to get something for this as well (if you want to leave this as is for this diff, and work on TS-15 next, that's fine :).


Should we make this a little longer than 512? Maybe 1024 ?

+#define PATH_NAME_MAX 511 // instead of PATH_MAX which is inconsistent
+ // on various OSs (linux-4096,osx/bsd-1024,


That, or I'd say we should stick to PATH_MAX, and use the limitations as per each OS (which is fine IMO). That would be my preference I think, and the more I think about it, the more it makes sense to stick to the system defaults. This happens in several places in the diff.


For this:

+ if ((env_path = getenv("ATS_ROOT")) || (env_path = getenv("ATS_INST_ROOT"))) {
+ ink_strncpy(ts_path, env_path, PATH_NAME_MAX);

I think ATS_ROOT is adequate. The old "INST_ROOT" was added to deal with an internal "anomaly" (this occurs in several places). We should also document this usage of $TS_ROOT somewhere, and make sure we use it consistently throughout the code. I think though, that I'd prefer TS_ROOT instead of ATS_, but if you want to discuss that on the -dev@ mailing list, that's cool too.


This stuff:

+ if ((fp = fopen("/etc/traffic_server", "r")) != NULL) {
+ if (fgets(ts_path, PATH_NAME_MAX, fp) == NULL) {
+ fclose(fp);
+ Cli_Error("\nInvalid contents in /etc/traffic_server\n");
+ Cli_Error(" Please set correct path in either env variable ATS_ROOT or in /etc/traffic_server \n");
+ return -1;
+ }


Shouldn't /etc/traffic_server "default" to whatever --prefix was specified? So, in the default, it would be /usr/local/etc/trafficserver (note that it's not traffic_server either). I think we should change every reference to /etc/traffic_server (or /etc/trafficserver) to be $prefix/etc/trafficserver, this happens in many places in the code.


> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>         Attachments: TS-6_traffic_manager_patch1.diff, TS-6_traffic_manager_patch2.diff
>
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-6) traffic_manager does not start

Posted by "George Paul (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790475#action_12790475 ] 

George Paul commented on TS-6:
------------------------------

Response to comments:

1. user/group : nobody/nobody
Since there is a Jira Ticket TS-15 to cover this specific issue I would suggest that this issue gets fixed under that ticket :-)

2. PATH_NAME_MAX vs PATH_MAX
Originally PATH_NAME_MAX was to be used for PATH_MAX  for portability between OS's AFAIR. TS is more consistent in the use of PATH_NAME_MAX in the code base (cache, hostdb, plugins, etc) while TM is not as consistent. TC never used it. For TM I decided to pull the TS usage of PATH_NAME_MAX and make TM more consistent with this patch. For the default value I went with what is currently set for TS. We can bump it up to 1024. If the idea is to change to using PATH_MAX everywhere we should file a separate ticket and and also look at TC. TS usage would also have to be carefully examined.

3. ATS_ROOT vs TS_ROOT
TS_ROOT is fine by me

4. /etc/traffic_server
The idea was that first entry in '/etc/traffic_server' would point the to base/root install of the  version of TS that was designated to be run. You could have more than one entry in 
'/etc/traffic_server' so that you could switch/rollback to a previous version(s) if you wanted/needed to by making it the first entry in the file. If a different behavior is desired I would suggest that a new ticket should be filed so that it can be addressed more consistently across all the TS applications.

-George

> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>         Attachments: TS-6_traffic_manager_patch1.diff, TS-6_traffic_manager_patch2.diff
>
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-6) traffic_manager does not start

Posted by "George Paul (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780651#action_12780651 ] 

George Paul commented on TS-6:
------------------------------

I forgot to mention that Traffic Manager does come up with this patch but the WebUI is disabled and will have to fixed.
-George

> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>         Attachments: TS-6_traffic_manager_patch1.diff
>
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-6) traffic_manager does not start

Posted by "George Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Paul updated TS-6:
-------------------------

    Attachment: TS-6_traffic_manager_patch1.diff

This patch uses PREFIX,PKGLOCALSTATEDIR and PKGSYSCONFDIR to set default locations for config files, logs and IPC. It also adds a few more records config variables to set paths. This patch was used in conjuction with patches TS-36_patch1.diff and TS-21_stats_patch1.diff

patch -p0 -i TS-6_traffic_manager_patch1.diff

If you traffic_manger does not start and you see message like the following in /var/log/syslog:

Nov 19 17:36:12 wopr traffic_manager[25918]: {2243651312} NOTE: [LocalManager::initCCom] Unable to find network interface (null).  Exiting...

You need to set 'proxy.config.cluster.ethernet_interface' in 'proxy/config/records.config.in' to a valid interface like 'eth0'

Also make sure you set 'proxy.config.admin.user_id' to valid user if 'nobody' does not exist.

You can ignore the errors about filter_to_policy and /usr/sbin/sendmail not being found for now. Traffic Manager should start and bring up Traffic Server.

You can execute the '$PREFIX/bin/traffic_shell' command and see some stats
e.g.
% show:cache-stats

Bytes Used --- 1 GB
Cache Size --- 8 GB
--RAM Cache--
Total Bytes -- 9089024
Bytes Used --- 9085952
Hits --------- 32056
Misses ------- 41829
--Lookups--
In Progress -- 0
Hits --------- 0
Misses ------- 0
--Reads--
In Progress -- 0
Hits --------- 55481
Misses ------- 85613
--Writes--
In Progress -- 0
Hits --------- 69594
Misses ------- 15986
--Updates--
In Progress -- 0
Hits --------- 0
Misses ------- 0
--Removes--
In Progress -- 0
Hits --------- 0
Misses ------- 0

% show:http-stats

--Client--
Total Document Bytes ----- 1078 MB
Total Header Bytes ------- 19 MB
Total Connections -------- 0
Transactins In Progress -- 0
--Server--
Total Document Bytes ----- 654 MB
Total Header Bytes ------- 4 MB
Total Connections -------- 0
Transactins In Progress -- 0
%% show:proxy-stats

Document Hit Rate -------- 37.295738 %   *
Bandwidth Saving --------- 39.536240 %   *
Cache Percent Free ------- 90.791733 %
Open Server Connections -- 0
Open Client Connections -- 0
Open Cache Connections --- 0
Client Throughput -------- 0.000000 MBit/Sec
Transaction Per Second --- 0.000000

* Value represents 10 second average.

Please review and let me now if there are any issues.

-George


> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>         Attachments: TS-6_traffic_manager_patch1.diff
>
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-6) traffic_manager does not start

Posted by "George Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Paul updated TS-6:
-------------------------

    Attachment: TS-6_traffic_manager_patch3.diff

This updated patch replaces TS-6_traffic_manager_patch2.diff

patch -p0 -i TS-6_traffic_manager_patch3.diff

The patch addresses the following issues:

1. user/group : nobody/nobody
-  Jira Ticket TS-15 covers this issue

2. PATH_NAME_MAX vs PATH_MAX
- This issue has been pulled out into Jira Ticket TS-84

3. ATS_ROOT vs TS_ROOT
- TS_ROOT is the default

4. /etc/traffic_server
- This issue has been pulled out into Jira Ticket TS-85

As a recap  you need to set 'proxy.config.cluster.ethernet_interface' in 'proxy/config/records.config.in' to a valid interface like 'eth0'.

You can bring up Traffic manager on linux:

sudo $PREFIX/bin/traffic_manager

Traffic Manger will come up with the Web interface disabled but you can execute the 'sudo $PREFIX/bin/traffic_shell' command and see some stats.

When this ticket gets closed a new ticket should be opened up regarding the Traffic Manager WebUI.

-George

> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>         Attachments: TS-6_traffic_manager_patch1.diff, TS-6_traffic_manager_patch2.diff, TS-6_traffic_manager_patch3.diff
>
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TS-6) traffic_manager does not start

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom resolved TS-6.
----------------------------

    Resolution: Fixed

Committed, thanks George.

> traffic_manager does not start
> ------------------------------
>
>                 Key: TS-6
>                 URL: https://issues.apache.org/jira/browse/TS-6
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>            Reporter: Leif Hedstrom
>            Assignee: Andrew Hsu
>         Attachments: TS-6_traffic_manager_patch1.diff, TS-6_traffic_manager_patch2.diff, TS-6_traffic_manager_patch3.diff, TS-6_traffic_manager_patch4.diff
>
>
> Seems some paths aren't properly set via the configure script or something:
> root@fc11 204/0 # ./bin/traffic_manager 
> Manager ERROR: unable to change to root directory "/home/trafficserver" [2 'No such file or directory']
> (last system error 2: No such file or directory)root@fc11 205/0 # 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.