Closed AGI-chandler closed 1 year ago
Short version: tokyo cabinet is not nice, if you need cross platform compat, you are probably better off with one of the other back ends.
Long version: Yeah, Tokyo Cabinet has been giving us a lot of headaches; it's not stable, it's unmaintained, not compatible over platforms and generally just kind of crappy. What it's great at though, is creating small database files, which is why it is still the default for Duc. Given the amount of problems we have seen in the past - and still have - maybe it is time to consider moving to another default back end somehow; I have no clue yet how to properly support backwards compatibility for existing users though....
hmm... so that mean I need to compile duc manually on all machines, and configure --with-db-backend
? Which would you recommend? leveldb, sqlite3, lmdb, kyotocabinet
"Chandler" == Chandler @.***> writes:
hmm... so that mean I need to compile duc manually on all machines, and configure --with-db-backend? Which would you recommend? leveldb, sqlite3, lmdb, kyotocabinet
I would NOT recommend sqlite3, it's not really the best. If I look in the docs, specifically the INSTALL file, it gives a small table showing relative times and sizes.
I'd probably go with leveldb as my next choice.
John
Thanks @l8gravely I see what you're talking about. I see also it mentions the issue with interoperability between machines there too, but recommends sqlite! However I would also agree with you to not make that my next choice. I'll see how it goes with leveldb.
"Chandler" == Chandler @.***> writes:
Thanks @l8gravely I see what you're talking about. I see also it mentions the issue with interoperability between machines there too, but recommends sqlite! However I would also agree with you to not make that my next choice. I'll see how it goes with leveldb.
The other question is exactly how different your two systems are? And would it be possible to maybe just run the web server on the same host you do the scanning from? That's what I do, since it's really just me and other IT people looking at the web pages, though I can and have sent others the link to look at stuff.
Heh, my main duc host is still RHEL 6.6 with:
duc --version duc version: 1.4.3 options: cairo x11 ui tokyocabinet
They aren't that different, binaries from one would probably run on the other. They're both Intel-based 64-bit. The webserver is Debian 11 though and other system is Centos 6.10 I think. Glad to know I'm not the only one still running this stanky old OS. It's not like I want to, but I inherited some of these systems and Red Hat doesn't allow their OS to be upgraded. If I ever can find the time, since I have to reinstall the OS anyway, I'll be putting Debian on there too.
This is only one system though of about 10 that I want to have stat's for, installing a webserver on all of them just isn't practical, plus I'd have to get NetOps involved to get firewalled ports open. Transferring all the databases to one central webserver would be better, hopefully I find a database that works between systems.
"Chandler" == Chandler @.***> writes:
They aren't that different, binaries from one would probably run on the other. They're both Intel-based 64-bit. The webserver is Debian 11 though and other system is Centos 6.10 I think.
That's the problem. Each of those systems is pretty damn close, but if you look at the README for duc you'll see how different they are in packages and names and what needs to be installed just to build duc on them.
Glad to know I'm not the only one still running this stanky old OS. It's not like I want to, but I inherited some of these systems and Red Hat doesn't allow their OS to be upgraded. If I ever can find the time, since I have to reinstall the OS anyway, I'll be putting Debian on there too.
I've been moving to Ubuntu Server for alot of stuff. I do like Debian Buster and such, but the pace of change (especially for desktop stuff, not as big a concern for server stuff) was slow enough that it got painful.
This is only one system though of about 10 that I want to have stat's for, installing a webserver on all of them just isn't practical, plus I'd have to get NetOps involved to get firewalled ports open. Transferring all the databases to one central webserver would be better, hopefully I find a database that works between systems.
Yeah, I used to run my master data collection job on one host and depending on the DB I wanted, I had to go across country to a remote site to scan and then copy the DB(s) back. But I also had the same base OS everywhere. If anything, I'd spend my time getting that part fixed.
Maybe you can do scanning and dumping to a text file 'duc info ...' to get back info. Unless these are huge systems, maybe getting a decent upper level look that goes down four levels is a good compromise?
But if they're not that big, maybe lmdb or leveldb would work. Shouldn't be hard to test. I'd probably try to compile it on your CentOS 6.x box and then try to move the DB to Debian, but I'd look carefully at the package versions of the libs and go with the oldest one, since I'd hope that older versions were forwards compatible.
Good luck! John
Thanks!
hmm LevelDB isn't working quite right either, but it definitely works better than Tokyo Cabinet in that I can get the CGI script executed and graph displayed, at least. I turned on tooltips and in the tips I am seeing a lot of "Requested path not found" and in the Apache error.log entries such as:
IO error: lock /var/db/duc/srv1-data.ldb/LOCK: Resource temporarily unavailable
Error opening: /var/db/duc/srv1-data.ldb - unsupported DB type leveldb, compiled for leveldb
Same thing is happening with LMDB, and this even happens with the local webserver's database, so it's not an issue of transferring databases.... so will have to try Sqlite unfortunately.
Also when I click on the graph, it's correctly finding the right path to change to, but instead of updating the webpage, it just prints the headers, like:
Requested path not found /boot
Status: 302 Found Location: ?path=/boot/grub URI: ?path=/boot/grub Connection: close Content-type: text/html
Further, I found that cmd-cgi.c
seems to be printing extraneous "Content-Type: text/html" that doesn't really need to be there. I thought it was coming from my cgi script for the longest time!! Then I added additional duc cgi
lines and noticed the "Content-Type" was being printed multiple times, and it's in the tooltips too... I commented out lines 273-4, 324, 446-7, 500, and 510 to get rid of that being printed and seems to be functioning the same.
"Chandler" == Chandler @.***> writes:
hmm LevelDB isn't working quite right either, but it definitely works better than Tokyo Cabinet in that I can get the CGI script executed and graph displayed, at least. I turned on tooltips and in the tips I am seeing a lot of "Requested path not found" and in the Apache error.log entries such as:
IO error: lock /var/db/duc/srv1-data.ldb/LOCK: Resource temporarily unavailable Error opening: /var/db/duc/srv1-data.ldb - unsupported DB type leveldb, compiled for leveldb
Interesting, which version of duc are you running? Can you show me the output of 'duc --version' please? This smells like a bug, so I'd like to try and track it down if we can.
Same thing is happening with LMDB, and this even happens with the local webserver's database, so it's not an issue of transferring databases.... so will have to try Sqlite unfortunately.
Hmm... more details on your OS as well that you're running this on. Have you tried running with '--debug' as well on both the index and cgi parts?
Also when I click on the graph, it's correctly finding the right path to change to, but instead of updating the webpage, it just prints the headers, like:
Requested path not found /boot
Status: 302 Found Location: ?path=/boot/grub URI: ?path=/boot/grub Connection: close Content-type: text/html
Funky.
Further, I found that cmd-cgi.c seems to be printing extraneous "Content-Type: text/html" that doesn't really need to be there. I thought it was coming from my cgi script for the longest time!! Then I added additional duc cgi lines and noticed the "Content-Type" was being printed multiple times, and it's in the tooltips too... I commented out lines 273-4, 324, 446-7, 500, and 510 to get rid of that being printed and seems to be functioning the same.
Can you open a new issue for this and send your patch so we can take a look at it and figure out what's needed.
But please make sure you're using version 1.4.5 (or newer) so we can make sure this bug is really a bug.
The more details, the better!
Thanks, John
Interesting, which version of duc are you running? Can you show me the output of 'duc --version' please? This smells like a bug, so I'd like to try and track it down if we can.
I've been using 1.4.5 in all my testing:
$ duc --version
duc version: 1.4.5
options: cairo ui sqlite3
I already recompiled it to try with sqlite but I imagine before it said leveldb
instead...
Hmm... more details on your OS as well that you're running this on. Have you tried running with '--debug' as well on both the index and cgi parts?
Debian 11 with Linux 5.10.0-20-amd64 and all upgrade installed. No I will try using --debug and let you know.
Funky.
Huh you don't see that anywhere?
Can you open a new issue for this and send your patch so we can take a look at it and figure out what's needed. But please make sure you're using version 1.4.5 (or newer) so we can make sure this bug is really a bug. The more details, the better! Thanks, John
Okie I'll try to, time is limited. It's strange no one else has reported it yet. I've tried different browsers and different webservers. Even does it on my phone
Here's v1.4.5 compiled from the source release running on old CentOS 6 webserver (it's the only public facing system we have), with sqlite-devel
v3.7.17-8.el6 from okay repo.
$ duc --version
duc version: 1.4.5
options: cairo ui sqlite3
# duc index --debug -bx -d /var/db/duc/Ava-boot.sql /boot
Don't see any issues there.
~/public_html/cgi-bin/
dir I put ava.sh
: (click to expand)
I'd like to copy the databases generated on our various computers to a webserver, so they could all be viewed with the
cgi
command, but I'm running into this error even when trying to read the database with simpleinfo
command. It doesn't make much sense but I imagine it has something to do with incompatibility of libraries or something.For example, I downloaded the 1.4.5 release and compiled/installed it on an old computer that has these dependencies:
Then, a database was generated with simply
duc index /path
and transferred to the webserver, which also has duc 1.4.5 compiled from the source, and these dependencies:When I tried a simple
info
command, I got the error:I figured since the dependencies on the destination webserver are newer, they would be compatible with the older. That doesn't seem to be the case, so I even tried to compile latest Tokyo Cabinet 1.4.48 on the source machine and then rebuild duc with that, but I'm still getting the same error when trying to open the database on the webserver!