Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3936

Management API protocol has changed?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • Management API
    • None

    Description

      Traffic_top is working with trafficserver 5.3.1. I am trying to get statistics from trafficserver via the management api socket using both the perl module (http://search.cpan.org/~bvierra/Apache-TS-AdminClient-0.02/lib/Apache/TS/AdminClient.pm) and a ruby script equivalent.

      The perl script is:

      #!/usr/bin/perl

      use Apache::TS::AdminClient;

      my $cli = Apache::TS::AdminClient->new(socket_path => "/run/trafficserver/mgmtapi.sock");
      my $string = $cli->get_stat("proxy.config.product_company");
      print "$string\n";

      And seems to work except gets no response:

      ...
      stat("/run/trafficserver/mgmtapi.sock",

      {st_mode=S_IFSOCK|0700, st_size=0, ...}) = 0
      stat("/run/trafficserver/mgmtapi.sock", {st_mode=S_IFSOCK|0700, st_size=0, ...}

      ) = 0
      stat("/run/trafficserver/mgmtapi.sock",

      {st_mode=S_IFSOCK|0700, st_size=0, ...}

      ) = 0
      socket(PF_FILE, SOCK_STREAM, 0) = 3
      ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffcaaa6930) = -1 EINVAL (Invalid argument)
      lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
      ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffcaaa6930) = -1 EINVAL (Invalid argument)
      lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
      fcntl(3, F_SETFD, FD_CLOEXEC) = 0
      connect(3,

      {sa_family=AF_FILE, path="/run/trafficserver/mgmtapi.sock"}

      , 110) = 0
      select(8, NULL, [3], NULL,

      {10, 0}) = 1 (out [3], left {9, 999998})
      write(3, "\3\0\34\0\0\0proxy.config.product_compa"..., 34) = 34
      select(8, [3], NULL, NULL, {10, 0}

      ) = 0 (Timeout)
      close(3) = 0
      ...

      I've tried sending this to the API socket:

      0000000: 0300 2000 0000 7072 6f78 792e 7072 6f63 .. ...proxy.proc
      0000010: 6573 732e 6874 7470 2e32 7878 5f72 6573 ess.http.2xx_res
      0000020: 706f 6e73 6573 ponses

      And likewise don't get a response.

      Attachments

        Activity

          People

            Unassigned Unassigned
            zxcvbn4038 zxcvbn4038
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: