[ixpmanager] setting up looking glass

Vladislav Leontjev vladislav.leontjev at gmail.com
Mon Apr 1 19:00:18 IST 2019


Hello team,

Need your assistance in setting up LG; The platform is testing, not
production one.
IXP manager Ubuntu 16.04.6 LTS built from scripts; RS Ubuntu 18.04.2 LTS
uses bird 2.0.4 | birdeye 1.1.4
All the VMs are freshly installed;

*********************************

mysql> SELECT * FROM routers WHERE id = 1\G
*************************** 1. row ***************************
          id: 1
     vlan_id: 1
      handle: rs1-lan1-ipv4
    protocol: 4
        type: 1
        name: IXP LAN1 - IPv4
   shortname: RS1 - LAN1 - IPv4
   router_id: 10.81.15.49
  peering_ip: 10.81.15.49
         asn: 64540
    software: 1
   mgmt_host: 10.81.5.49
         api: http://rs1-lan1-ipv4.litix.lt/api/status
    api_type: 1
   lg_access: 0
  quarantine: 0
      bgp_lc: 0
    template: api/v4/router/server/bird/standard
    skip_md5: 1
last_updated: NULL
1 row in set (0.00 sec)

*****************************************

vvle at IXP-Manager-T72:~$ ping rs1-lan1-ipv4.litix.lt -c 1
PING rs1-lan1-ipv4.litix.lt (10.81.5.49) 56(84) bytes of data.
64 bytes from rs1-lan1-ipv4.litix.lt (10.81.5.49): icmp_seq=1 ttl=62
time=1.43 ms

--- rs1-lan1-ipv4.litix.lt ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.432/1.432/1.432/0.000 ms

******************************************

vvle at IXP-Manager-T72:~$ dig +short rs1-lan1-ipv4.litix.lt
vvle at IXP-Manager-T72:~$

I've added static entry in /etc/hosts;
10.81.5.49      rs1-lan1-ipv4.litix.lt

*******************************************

vvle at IXP-Manager-T72:~$ curl -v http://rs1-lan1-ipv4.litix.lt/api/status
*   Trying 10.81.5.49...
* Connected to rs1-lan1-ipv4.litix.lt (10.81.5.49) port 80 (#0)
> GET /api/status HTTP/1.1
> Host: rs1-lan1-ipv4.litix.lt
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Content-Type: application/json
< Date: Mon, 01 Apr 2019 15:44:22 GMT
< Content-Length: 168
< Server: lighttpd/1.4.45
<
* Connection #0 to host rs1-lan1-ipv4.litix.lt left intact
{"api":{"from_cache":true,"ttl_mins":1,"version":"1.1.4","max_routes":1000},"status":{"version":"2.0.4","router_id":"10.81.15.49","message":"Daemon
is up and running"}}vvle at IXP-Manager-T72:~$

*********************************************
/srv/ixpmanager/storage/logs/laravel.log
[2019-04-01 17:11:17] production.ERROR: file_get_contents(
http://rs1-lan1-ipv4.litix.lt/api/status/status?use_cache=0): failed to
open stream: HTTP request failed! HTTP/1.0 404 Not Found
 {"exception":"[object] (ErrorException(code: 0): file_get_contents(
http://rs1-lan1-ipv4.litix.lt/api/status/status?use_cache=0): failed to
open stream: HTTP request failed! HTTP/1.0 404 Not Found
 at /srv/ixpmanager/app/Services/LookingGlass/BirdsEye.php:104)
[stacktrace]
*********************************************
vvle at rs2-1804:~$ ls -la /usr/var/run
total 8
drwxr-xr-x 2 root root 4096 Apr  1 17:08 .
drwxr-xr-x 3 root root 4096 Mar 29 11:15 ..
srw-rw---- 1 root root    0 Apr  1 17:08 bird.ctl
vvle at rs2-1804:~$
*********************************************
vvle at rs2-1804:~$ ls -la /srv/birdseye/
-rw-r--r--  1 root     root       2884 Apr  1 16:12 .env
*********************************************
vvle at rs2-1804:~$ sudo cat /srv/birdseye/.env | egrep -v '(^#)|(^\s*$)'
BIRDC="/usr/bin/sudo /srv/birdseye/bin/birdc -4 -s /usr/var/run/bird.ctl"
CACHE_DRIVER=file
LOOKING_GLASS_ENABLED=true
*********************************************
vvle at rs2-1804:~$ sudo /usr/sbin/birdc -s /usr/var/run/bird.ctl show status
BIRD 2.0.4 ready.
BIRD 2.0.4
Router ID is 10.81.15.49
Current server time is 2019-04-01 17:16:47.706
Last reboot on 2019-04-01 17:08:47.929
Last reconfiguration on 2019-04-01 17:08:47.929
Daemon is up and running
**********************************************
vvle at rs2-1804:~$ sudo cat /etc/sudoers /etc/sudoers.d/* | grep birdseye
www-data        ALL=(ALL)       NOPASSWD: /srv/birdseye/bin/birdc
**********************************************
vvle at rs2-1804:~$ sudo /srv/birdseye/bin/birdc -4 -s /usr/var/run/bird.ctl
show status
BIRD 2.0.4 ready.
Access restricted
BIRD 2.0.4
Router ID is 10.81.15.49
Current server time is 2019-04-01 17:18:12.655
Last reboot on 2019-04-01 17:08:47.929
Last reconfiguration on 2019-04-01 17:08:47.929
Daemon is up and running
************************************************
vvle at rs2-1804:~$ sudo netstat -lpn | grep lighttpd
tcp        0      0 10.81.5.49:80           0.0.0.0:*               LISTEN
    1256/lighttpd
unix  2      [ ACC ]     STREAM     LISTENING     24497    1268/php-cgi
     /var/run/lighttpd/php.socket-0
************************************************
vvle at rs2-1804:~$ sudo netstat -lpn | grep php
unix  2      [ ACC ]     STREAM     LISTENING     24497    1268/php-cgi
     /var/run/lighttpd/php.socket-0
************************************************
vvle at rs2-1804:~$ sudo cat /etc/lighttpd/lighttpd.conf
# Sample Bird's Eye Lighttpd config - just added a small amount to
# the standard Lighttpd configuration.

server.modules = (
        "mod_access",
        "mod_alias",
        "mod_compress",
        "mod_redirect",
        "mod_rewrite",
)

server.document-root        = "/srv/birdseye/public"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
server.port                 = 80
server.bind                 = "10.81.5.49"


index-file.names            = ( "index.php", "index.html",
"index.lighttpd.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css",
"text/html", "text/plain" )

# default listening port for IPv6 falls back to the IPv4 port
## Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

url.redirect = ()
url.rewrite-once = (

"^/(css|img|js|fonts)/.*\.(jpg|jpeg|gif|png|swf|avi|mpg|mpeg|mp3|flv|ico|css|js|woff|ttf)$"
=> "$0",
        "^/(favicon\.ico|robots\.txt|sitemap\.xml)$" => "$0",
        "^/[^\?]*(\?.*)?$" => "index.php/$1"
)
********************************************************
vvle at IXP-Manager-T72:/srv/birdseye$ curl -v http://10.81.5.49/lg
*   Trying 10.81.5.49...
* Connected to 10.81.5.49 (10.81.5.49) port 80 (#0)
> GET /lg HTTP/1.1
> Host: 10.81.5.49
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 302 Found
< Cache-Control: no-cache
< Location: http://10.81.5.49/lg/protocols/bgp
< Date: Mon, 01 Apr 2019 17:47:31 GMT
< Content-type: text/html; charset=UTF-8
< Content-Length: 380
< Server: lighttpd/1.4.45
<
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="refresh" content="1;url=
http://10.81.5.49/lg/protocols/bgp" />

        <title>Redirecting to http://10.81.5.49/lg/protocols/bgp</title>
    </head>
    <body>
        Redirecting to <a href="http://10.81.5.49/lg/protocols/bgp">
http://10.81.5.49/lg/protocols/bgp</a>.
    </body>
* Connection #0 to host 10.81.5.49 left intact
************************************************************
vvle at rs2-1804:~$ curl -v http://10.81.5.49/lg/protocols/bgp
*   Trying 10.81.5.49...
* TCP_NODELAY set
* Connected to 10.81.5.49 (10.81.5.49) port 80 (#0)
> GET /lg/protocols/bgp HTTP/1.1
> Host: 10.81.5.49
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Content-type: text/html; charset=UTF-8
< Content-Length: 0
< Date: Mon, 01 Apr 2019 17:21:52 GMT
< Server: lighttpd/1.4.45
<
* Connection #0 to host 10.81.5.49 left intact
**************************************************************
vvle at rs2-1804:/srv/birdseye$ ls -la
total 240
drwxr-xr-x 13 root     root       4096 Apr  1 16:12 .
drwxr-xr-x  3 root     root       4096 Mar 29 11:59 ..
drwxr-xr-x 10      501 staff      4096 Mar 29 11:54 app
-rwxr-xr-x  1      501 staff      1094 Apr 26  2017 artisan
drwxr-xr-x  2      501 staff      4096 Apr  1 07:32 bin
drwxr-xr-x  2      501 staff      4096 Mar 29 11:54 bootstrap
-rw-r--r--  1      501 staff       798 Jul  3  2018 composer.json
-rw-r--r--  1      501 staff    125370 Jul  3  2018 composer.lock
drwxr-xr-x  6      501 staff      4096 Mar 29 11:54 data
drwxr-xr-x  5      501 staff      4096 Mar 29 11:54 database
-rw-r--r--  1 root     root       2884 Apr  1 16:12 .env
-rw-r--r--  1      501 staff      2890 Jun  8  2017 .env.example
-rw-r--r--  1      501 staff      2951 Jun  8  2017 .env.vagrant
-rw-r--r--  1      501 staff        96 May 30  2017 .gitignore
drwxr-xr-x  3      501 staff      4096 Jul  3  2018 .idea
-rw-r--r--  1      501 staff      1115 Apr 26  2017 LICENSE.md
-rw-r--r--  1      501 staff       951 Apr 26  2017 phpunit.xml
drwxr-xr-x  2      501 staff      4096 Apr  1 12:06 public
-rw-r--r--  1      501 staff     14217 Jul  3  2018 README.md
drwxr-xr-x  3      501 staff      4096 Mar 29 11:54 resources
-rw-r--r--  1      501 staff       316 Apr 26  2017 skipcache_ips.php.dist
drwxrwxrwx  5 www-data www-data   4096 Mar 29 11:54 storage
*******************************************************************
*******************************************************************
vvle at rs2-1804:/srv/birdseye$ php -S 10.81.5.49:8000 -t public
PHP 7.2.15-0ubuntu0.18.04.2 Development Server started at Mon Apr  1
17:39:59 2019
Listening on http://10.81.5.49:8000
Document root is /srv/birdseye/public
Press Ctrl-C to quit.
[Mon Apr  1 17:40:11 2019] PHP Fatal error:  Uncaught Error: Class
'Monolog\Logger' not found in
/srv/birdseye/vendor/laravel/lumen-framework/src/Application.php:378
Stack trace:
#0 /srv/birdseye/vendor/illuminate/container/Container.php(731):
Laravel\Lumen\Application->Laravel\Lumen\{closure}(Object(Laravel\Lumen\Application),
Array)
#1 /srv/birdseye/vendor/illuminate/container/Container.php(629):
Illuminate\Container\Container->build(Object(Closure), Array)
#2 /srv/birdseye/vendor/laravel/lumen-framework/src/Application.php(206):
Illuminate\Container\Container->make('Psr\\Log\\LoggerI...', Array)
#3 /srv/birdseye/vendor/laravel/lumen-framework/src/helpers.php(39):
Laravel\Lumen\Application->make('Psr\\Log\\LoggerI...', Array)
#4
/srv/birdseye/vendor/laravel/lumen-framework/src/Exceptions/Handler.php(40):
app('Psr\\Log\\LoggerI...')
#5 /srv/birdseye/app/Exceptions/Handler.php(36):
Laravel\Lumen\Exceptions\Handler->report(Object(ErrorException))
#6
/srv/birdseye/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php(123):
App\Excepti in
/srv/birdseye/vendor/laravel/lumen-framework/src/Application.php on line 378
[Mon Apr  1 17:40:11 2019] 10.81.15.1:63409 [500]: / - Uncaught Error:
Class 'Monolog\Logger' not found in
/srv/birdseye/vendor/laravel/lumen-framework/src/Application.php:378
Stack trace:
#0 /srv/birdseye/vendor/illuminate/container/Container.php(731):
Laravel\Lumen\Application->Laravel\Lumen\{closure}(Object(Laravel\Lumen\Application),
Array)
#1 /srv/birdseye/vendor/illuminate/container/Container.php(629):
Illuminate\Container\Container->build(Object(Closure), Array)
#2 /srv/birdseye/vendor/laravel/lumen-framework/src/Application.php(206):
Illuminate\Container\Container->make('Psr\\Log\\LoggerI...', Array)
#3 /srv/birdseye/vendor/laravel/lumen-framework/src/helpers.php(39):
Laravel\Lumen\Application->make('Psr\\Log\\LoggerI...', Array)
#4
/srv/birdseye/vendor/laravel/lumen-framework/src/Exceptions/Handler.php(40):
app('Psr\\Log\\LoggerI...')
#5 /srv/birdseye/app/Exceptions/Handler.php(36):
Laravel\Lumen\Exceptions\Handler->report(Object(ErrorException))
#6
/srv/birdseye/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php(123):
App\Excepti in
/srv/birdseye/vendor/laravel/lumen-framework/src/Application.php on line 378
[Mon Apr  1 17:40:11 2019] PHP Fatal error:  Uncaught Error: Class
'Monolog\Logger' not found in
/srv/birdseye/vendor/laravel/lumen-framework/src/Application.php:378
Stack trace:
#0 /srv/birdseye/vendor/illuminate/container/Container.php(731):
Laravel\Lumen\Application->Laravel\Lumen\{closure}(Object(Laravel\Lumen\Application),
Array)
#1 /srv/birdseye/vendor/illuminate/container/Container.php(629):
Illuminate\Container\Container->build(Object(Closure), Array)
#2 /srv/birdseye/vendor/laravel/lumen-framework/src/Application.php(206):
Illuminate\Container\Container->make('Psr\\Log\\LoggerI...', Array)
#3 /srv/birdseye/vendor/laravel/lumen-framework/src/helpers.php(39):
Laravel\Lumen\Application->make('Psr\\Log\\LoggerI...', Array)
#4
/srv/birdseye/vendor/laravel/lumen-framework/src/Exceptions/Handler.php(40):
app('Psr\\Log\\LoggerI...')
#5 /srv/birdseye/app/Exceptions/Handler.php(36):
Laravel\Lumen\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalErrorException))
#6 /srv/birdseye/vendor/laravel/lumen-framework/src/Concerns/Registers in
/srv/birdseye/vendor/laravel/lumen-framework/src/Application.php on line 378
^Cvvle at rs2-1804:/srv/birdseye$

Found in mailing list with similar problem:
https://www.inex.ie/pipermail/ixpmanager/2017-September/001159.html
but it had been already fixed in later releases of birdeye.
Please suggest the way/approach to resolve;

Thank you,

V. Leontjev,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20190401/2150bee2/attachment-0001.html>


More information about the ixpmanager mailing list