ytyou / ticktock

TickTockDB is an OpenTSDB-like time series database, with much better performance.
GNU General Public License v3.0
76 stars 9 forks source link

Issues installing on a RPI 2 Model B running Buster #56

Closed juggledad closed 1 year ago

juggledad commented 1 year ago

I'm trying to install TICKTOCK (I don't use Docker) so I'm following the directions from 1.3 Install TickTock from a binary package I've been able to successfully (after a couple hiccups) download the ARMv6 32 bit binary and expand the files.

Issue 1 : Step 3. The structure of the ticktock is as:

The structure I have is:

pi@ryanpi:~/tmp/ticktock $ ls -l
total 76
drwxr-xr-x 2 pi pi  4096 Mar  2  2023 admin
drwxr-xr-x 4 pi pi  4096 Mar  2  2023 api-examples
drwxr-xr-x 2 pi pi  4096 Mar  2  2023 bin
drwxr-xr-x 2 pi pi  4096 Mar  2  2023 conf
drwxr-xr-x 2 pi pi  4096 Mar  2  2023 docker
drwxr-xr-x 4 pi pi  4096 Sep 23 18:36 docs
-rw-r--r-- 1 pi pi 35149 Mar  2  2023 LICENSE
drwxr-xr-x 7 pi pi  4096 Mar  2  2023 objs
-rw-r--r-- 1 pi pi  3972 Mar  2  2023 README.md
drwxr-xr-x 2 pi pi  4096 Mar  2  2023 scripts
drwxr-xr-x 2 pi pi  4096 Mar  2  2023 tools

the documentation shows directories append , data and log and my list shows docker , docs , obis and README which are not in the documentation.

Issue 2 : Run ticktock: When I run the command I get an error:

pi@ryanpi:~/tmp/ticktock $ bin/tt -c conf/tt.conf
bin/tt: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.29' not found (required by bin/tt)

The Runtime Requirements SAY:

To run TickTock, you will need,

A Linux system (e.g. Ubuntu, CentOS, etc.). We tested both Ubuntu and CentOS. Other Linux systems are not tested yet.
glibc 2.17 or up

But it looks like I have v2.28

pi@ryanpi:~/tmp/ticktock $ ldd --version
ldd (Debian GLIBC 2.28-10+rpi1) 2.28
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

any thoughts?

ytyou commented 1 year ago

Issue #2: Since you have GLIB 2.28, you will have to build the TickTockDB yourself, from the source, as described in https://github.com/ytyou/ticktock/wiki/Developer-Guide

juggledad commented 1 year ago

Thanks for the quick reply. Having never used docker (and no desire to use it) and since the Pi is using Debian (Buster) do you have a suggestion on what the make command should look like?

I'm hoping to get TickTock installed and see how I could use it with Node-Red.

ylin30 commented 1 year ago

@juggledad You can use the Makefile.ubuntu to build TickTock in PI. Like this:

ylin30@raspberrypi:~ $ cd ticktock
ylin30@raspberrypi:~/ticktock $ git pull
...
ylin30@raspberrypi:~/ticktock $ make -f Makefile.ubuntu clean all

Let us know if it works. If not, we will give you a binary built on PI+ GLIB2.28.

juggledad commented 1 year ago

No luck (boo). I had to install git but had to run: sudo apt update --allow-releaseinfo-change before running: sudo apt install git but then this is what happened:

pi@ryanpi:~/tmp/ticktock $ make -f Makefile.ubuntu clean all
make: Makefile.ubuntu: No such file or directory
make: *** No rule to make target 'Makefile.ubuntu'.  Stop.

I'm going to flash a new SD card with the latest version of Pi OS (Bullseye) and see how far I can get

juggledad commented 1 year ago

Well even running on Bullseye (Debian 11) I get the same make error

pi@ryanpi:~/tmp/ticktock $ make -f Makefile.ubuntu clean all
make: Makefile.ubuntu: No such file or directory
make: *** No rule to make target 'Makefile.ubuntu'.  Stop.

which makes sense since this is Debian

ylin30 commented 1 year ago

Ubuntu is also debian based. The error indicates no Makefile.ubuntu in ~/tmp/ticktock. I think your git didn't succeed. Did you run git pull under ~/tmp/ticktock?

Since you have update your os to Bulleye, could you pls check what your Glibc version is now?

Edited: I looked at your first comment and realized you likely downloaded the binary package under ~/tmp/ticktock. So there is no any src codes for you to build. Let me prepare a tar of src codes for you to build if needed. You can also check if the binary you downloaded can run in your new os.

ylin30 commented 1 year ago

@juggledad You can download the latest src codes package here.

It was prepared in my PI0 (bullseye+glibc2.31).

ylin30@raspberrypi:~/ticktock.0.12.1 $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
ylin30@raspberrypi:~/ticktock.0.12.1 $ ldd --version
ldd (Debian GLIBC 2.31-13+rpt2+rpi1+deb11u5) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
ylin30@raspberrypi:~/ticktock.0.12.1 $

Here is command history in my terminal. It contains binary so if you can succeed in bin/tt -c conf/tt.conf, you don't need to build it anymore.

ylin30@raspberrypi:~ $ gunzip ticktock.0.12.1.tar.gz
ylin30@raspberrypi:~ $ tar -xvf ticktock.0.12.1.tar
ylin30@raspberrypi:~ $ cd ticktock.0.12.1/
ylin30@raspberrypi:~/ticktock.0.12.1 $ ls
admin  api-examples  bin  conf  docker  docs  include  LICENSE  Makefile  Makefile.centos  Makefile.docker  Makefile.ubuntu  objs  README.md  scripts  src  test  tools
ylin30@raspberrypi:~/ticktock.0.12.1 $ ./bin/tt -c conf/tt.conf &
[1] 2856
ylin30@raspberrypi:~/ticktock.0.12.1 $  TickTockDB v0.12.1,  Maintained by
 Yongtao You (yongtao.you@gmail.com) and Yi Lin (ylin30@gmail.com).
 This program comes with ABSOLUTELY NO WARRANTY. It is free software,
 and you are welcome to redistribute it under certain conditions.
 For details, see <https://www.gnu.org/licenses/>.
Writing to log file: /home/ylin30/ticktock.0.12.1/log/ticktock.log

ylin30@raspberrypi:~/ticktock.0.12.1 $
ylin30@raspberrypi:~/ticktock.0.12.1 $
ylin30@raspberrypi:~/ticktock.0.12.1 $ ./admin/ping.sh
pong
ylin30@raspberrypi:~/ticktock.0.12.1 $ make -f Makefile.ubuntu all
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/admin.cpp -o objs/admin.o
juggledad commented 1 year ago

Ahh! there is no make files in ticktock.0.11.1:

pi@ryanpi:~/ticktock.0.11.1 $ ls
admin         bin   docker  LICENSE  README.md  tools
api-examples  conf  docs    objs     scripts
pi@ryanpi:~/ticktock.0.11.1 $ 

but they are there in ticktock.0.12.1:

pi@ryanpi:~/ticktock.0.12.1 $ ls
admin         conf    include   Makefile.centos  objs       src
api-examples  docker  LICENSE   Makefile.docker  README.md  test
bin           docs    Makefile  Makefile.ubuntu  scripts    tools
pi@ryanpi:~/ticktock.0.12.1 $

The build is now running!

juggledad commented 1 year ago

this:

ylin30@raspberrypi:~/ticktock.0.12.1 $ ./bin/tt -c conf/tt.conf &
[1] 2856

confuses me. Is it one command (the two lines)? It seems to run forever. Should I CTRL-C out of it?

I did CTRL-C and kept going but an error shows up, Here is:

pi@ryanpi:~/ticktock.0.12.1 $ ls
admin         conf    include   Makefile.centos  objs       src
api-examples  docker  LICENSE   Makefile.docker  README.md  test
bin           docs    Makefile  Makefile.ubuntu  scripts    tools
pi@ryanpi:~/ticktock.0.12.1 $ ./bin/tt -c conf/tt.conf &
[1] 2856
[1] 1588
-bash: [1]: command not found
pi@ryanpi:~/ticktock.0.12.1 $  TickTockDB v0.12.1,  Maintained by
 Yongtao You (yongtao.you@gmail.com) and Yi Lin (ylin30@gmail.com).
 This program comes with ABSOLUTELY NO WARRANTY. It is free software,
 and you are welcome to redistribute it under certain conditions.
 For details, see <https://www.gnu.org/licenses/>.
Writing to log file: /home/pi/ticktock.0.12.1/log/ticktock.log
^C
pi@ryanpi:~/ticktock.0.12.1 $ ./admin/ping.sh
pong
pi@ryanpi:~/ticktock.0.12.1 $ make -f Makefile.ubuntu all
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/admin.cpp -o objs/admin.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/global.cpp -o objs/global.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/main.cpp -o objs/main.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/agg/aggregate.cpp -o objs/agg/aggregate.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/agg/down.cpp -o objs/agg/down.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/agg/rate.cpp -o objs/agg/rate.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/compress.cpp -o objs/core/compress.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/cp.cpp -o objs/core/cp.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/dp.cpp -o objs/core/dp.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/http.cpp -o objs/core/http.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/memmgr.cpp -o objs/core/memmgr.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/mmap.cpp -o objs/core/mmap.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/page.cpp -o objs/core/page.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/part.cpp -o objs/core/part.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/query.cpp -o objs/core/query.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/task.cpp -o objs/core/task.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/tcp.cpp -o objs/core/tcp.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/ts.cpp -o objs/core/ts.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/tsdb.cpp -o objs/core/tsdb.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/core/udp.cpp -o objs/core/udp.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/append.cpp -o objs/utils/append.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/bitset.cpp -o objs/utils/bitset.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/config.cpp -o objs/utils/config.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/fd.cpp -o objs/utils/fd.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/hash.cpp -o objs/utils/hash.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/json.cpp -o objs/utils/json.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/kv.cpp -o objs/utils/kv.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/leak.cpp -o objs/utils/leak.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/logger.cpp -o objs/utils/logger.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/meta.cpp -o objs/utils/meta.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/meter.cpp -o objs/utils/meter.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/range.cpp -o objs/utils/range.o
g++ -I include -std=c++11 -Wno-unused-result -Wno-format-truncation -Wno-psabi -flto    -O3 -march=native -ffast-math -c src/utils/stats.cpp -o objs/utils/stats.o
g++ -pthread -flto   -o bin/tt objs/admin.o objs/global.o objs/main.o objs/agg/aggregate.o objs/agg/down.o objs/agg/rate.o objs/core/compress.o objs/core/cp.o objs/core/dp.o objs/core/http.o objs/core/memmgr.o objs/core/mmap.o objs/core/page.o objs/core/part.o objs/core/query.o objs/core/task.o objs/core/tcp.o objs/core/ts.o objs/core/tsdb.o objs/core/udp.o objs/utils/append.o objs/utils/bitset.o objs/utils/config.o objs/utils/fd.o objs/utils/hash.o objs/utils/json.o objs/utils/kv.o objs/utils/leak.o objs/utils/logger.o objs/utils/meta.o objs/utils/meter.o objs/utils/range.o objs/utils/stats.o objs/utils/strbuf.o objs/utils/sync.o objs/utils/tag.o objs/utils/timer.o objs/utils/utils.o  -lz
src/utils/stats.cpp: In function ‘inject_metrics’:
src/utils/stats.cpp:250:1: error: unrecognizable insn:
  250 | }
      | ^
(insn 539 538 540 60 (set (reg:SI 856)
        (udiv:SI (reg/v:SI 268 [ hash ])
            (reg:SI 620 [ prephitmp_1779 ]))) "/usr/include/c++/10/bits/hashtable_policy.h":433:22 -1
     (nil))
during RTL pass: vregs
src/utils/stats.cpp:250:1: internal compiler error: in extract_insn, at recog.c:2294
0x7698873f __libc_start_main
    ./csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [Makefile.ubuntu:47: bin/tt] Error 1

and here is teh log:

pi@ryanpi:~/ticktock.0.12.1 $ cat log/ticktock.log
2023-09-24 15:34:13.485 [INFO] [main] TickTockDB version: 0.12.1, on ryanpi, pid: 1588
2023-09-24 15:34:13.485 [INFO] [main] GNU libc compile-time version: 2.31
2023-09-24 15:34:13.485 [INFO] [main] GNU libc runtime version: 2.31
2023-09-24 15:34:13.485 [INFO] [main] mm::page-size = 128
2023-09-24 15:34:13.486 [INFO] [main] mm::m_network_buffer_len = 524288
2023-09-24 15:34:13.486 [INFO] [main] mm::m_network_buffer_small_len = 326
2023-09-24 15:34:13.486 [INFO] [main] GC Freq: 86400 secs
2023-09-24 15:34:13.486 [INFO] [main] Loading data from /home/pi/ticktock.0.12.1/data
2023-09-24 15:34:13.486 [INFO] [main] number of ts locks: 3200
2023-09-24 15:34:13.488 [INFO] [main] Will try to rotate tsdb every 300 secs.
2023-09-24 15:34:13.488 [INFO] [main] Will try to archive ts every 43200 secs.
2023-09-24 15:34:13.488 [INFO] [main] Will try to compact tsdb every 7200 secs.
2023-09-24 15:34:13.488 [INFO] [main] using append.log.flush.frequency of 300s
2023-09-24 15:34:13.488 [INFO] [main] Not collecting self stats
2023-09-24 15:34:13.488 [INFO] [main] std::thread::hardware_concurrency() = 4
2023-09-24 15:34:13.488 [INFO] [main] sizeof(std::pair<Timestamp,double>) = 16
2023-09-24 15:34:13.488 [INFO] [main] sizeof(struct page_info_on_disk) = 26
2023-09-24 15:34:13.488 [INFO] [main] page-size = 128
2023-09-24 15:34:13.488 [INFO] [main] sys-page-size = 4096
2023-09-24 15:34:13.488 [INFO] [main] Using config file: conf/tt.conf
2023-09-24 15:34:13.488 [INFO] [main] Timestamp resolution: second
2023-09-24 15:34:13.488 [INFO] [main] http listener_count[0] = 5
2023-09-24 15:34:13.488 [INFO] [timer] Timer started
2023-09-24 15:34:13.488 [INFO] [main] http listener_count[1] = 5
2023-09-24 15:34:13.488 [INFO] [main] TCP m_max_conns_per_listener = 512
2023-09-24 15:34:13.489 [INFO] [main] Starting http server on ports 6182...
2023-09-24 15:34:13.489 [INFO] [main] Original SO_RCVBUF = 131072
2023-09-24 15:34:13.489 [INFO] [main] SO_RCVBUF set to 106496
2023-09-24 15:34:13.489 [INFO] [main] Original SO_SNDBUF = 16384
2023-09-24 15:34:13.489 [INFO] [main] SO_BINDTODEVICE = 
2023-09-24 15:34:13.489 [INFO] [main] SO_DEBUG = 0
2023-09-24 15:34:13.489 [INFO] [main] SO_DONTROUTE = 0
2023-09-24 15:34:13.489 [INFO] [main] SO_KEEPALIVE = 0
2023-09-24 15:34:13.489 [INFO] [main] SO_PRIORITY = 0
2023-09-24 15:34:13.489 [INFO] [main] SO_RCVBUF = 212992
2023-09-24 15:34:13.489 [INFO] [main] SO_RCVBUFFORCE: errno = 92
2023-09-24 15:34:13.489 [INFO] [main] SO_RCVLOWAT = 1
2023-09-24 15:34:13.489 [INFO] [main] SO_SNDBUF = 16384
2023-09-24 15:34:13.489 [INFO] [main] SO_SNDBUFFORCE: errno = 92
2023-09-24 15:34:13.489 [INFO] [main] SO_SNDLOWAT = 1
2023-09-24 15:34:13.491 [INFO] [http_listener_10] entered epoll_wait() loop, fd=4
2023-09-24 15:34:13.491 [INFO] [http_listener_20] entered epoll_wait() loop, fd=7
2023-09-24 15:34:13.492 [INFO] [http_listener_30] entered epoll_wait() loop, fd=10
2023-09-24 15:34:13.493 [INFO] [http_listener_40] entered epoll_wait() loop, fd=13
2023-09-24 15:34:13.493 [INFO] [main] tcp listener_count[0] = 5
2023-09-24 15:34:13.493 [INFO] [http_listener_0] entered epoll_wait() loop, fd=16
2023-09-24 15:34:13.493 [INFO] [main] tcp listener_count[1] = 5
2023-09-24 15:34:13.493 [INFO] [main] TCP m_max_conns_per_listener = 512
2023-09-24 15:34:13.493 [INFO] [main] Starting tcp server on ports 6181,6180...
2023-09-24 15:34:13.493 [INFO] [main] Original SO_RCVBUF = 131072
2023-09-24 15:34:13.493 [INFO] [main] SO_RCVBUF set to 106496
2023-09-24 15:34:13.493 [INFO] [main] Original SO_SNDBUF = 16384
2023-09-24 15:34:13.493 [INFO] [main] SO_BINDTODEVICE = 
2023-09-24 15:34:13.493 [INFO] [main] SO_DEBUG = 0
2023-09-24 15:34:13.493 [INFO] [main] SO_DONTROUTE = 0
2023-09-24 15:34:13.494 [INFO] [main] SO_KEEPALIVE = 0
2023-09-24 15:34:13.494 [INFO] [main] SO_PRIORITY = 0
2023-09-24 15:34:13.494 [INFO] [main] SO_RCVBUF = 212992
2023-09-24 15:34:13.494 [INFO] [main] SO_RCVBUFFORCE: errno = 92
2023-09-24 15:34:13.494 [INFO] [main] SO_RCVLOWAT = 1
2023-09-24 15:34:13.494 [INFO] [main] SO_SNDBUF = 16384
2023-09-24 15:34:13.494 [INFO] [main] SO_SNDBUFFORCE: errno = 92
2023-09-24 15:34:13.494 [INFO] [main] SO_SNDLOWAT = 1
2023-09-24 15:34:13.494 [INFO] [main] Original SO_RCVBUF = 131072
2023-09-24 15:34:13.494 [INFO] [main] SO_RCVBUF set to 106496
2023-09-24 15:34:13.494 [INFO] [main] Original SO_SNDBUF = 16384
2023-09-24 15:34:13.494 [INFO] [main] SO_BINDTODEVICE = 
2023-09-24 15:34:13.494 [INFO] [main] SO_DEBUG = 0
2023-09-24 15:34:13.494 [INFO] [main] SO_DONTROUTE = 0
2023-09-24 15:34:13.494 [INFO] [main] SO_KEEPALIVE = 0
2023-09-24 15:34:13.494 [INFO] [main] SO_PRIORITY = 0
2023-09-24 15:34:13.494 [INFO] [main] SO_RCVBUF = 212992
2023-09-24 15:34:13.494 [INFO] [main] SO_RCVBUFFORCE: errno = 92
2023-09-24 15:34:13.494 [INFO] [main] SO_RCVLOWAT = 1
2023-09-24 15:34:13.495 [INFO] [main] SO_SNDBUF = 16384
2023-09-24 15:34:13.495 [INFO] [main] SO_SNDBUFFORCE: errno = 92
2023-09-24 15:34:13.495 [INFO] [main] SO_SNDLOWAT = 1
2023-09-24 15:34:13.495 [INFO] [tcp_listener_10] entered epoll_wait() loop, fd=21
2023-09-24 15:34:13.496 [INFO] [tcp_listener_20] entered epoll_wait() loop, fd=24
2023-09-24 15:34:13.497 [INFO] [tcp_listener_30] entered epoll_wait() loop, fd=27
2023-09-24 15:34:13.497 [INFO] [tcp_listener_40] entered epoll_wait() loop, fd=30
2023-09-24 15:34:13.498 [INFO] [tcp_listener_11] entered epoll_wait() loop, fd=33
2023-09-24 15:34:13.499 [INFO] [tcp_listener_21] entered epoll_wait() loop, fd=36
2023-09-24 15:34:13.499 [INFO] [tcp_listener_31] entered epoll_wait() loop, fd=39
2023-09-24 15:34:13.500 [INFO] [tcp_listener_41] entered epoll_wait() loop, fd=42
2023-09-24 15:34:13.500 [INFO] [tcp_listener_0] entered epoll_wait() loop, fd=45
2023-09-24 15:34:13.500 [INFO] [tcp_listener_1] entered epoll_wait() loop, fd=48
2023-09-24 15:35:04.885 [INFO] [http_10_task_0] Handling admin request: [POST /api/admin cmd=ping HTTP/1.1, close:false, len:0, body:]
2023-09-24 15:35:04.885 [INFO] [http_10_task_0] params: {"cmd":"ping"}
pi@ryanpi:~/ticktock.0.12.1 $ 
ylin30 commented 1 year ago

this:

ylin30@raspberrypi:~/ticktock.0.12.1 $ ./bin/tt -c conf/tt.conf &
[1] 2856

confuses me. Is it one command (the two lines)? It seems to run forever. Should I CTRL-C out of it?

It is one command. The & means to let the command run in the background (as process 2856). If you don't add & at the end, you will see the command will just hang there. And if you do CTRL-C, the process will stop.

I did CTRL-C and kept going but an error shows up, Here is:


pi@ryanpi:~/ticktock.0.12.1 $ ls
admin         conf    include   Makefile.centos  objs       src
api-examples  docker  LICENSE   Makefile.docker  README.md  test
bin           docs    Makefile  Makefile.ubuntu  scripts    tools
pi@ryanpi:~/ticktock.0.12.1 $ ./bin/tt -c conf/tt.conf &
[1] 2856
[1] 1588

You just ran it twice since the previous one is still running.

-bash: [1]: command not found pi@ryanpi:~/ticktock.0.12.1 $ TickTockDB v0.12.1, Maintained by Yongtao You (yongtao.you@gmail.com) and Yi Lin (ylin30@gmail.com). This program comes with ABSOLUTELY NO WARRANTY. It is free software, and you are welcome to redistribute it under certain conditions. For details, see https://www.gnu.org/licenses/. Writing to log file: /home/pi/ticktock.0.12.1/log/ticktock.log ^C pi@ryanpi:~/ticktock.0.12.1 $ ./admin/ping.sh pong

The response pong indicates that TT is running fine.

pi@ryanpi:~/ticktock.0.12.1 $ make -f Makefile.ubuntu all

Since the binary is running fine, you don't need to build it any more.

src/utils/stats.cpp: In function ‘inject_metrics’: src/utils/stats.cpp:250:1: error: unrecognizable insn: 250 | } | ^ (insn 539 538 540 60 (set (reg:SI 856) (udiv:SI (reg/v:SI 268 [ hash ]) (reg:SI 620 [ prephitmp_1779 ]))) "/usr/include/c++/10/bits/hashtable_policy.h":433:22 -1 (nil)) during RTL pass: vregs src/utils/stats.cpp:250:1: internal compiler error: in extract_insn, at recog.c:2294 0x7698873f __libc_start_main ./csu/libc-start.c:308

Hm, this should not happen. I just built the src successfully in my PI0. I don't know what's wrong.

and here is teh log:

pi@ryanpi:~/ticktock.0.12.1 $ cat log/ticktock.log
2023-09-24 15:34:13.485 [INFO] [main] TickTockDB version: 0.12.1, on ryanpi, pid: 1588
2023-09-24 15:34:13.485 [INFO] [main] GNU libc compile-time version: 2.31
2023-09-24 15:34:13.485 [INFO] [main] GNU libc runtime version: 2.31
2023-09-24 15:34:13.485 [INFO] [main] mm::page-size = 128
...
2023-09-24 15:34:13.500 [INFO] [tcp_listener_1] entered epoll_wait() loop, fd=48
2023-09-24 15:35:04.885 [INFO] [http_10_task_0] Handling admin request: [POST /api/admin cmd=ping HTTP/1.1, close:false, len:0, body:]
2023-09-24 15:35:04.885 [INFO] [http_10_task_0] params: {"cmd":"ping"}
pi@ryanpi:~/ticktock.0.12.1 $ 

The log looks ok. TT binary in the tar.gz pkg should be able to run in your PI. You don't need to build it (i.e., no need to run the command make -f Makefile.ubuntu all).

ylin30 commented 1 year ago

BTW, if TT is running in the background because of &, to stop TT gracefully, you can run

./admin/stop.sh in TT folder.

juggledad commented 1 year ago

Hurray! I've got it installed. I just sent you a email with a write up of the steps I took. Feel free to use it where you see fit.

ylin30 commented 1 year ago

@juggledad great to hear that. I haven't got your email yet. My email is ylin30@gmail.com. thx!