Comments (32)
The same situation with clean install.
Debian 9, PSQL 12, TimescaleDB 1.7.2, Tango 9.3.4-rc6, all hdbpp repos are cloned from github.
@bourtemb @chedburgh any ideas?
from hdbpp-es.
I've inserted configuration from console and it works.
from hdbpp-es.
Hi, reason is that configuration in the DB has been moved from hdbpp-cm to hdbpp-es, but modification is still in progress and not yet merged in master branch, you should try integrated-build branch. @dlacoste-esrf should be working on this.
from hdbpp-es.
Now I have error compiling integrated-build, HdbClient.h not found.
What version of libhdbpp should I use with TimescaleDB? https://github.com/tango-controls-hdbpp/libhdbpp-timescale/tree/master/thirdparty/libhdbpp or https://github.com/tango-controls-hdbpp/libhdbpp?
from hdbpp-es.
Hi,
you should use https://github.com/tango-controls-hdbpp/libhdbpp
there is as well a custom cmake flag FETCH_LIBHDBPP, so that libhdbpp is downloaded and built with the event subscriber.
Sorry for the sad state of the repositories right now, I'll try to fix it up soon.
from hdbpp-es.
Hello.
I've compiled the DS with cmake flag. When I try to run it (with -v5 option) I have such output.
1597132187 [140323005146944] DEBUG sys/tools/es_test HdbEventSubscriber::init_device() create device sys/tools/es_test
1597132187 [140323005146944] DEBUG sys/tools/es_test subscribeRetryPeriod = 60
1597132187 [140323005146944] DEBUG sys/tools/es_test subscribeChangeAsFallback = 0
1597132187 [140323005146944] INFO sys/tools/es_test HdbEventSubscriber id=0
1597132187 [140323005146944] DEBUG sys/tools/es_test CONFIGURING CONTEXTS: adding ALWAYS <-> 0
1597132187 [140323005146944] DEBUG sys/tools/es_test CONFIGURING CONTEXTS: adding RUN <-> 1
1597132187 [140323005146944] DEBUG sys/tools/es_test CONFIGURING CONTEXTS: adding SHUTDOWN <-> 2
1597132187 [140323005146944] DEBUG sys/tools/es_test CONFIGURING CONTEXTS: adding SERVICE <-> 3
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Database::Database(): TANGO host mpd-ecal-sc-1.he.jinr.ru port 10000
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Entering DeviceImpl destructor for device sys/tools/es_test
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Leaving DeviceImpl destructor for device sys/tools/es_test
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Entering DeviceClass destructor for class HdbEventSubscriber
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Leaving DeviceClass destructor for class HdbEventSubscriber
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Entering DeviceImpl destructor for device dserver/hdb++es-srv/test
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Leaving DeviceImpl destructor for device dserver/hdb++es-srv/test
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Entering DeviceClass destructor for class DServer
1597132187 [140323005146944] DEBUG dserver/hdb++es-srv/test Leaving DeviceClass destructor for class DServer
Tango exception
Severity = ERROR
Error reason = API_MemoryAllocation
Desc : Can't allocate memory in server while building command(s) or device(s) for class number 1
Origin : DServer::init_deviceReceived a CORBA_Exception
Exiting
from hdbpp-es.
I have the same issue, it looks like it is crashing in HdbppTimescaleDbUtils::extractConfig
from hdbpp-es.
It looks like Tango received a std::bad_alloc exception during the device server initialization.
https://github.com/tango-controls/cppTango/blob/8fd3b4d85ad43bfac8f0e50bfdee22a98ac0c574/cppapi/server/dserver.cpp#L385
from hdbpp-es.
Is no one following the combined guide on hdbpp-timescale-project?
https://github.com/tango-controls-hdbpp/hdbpp-timescale-project/blob/master/doc/build.md
Since some of the branches have been merged, you will need to update what the integrated project builds, but it should checkout and build everything for you. You no longer need to build the individual components.
from hdbpp-es.
It looks like Tango received a std::bad_alloc exception during the device server initialization.
https://github.com/tango-controls/cppTango/blob/8fd3b4d85ad43bfac8f0e50bfdee22a98ac0c574/cppapi/server/dserver.cpp#L385
As I already said, this seems a bug in libhdbpp-timescale, since bypassing HdbppTimescaleDbUtils::extractConfig make it work.
from hdbpp-es.
Maybe this is version mismatch? Since some components have there updated branch merged. Some have not been tagged correctly either. Can I suggest trying:
hdbpp_cm - master
hdbpp_es - intergated branch
libhdbpp - master (v2.0)
If the issue is in HdbppTimescaleDbUtils::extractConfig(), just put some cout statements in and see what configuration parameter it is crashing on. Is there a config parameter without an equals sign?
There is information here on the config parameters: https://github.com/tango-controls-hdbpp/libhdbpp-timescale/blob/master/doc/configuration.md
from hdbpp-es.
Maybe this is version mismatch? Since some components have there updated branch merged. Some have not been tagged correctly either. Can I suggest trying:
You are right! It happens only when using libhdbpp-timescale not project-build2 with libhdbpp master (which is actually v2). So HdbppTimescaleDbFactory::create_db is called with the wrong parameters ending with a vector configuration not initialized so making explode extractConfig
from hdbpp-es.
The right combination for v.2 at the moment is
hdbpp_cm - master
hdbpp_es - integrated-build
libhdbpp - master (v2.0)
libhdbpp-timescale - project-build2
from hdbpp-es.
Excellent. Suggested TODO:
- I have opened tickets to tag some repos correctly, lets fix the tags ASAP.
- hdbpp-es needs the integrated build branch reviewing and merging ASAP, then tagging correctly.
- hdbpp-timescale-project needs its build updated to embed the know working tags.
Its vital the repositories are tagged correctly when changes occur, otherwise we can hit some madness.
from hdbpp-es.
I am sorry, but I was (again) wrong: with the above combination I have
HdbClient: Error loading symbol getDBFactory from library: libhdb++timescale.so
I am still missing something.
from hdbpp-es.
DId you use libhdbpp-timescale branch project-build2? If so, try master.
from hdbpp-es.
No master have the v1 signature of HdbppTimescaleDbFactory::create_db, probably batch-insert is the right one, testing now.
from hdbpp-es.
Its been a while since I was on this, but I think batch-insert just branches from project-build2. I may need to look into this tonight. Something seems to have been mixed up somewhere.
from hdbpp-es.
Same error with batch-insert.
from hdbpp-es.
There seems to be something fishy here.
I made libhdbpp-timescale no longer dependent on libhdbpp. It includes the headers it needs itself. Yet I see reference to it in the cmake file. Maybe there is a missing commit from me on the project-build2 branch?
project-build2 is correct. Investigating for a few mins.
from hdbpp-es.
Right, libhdbpp-timescale is implementing getDBFactory, but not exporting it.
Perhaps we need to add
extern "C"
{
typedef hdbpp::DBFactory *getDBFactory_t();
hdbpp::DBFactory *getDBFactory();
}
To the end of AbstractDb.hpp? This needs to be outside the namespace. It can live in one of the other public headers also.
from hdbpp-es.
I don't know.
With the same combination but using libhdbpp-mysql - libhdbpp2 branch it is working, but it looks quite similar
from hdbpp-es.
I have compiled and run a test application via the hdbpp-timescale-project without the error. I will push the changes to that project I made.
from hdbpp-es.
I also pushed the fix to libhdbpp-timescale (that I posted above). Its on the project-build2 branch. Using the hdbpp-timescale-project this should all just work. I don't have time to test individual components.
I'll setup a project board to get some of these tickets/PR's merged in an orderly fashion, if that helps.
Individually, as mentioned by @gscalamera I think the following will work:
hdbpp_cm - master
hdbpp_es - integrated-build
libhdbpp - master (v2.0)
libhdbpp-timescale - project-build2
from hdbpp-es.
I've tried this set and ES still has memory allocation error.
hdbpp_cm - master
hdbpp_es - integrated-build
libhdbpp - master (v2.0)
libhdbpp-timescale - project-build2
hdbpp-timescale-project cmake has multiple errors, here are logs:
CMakeOutput.log
CMakeError.log
from hdbpp-es.
We have to fix the repos, but I am not sure how long it will take to make them clean again…
If you want a quick fix, you have to rebuild libhdbpp-timescale, but on the CMakeLists.txt in src there is a flag BYPASS_LIBHDBPP, it should be removed, as it is intended to be true for the new versions.
This way you will compile HdbClient.cpp on libhdbpp-timescale.
Then on this project, change the CMakeList.txt to link directly on the previous library, so in your CMakelists.txt, line 77 replace libhdb++.so.2 with libhdb++timescale.so.2. This way it should be ok.
Sorry it's a bit of a mess right now, we will try to fix it as fast as possible
from hdbpp-es.
What are you compiling on? I see pthread missing in the errors!
CMakeFiles/cmTC_ce417.dir/src.c.o: In function `main':
src.c:(.text+0x2f): undefined reference to `pthread_create'
src.c:(.text+0x3b): undefined reference to `pthread_detach'
src.c:(.text+0x47): undefined reference to `pthread_cancel'
src.c:(.text+0x58): undefined reference to `pthread_join'
src.c:(.text+0x6c): undefined reference to `pthread_atfork'
from hdbpp-es.
I updated the hdbpp-timescale-project to reflect the merged and tagged dependencies. Everything is now set for v2.0.0 apart from libhdbpp-timescale.
This works and builds for me on Ubuntu 20. Afraid I don't have time to go deeper into the other errors.
from hdbpp-es.
@dlacoste-esrf It's ok, I'm just trying to test and help fixing this, take your time.
from hdbpp-es.
What are you compiling on? I see pthread missing in the errors!
It's Debian 9 with manually updated CMake 3.18 to match requirements.
Freshly installed Debian 10 with CMake 3.13 has similar problems with pthread.
CMakeError.log
Also there is an error detecting PostgreSQL:
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found
version "12.4 (Debian 12.4-1.pgdg100+1)")
Call Stack (most recent call first):
/usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.13/Modules/FindPostgreSQL.cmake:175 (find_package_handle_standard_args)
external/libhdbpp-timescale/thirdparty/libpqxx/src/CMakeLists.txt:15 (find_package)
from hdbpp-es.
Regarding the PostgreSQL error you can try passing -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql to cmake
from hdbpp-es.
If you want a quick fix, you have to rebuild libhdbpp-timescale, but on the CMakeLists.txt in src there is a flag BYPASS_LIBHDBPP, it should be removed, as it is intended to be true for the new versions.
This way you will compile HdbClient.cpp on libhdbpp-timescale.
Then on this project, change the CMakeList.txt to link directly on the previous library, so in your CMakelists.txt, line 77 replace libhdb++.so.2 with libhdb++timescale.so.2. This way it should be ok.
Thanks, it works. I've successfully subscribed to an attr and can see data via Viewer. I hope that soon we will be able to install the HDB without any edits. I'll fork repos as a temporary solution.
Regarding the PostgreSQL error you can try passing -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql to cmake
It solved problem with include dir, but PThread is still missing.
from hdbpp-es.
Related Issues (12)
- Context attribute event.
- Strange TTL HOT 6
- hdbpp-es got Tango exception on ARM64 HOT 5
- Link error with project-build (PushThread.cpp:(.text+0xc5): undefined reference to `getDBFactory') HOT 4
- Archiving contexts/strategies HOT 3
- Allow to call AttributeAdd without passing data_type, data_format, write_type HOT 2
- Manage archiving dynamic attributes HOT 4
- Gitlab Migration: Please log into GL with your GH account ASAP
- AttributeRemove freezes HOT 5
- Segmentation fault when error updating ttl
- Use NAME_SRV during install HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hdbpp-es.