Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2016-08-25 11:17:29

ad_t
Member
Registered: 2016-05-09
Posts: 52

REX Module error

Trying to download the MySQL_simple_export example to my Pi, I get the error 'Connection to target device failed! Reason: REX Module error'; see screenshot below

mini_REXModuleerror.jpg

What have I missed, or is something not working?

Cheers,

Adam

Offline

#2 2016-08-25 12:03:57

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: REX Module error

Hi Adam,

it seems that there is missing one of REX modules on your target device. Please, try to connect to your target device with RexView and go to a "System log" tab. There should be specified which REX module are you missing.
My guess is that you are missing rex-dbdrvt as you are trying to run one of database examples.

I presume that your target device is Raspberry Pi, am I right? If so, you can check all installed packages on your Raspberry with following command:

dpkg -l

Look for packages named "rex-*".

Let me know what did you find and we will think of a solution for you.

Cheers, Tomas

Offline

#3 2016-08-25 14:05:14

ad_t
Member
Registered: 2016-05-09
Posts: 52

Re: REX Module error

Hi Tomas,

Thank you for replying.

As you guessed, the System log is showing a error 'unable to load module 'DbDrv', error = -108' (attached zip file includes the full log).

Also as you presumed, my target device is a Raspberry Pi, and the 'rex-dbdrvt' is listed as installed (attached zip file includes the full output of 'dpkg -l').

If you can think of a solution for me, I would be most grateful.

Cheers,

Adam

ModuleErrorLogs.zip

Offline

#4 2016-08-25 14:22:11

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: REX Module error

Hi Adam,

did you go through the README.md file which is part of the MySQL simple export example? There are some important prerequisites. The README file also contains link to Database driver documentation. You will find configuration notes for ODBC interface instalation inside.

Hope it will help you.

Please let me know if you have any questions.

Cheers, Tomas

Offline

#5 2016-08-25 15:52:55

ad_t
Member
Registered: 2016-05-09
Posts: 52

Re: REX Module error

Hi Tomas,

I was following 'MbDrv_ENG.pdf' which doesn't seem to have the bit about installing the ODBC driver, I had therefore assumed it was installed with the module. I can now download to the target, though I don't seem to be getting data inserted into the database; hopefully that is just a configuration issue though.

Thank you very much for your help.

Regards,

Adam

Offline

#6 2016-08-25 16:49:20

ad_t
Member
Registered: 2016-05-09
Posts: 52

Re: REX Module error

Hi Tomas,

I have got data into my database now (silly miss type in odbcinst.ini), but I am still getting the error

'2016-08-25;16:31:30.285;Error;DBDRV: connect to 'DRIVER=MySQL;SERVER=192.168.1.XXX;PORT=3306;DATABASE=test;UID=XXX;PWD=XXX;' failed!!!! ([IM008] [unixODBC][MySQL][ODBC 5.1 Driver]Invalid window handle);

Is it a problem? is it something I can fix?

[edited to put separate questions in a separate post]

Cheers,

Adam

Last edited by ad_t (2016-08-25 16:53:23)

Offline

#7 2016-08-26 08:41:17

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: REX Module error

Hi Adam,

can you please post a screenshot of your System log in RexView? It's strange that you get the data to your database correctly and Rex database driver says "Connect to DB failed". I will have a look at it.

Cheers, Tomas

Offline

#8 2016-08-26 10:08:16

ad_t
Member
Registered: 2016-05-09
Posts: 52

Re: REX Module error

Hi Tomas,

Screenshot uploaded

mini_REXInvalidWindowError.jpg

Adam

Offline

#9 2016-08-29 06:34:18

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: REX Module error

Hi Adam,
thanks for the screenshot. I have passed it to our developers. Hope they'll be able to shed some light on it.

Jaroslav

Offline

#10 2016-08-29 07:10:28

stetina
REX developer
From: Pilsen, Czech Republic
Registered: 2015-10-29
Posts: 9

Re: REX Module error

You got connection failed after 1st downloading configuration (line "Swapping configuration" in log file), but no fail after 2nd downloading configuration, so data are written into database.
I hope you know what was changed beetwen both downloads. Sometimes configuration not work correctly after Raspberry power on, but work correctly after manual download. This happend when some component (MySQL deamon or ODBC deamon in this case) start too late, but we not see this problem with MySQL.
By the way ODBC-connection-failed log message contain standardised error code (IM008) and error description (Invalid window handle) returned by MySQL. You can find more information in MySQL and/or ODBC documetation, internet forums etc. I try google, but I get only general advise to see ODBC and MySQL logfile for more details.

Offline

#11 2016-08-29 10:07:38

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: REX Module error

Hi Adam,
can you please examine this in more detail? Does the error occur only after the Raspberry Pi is powered on? RexCore starts very early during the boot-up, sooner than the Ethernet adapter is initialized, therefore it cannot connect to an external SQL server until the network is properly configured.

Please run "sudo raspi-config" on your RPi and enable "Wait for Network at Boot" and let me know if and how it affects the error.

Hope this helps.
Jaroslav

Offline

#12 2016-08-30 18:17:47

ad_t
Member
Registered: 2016-05-09
Posts: 52

Re: REX Module error

Hi Jaroslav and Stetina,

It does seem to be only occurring immediately after the Pi is restarted. Enabling 'Wait for Network at Boot', makes no difference.

Do you think I should be worried, or as the error does not seem to be affecting the operation of the system, should I ignore it?

Adam

Offline

#13 2016-09-02 11:08:58

jaroslav_sobota
Administrator
Registered: 2015-10-27
Posts: 535

Re: REX Module error

Hi Adam,
thanks for the update. At the moment I have no better advice than ignoring the error. I'll try some more to replicate the bug but so far I was not successful.

Jaroslav

Offline

Board footer

Powered by FluxBB