[MXS-3176] MaxGUI logs admin user out after dbfwfilter is added to MaxScale config file Created: 2020-09-11  Updated: 2020-09-14  Resolved: 2020-09-14

Status: Closed
Project: MariaDB MaxScale
Component/s: dbfwfilter, maxgui
Affects Version/s: 2.5.3
Fix Version/s: 2.5.4

Type: Bug Priority: Major
Reporter: Catherine Trejo Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:
  1. hostnamectl
    Static hostname: ip-10-0-1-250.ec2.internal
    Icon name: computer-vm
    Chassis: vm
    Machine ID: f32e0af35637b5dfcbedcb0a1de8dca1
    Boot ID: 045d608390b14bbbb35b5b9cc9e00694
    Virtualization: xen
    Operating System: CentOS Linux 7 (Core)
    CPE OS Name: cpe:/o:centos:centos:7
    Kernel: Linux 3.10.0-327.10.1.el7.x86_64
    Architecture: x86-64

Attachments: Text File maxctrl_output.txt     File maxscale.cnf     Text File maxscale.log    

 Description   

When I add a database firewall service (uses dbfwfilter) to the configuration file, MaxGUI fails to stay connected. After restarting MaxScale, I reload the MaxGUI web page and log back in with the default admin credentials. The dashboard loads and displays the backend databases and lists the two services, Read-Write-Service and Database-Firewall-Service, under the Services column. Then immediately after reloading, the GUI displays, “Lost connection to MaxScale, please check if MaxScale is running” right before the GUI logs me out.

I have confirmed that MaxScale is indeed running. MaxCtrl commands still work after adding the database firewall service.

Attached are the maxscale.cnf, maxscale.log and maxctrl_output.txt files.

If it helps troubleshoot, I can provide login credentials to the training VM that I am using through training-exercises.mariadb.com.



 Comments   
Comment by markus makela [ 2020-09-12 ]

Can you also add the dbfwfilter rule file?

Comment by markus makela [ 2020-09-12 ]

Managed to catch it (vs-code stacktrace):

libdbfwfilter.so!std::_Rb_tree<Dbfw const*, std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data>, std::_Select1st<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> >, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > >::_M_begin(std::_Rb_tree<Dbfw const*, std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data>, std::_Select1st<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> >, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > > * const this) (/usr/include/c++/10/bits/stl_tree.h:749)
libdbfwfilter.so!std::_Rb_tree<Dbfw const*, std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data>, std::_Select1st<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> >, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > >::lower_bound(std::_Rb_tree<Dbfw const*, std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data>, std::_Select1st<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> >, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > > * const this, const std::_Rb_tree<Dbfw const*, std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data>, std::_Select1st<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> >, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > >::key_type & __k) (/usr/include/c++/10/bits/stl_tree.h:1277)
libdbfwfilter.so!std::map<Dbfw const*, (anonymous namespace)::DbfwThread::Data, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > >::lower_bound(std::map<Dbfw const*, (anonymous namespace)::DbfwThread::Data, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > > * const this, const std::map<Dbfw const*, (anonymous namespace)::DbfwThread::Data, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > >::key_type & __x) (/usr/include/c++/10/bits/stl_map.h:1259)
libdbfwfilter.so!std::map<Dbfw const*, (anonymous namespace)::DbfwThread::Data, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > >::operator[](std::map<Dbfw const*, (anonymous namespace)::DbfwThread::Data, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > > * const this, const std::map<Dbfw const*, (anonymous namespace)::DbfwThread::Data, std::less<Dbfw const*>, std::allocator<std::pair<Dbfw const* const, (anonymous namespace)::DbfwThread::Data> > >::key_type & __k) (/usr/include/c++/10/bits/stl_map.h:497)
libdbfwfilter.so!(anonymous namespace)::DbfwThread::rules((anonymous namespace)::DbfwThread * const this, const Dbfw * d) (/home/markusjm/MaxScale/server/modules/filter/dbfwfilter/dbfwfilter.cc:107)
libdbfwfilter.so!Dbfw::diagnostics(const Dbfw * const this) (/home/markusjm/MaxScale/server/modules/filter/dbfwfilter/dbfwfilter.cc:1789)
libdbfwfilter.so!maxscale::Filter<Dbfw, DbfwSession>::apiDiagnostics(const MXS_FILTER * pInstance, const MXS_FILTER_SESSION * pData) (/home/markusjm/MaxScale/include/maxscale/filter.hh:520)
libmaxscale-common.so.1.0.0!filter_json_data(const SFilterDef & filter, const char * host) (/home/markusjm/MaxScale/server/core/filter.cc:243)
libmaxscale-common.so.1.0.0!filter_list_to_json(const char * host) (/home/markusjm/MaxScale/server/core/filter.cc:284)
libmaxscale-common.so.1.0.0!(anonymous namespace)::cb_all_filters(const HttpRequest & request) (/home/markusjm/MaxScale/server/core/resource.cc:657)
libmaxscale-common.so.1.0.0!Resource::call(const Resource * const this, const HttpRequest & request) (/home/markusjm/MaxScale/server/core/resource.cc:150)
libmaxscale-common.so.1.0.0!(anonymous namespace)::RootResource::process_request_type((anonymous namespace)::RootResource * const this, const (anonymous namespace)::RootResource::ResourceList & list, const HttpRequest & request) (/home/markusjm/MaxScale/server/core/resource.cc:1305)
libmaxscale-common.so.1.0.0!(anonymous namespace)::RootResource::process_request((anonymous namespace)::RootResource * const this, const HttpRequest & request) (/home/markusjm/MaxScale/server/core/resource.cc:1339)
libmaxscale-common.so.1.0.0!(anonymous namespace)::handle_request(const HttpRequest & request) (/home/markusjm/MaxScale/server/core/resource.cc:1497)
libmaxscale-common.so.1.0.0!operator()(const struct {...} * const __closure) (/home/markusjm/MaxScale/server/core/resource.cc:1541)
libmaxscale-common.so.1.0.0!std::__invoke_impl<void, resource_handle_request(const HttpRequest&)::<lambda()>&>(std::__invoke_other, struct {...} &)(struct {...} & __f) (/usr/include/c++/10/bits/invoke.h:60)
libmaxscale-common.so.1.0.0!std::__invoke_r<void, resource_handle_request(const HttpRequest&)::<lambda()>&>(struct {...} &)(struct {...} & __fn) (/usr/include/c++/10/bits/invoke.h:153)
libmaxscale-common.so.1.0.0!std::_Function_handler<void(), resource_handle_request(const HttpRequest&)::<lambda()> >::_M_invoke(const std::_Any_data &)(const std::_Any_data & __functor) (/usr/include/c++/10/bits/std_function.h:291)
libmaxscale-common.so.1.0.0!std::function<void ()>::operator()() const(const std::function<void()> * const this) (/usr/include/c++/10/bits/std_function.h:622)
libmaxscale-common.so.1.0.0!maxbase::Worker::CustomTask::execute(maxbase::Worker::CustomTask * const this, maxbase::Worker & worker) (/home/markusjm/MaxScale/maxutils/maxbase/src/worker.cc:504)
libmaxscale-common.so.1.0.0!maxbase::Worker::handle_message(maxbase::Worker * const this, maxbase::MessageQueue & queue, const maxbase::MessageQueue::Message & msg) (/home/markusjm/MaxScale/maxutils/maxbase/src/worker.cc:666)
libmaxscale-common.so.1.0.0!maxbase::MessageQueue::handle_poll_events(maxbase::MessageQueue * const this, maxbase::Worker * pWorker, uint32_t events) (/home/markusjm/MaxScale/maxutils/maxbase/src/messagequeue.cc:307)
libmaxscale-common.so.1.0.0!maxbase::MessageQueue::poll_handler(MXB_POLL_DATA * pData, MXB_WORKER * pWorker, uint32_t events) (/home/markusjm/MaxScale/maxutils/maxbase/src/messagequeue.cc:342)
libmaxscale-common.so.1.0.0!maxbase::Worker::poll_waitevents(maxbase::Worker * const this) (/home/markusjm/MaxScale/maxutils/maxbase/src/worker.cc:877)
libmaxscale-common.so.1.0.0!maxbase::Worker::run(maxbase::Worker * const this, maxbase::Semaphore * pSem) (/home/markusjm/MaxScale/maxutils/maxbase/src/worker.cc:570)
maxbase::Worker::run(maxbase::Worker * const this) (/home/markusjm/MaxScale/maxutils/maxbase/include/maxbase/worker.hh:449)
main(int argc, char ** argv) (/home/markusjm/MaxScale/server/core/gateway.cc:2138)

Comment by markus makela [ 2020-09-12 ]

Caused by the fact that the MainWorker doesn't call the thread initialization function for the loaded module.

Generated at Thu Feb 08 04:19:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.