RT demon is not running. rtapi_app_main(rtapi): -22 Invalid argument ???

363 views
Skip to first unread message

Magnus Wiberg

unread,
Sep 13, 2018, 11:53:23 AM9/13/18
to Machinekit

I installed machinekit and was working with realtime start. Then I was looking at the interface and loaded axis_sim and pru_test and not much more. Now that I try realtime start I get this: (can someone pleas shed some light on what might be wrong?)


debian@BeagleBoard-X15:~/machinekit/configs$ realtime start

rtapi_msgd command:  /usr/libexec/linuxcnc/rtapi_msgd --instance=0 --rtmsglevel=1 --usrmsglevel=1 --halsize=524288

rtapi_app command:  /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0

halcmd: cant connect to rtapi_app: -1 (uri= uuid=a42c8c6b-4025-4f83-ba28-dad21114744a): rtapi_rpc(): reply timeout


halcmd: the rtapi:0 RT demon is not running - please investigate /var/log/linuxcnc.log

halcmd: the msgd:0 logger demon is not running - please investigate /var/log/linuxcnc.log

E: 18-09-13 15:45:56 dangling 'DEALER' socket created at hal/utils/halcmd_rtapiapp.cc:281



and in the linuxcnc.log I get 


Sep 13 15:45:50 BeagleBoard-X15 msgd:0: startup pid=26967 flavor=rt-preempt rtlevel=1 usrlevel=1 halsize=524288 shm=Posix cc=gcc 6.3.0 20170516  version=v0.1~-----~041712d

Sep 13 15:45:50 BeagleBoard-X15 msgd:0: ØMQ=4.2.1 czmq=4.0.2 protobuf=3.0.0 atomics=gcc intrinsics    libwebsockets=2.0.3

Sep 13 15:45:50 BeagleBoard-X15 msgd:0: configured: sha=041712d

Sep 13 15:45:50 BeagleBoard-X15 msgd:0: built:      Sep 12 2018 10:37:23 sha=041712d

Sep 13 15:45:50 BeagleBoard-X15 msgd:0: register_stuff: actual hostname as announced by avahi='BeagleBoard-X15.local'

Sep 13 15:45:50 BeagleBoard-X15 msgd:0: zeroconf: registering: 'Log service on BeagleBoard-X15.local pid 26967'

Sep 13 15:45:51 BeagleBoard-X15 rtapi:0: rtapi_app_main(rtapi): -22 Invalid argument

Sep 13 15:45:51 BeagleBoard-X15 msgd:0: rtapi_app exit detected - scheduled shutdown

Sep 13 15:45:51 BeagleBoard-X15 msgd:0: zeroconf: registered 'Log service on BeagleBoard-X15.local pid 26967' _machinekit._tcp 0 TXT "uuid=a42c8c6b-4025-4f83-ba28-dad21114744a" "instance=173fab7c-b76c-11e8-a37d-d436392c3ab0" "service=log" "dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a"

Sep 13 15:45:53 BeagleBoard-X15 msgd:0: msgd shutting down

Sep 13 15:45:53 BeagleBoard-X15 msgd:0: zeroconf: unregistering 'Log service on BeagleBoard-X15.local pid 26967'

Sep 13 15:45:53 BeagleBoard-X15 msgd:0: log buffer hwm: 0% (0 msgs, 0 bytes out of 524288)

Sep 13 15:45:53 BeagleBoard-X15 msgd:0: normal shutdown - global segment detached

schoo...@gmail.com

unread,
Sep 13, 2018, 12:03:32 PM9/13/18
to machi...@googlegroups.com

On 13/09/18 16:53, Magnus Wiberg wrote:

I installed machinekit and was working with realtime start. Then I was looking at the interface and loaded axis_sim and pru_test and not much more. Now that I try realtime start I get this: (can someone pleas shed some light on what might be wrong?)

Unfortunately the prints don't tell us anything

Why are you running `realtime start`?
What do you mean you have loaded axis_sim and pru_test?

It sounds like you have already got realtime started running a sim and then are trying to run it again.

Reboot and in a terminal run
sudo > /var/log/linuxcnc.log
DEBUG=5 realtime restart
halcmd loadrt debounce
halcmd show pin
halrun -U

If you get an error, attach the new linuxcnc.log, if not your problem was what you were doing.


debian@BeagleBoard-X15:~/machinekit/configs$ realtime start

rtapi_msgd command:  /usr/libexec/linuxcnc/rtapi_msgd --instance=0 --rtmsglevel=1 --usrmsglevel=1 --halsize=524288

rtapi_app command:  /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0

halcmd: cant connect to rtapi_app: -1 (uri= uuid=a42c8c6b-4025-4f83-ba28-dad21114744a): rtapi_rpc(): reply timeout


halcmd: the rtapi:0 RT demon is not running - please investigate /var/log/linuxcnc.log

halcmd: the msgd:0 logger demon is not running - please investigate /var/log/linuxcnc.log

E: 18-09-13 15:45:56 dangling 'DEALER' socket created at hal/utils/halcmd_rtapiapp.cc:281



and in the linuxcnc.log I get 


Sep 13 15:45:50 BeagleBoard-X15 msgd:0: startup pid=26967 flavor=rt-preempt rtlevel=1 usrlevel=1 halsize=524288 shm=Posix cc=gcc 6.3.0 20170516  version=v0.1~-----~041712d

Sep 13 15:45:50 BeagleBoard-X15 msgd:0: ØMQ=4.2.1 czmq=4.0.2 protobuf=3.0.0 atomics=gcc intrinsics    libwebsockets=2.0.3

Sep 13 15:45:50 BeagleBoard-X15 msgd:0: configured: sha=041712d

Sep 13 15:45:50 BeagleBoard-X15 msgd:0: built:      Sep 12 2018 10:37:23 sha=041712d

Sep 13 15:45:50 BeagleBoard-X15 msgd:0: register_stuff: actual hostname as announced by avahi='BeagleBoard-X15.local'

Sep 13 15:45:50 BeagleBoard-X15 msgd:0: zeroconf: registering: 'Log service on BeagleBoard-X15.local pid 26967'

Sep 13 15:45:51 BeagleBoard-X15 rtapi:0: rtapi_app_main(rtapi): -22 Invalid argument

Sep 13 15:45:51 BeagleBoard-X15 msgd:0: rtapi_app exit detected - scheduled shutdown

Sep 13 15:45:51 BeagleBoard-X15 msgd:0: zeroconf: registered 'Log service on BeagleBoard-X15.local pid 26967' _machinekit._tcp 0 TXT "uuid=a42c8c6b-4025-4f83-ba28-dad21114744a" "instance=173fab7c-b76c-11e8-a37d-d436392c3ab0" "service=log" "dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a"

Sep 13 15:45:53 BeagleBoard-X15 msgd:0: msgd shutting down

Sep 13 15:45:53 BeagleBoard-X15 msgd:0: zeroconf: unregistering 'Log service on BeagleBoard-X15.local pid 26967'

Sep 13 15:45:53 BeagleBoard-X15 msgd:0: log buffer hwm: 0% (0 msgs, 0 bytes out of 524288)

Sep 13 15:45:53 BeagleBoard-X15 msgd:0: normal shutdown - global segment detached

--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Magnus Wiberg

unread,
Sep 13, 2018, 12:15:47 PM9/13/18
to Machinekit
I did as you said and I got the exact same error message after each entry of command.

Thank you for taking a look at this by the way!
linuxcnc.log

schoo...@gmail.com

unread,
Sep 13, 2018, 12:25:24 PM9/13/18
to machi...@googlegroups.com
Looks like you have installed one flavour and are running another
ie your kernel does not match the flavour type package you installed

https://github.com/machinekit/machinekit/blob/master/src/rtapi/rtapi_main.c#L119

On 13/09/18 17:15, Magnus Wiberg wrote:
> Sep 13 16:05:30 BeagleBoard-X15 rtapi:0: 4:rtapi_app:2518:user RTAPI:0 posix v0.1~-----~041712d init
> Sep 13 16:05:30 BeagleBoard-X15 rtapi:0: 1:rtapi_app:2518:user RTAPI:0 BUG: thread flavors dont match: global 1 rtapi 0
> Sep 13 16:05:30 BeagleBoard-X15 rtapi:0: rtapi_app_main(rtapi): -22 Invalid argument

If that does not help you fix it, will need to know exactly what you
have installed, on what, version, from where etc. etc.



Magnus Wiberg

unread,
Sep 13, 2018, 12:26:00 PM9/13/18
to Machinekit
I realize now that earlier when I ran it I couldnt find the pru_generic.bin on the disk anywhere so I ran sudo apt-get install machinekit-rt-preempt again and I found pru_generic.bin afterwards. 

schoo...@gmail.com

unread,
Sep 13, 2018, 12:27:47 PM9/13/18
to machi...@googlegroups.com
OK, you possibly installed machinekit without machinekit-rt-preempt or something like that
Hopefully now fixed.
--

Magnus Wiberg

unread,
Sep 13, 2018, 12:36:12 PM9/13/18
to Machinekit
I followed this guide first https://machinekoder.com/machinekit-debian-stretch-beaglebone-black/. And I could run machinekit. Then I saw that I didnt have the pru_generic.bin first so I ran sudo apt-get install machinekit-rt-preempt and could then find pru_generic.bin, but couldnt run machinekit anymore and just get this error which I have no idea what it means.

Magnus Wiberg

unread,
Sep 13, 2018, 12:55:22 PM9/13/18
to Machinekit
No it is not working yet :/ I guess It was stupid of me to run apt-get install machinekit-rt-preempt as it messed it up? I'm just very confused what is not working since I dont really know what I changes since I first got it working since I ran apt install machinekit-rt-preempt :S

Robert Nelson

unread,
Sep 13, 2018, 1:05:39 PM9/13/18
to magnus....@gmail.com, Machinekit Mailing List
Based on the logs, this is an x15 right?

fyi:

There's no uio driver setup, only ti's remoteproc_pruss..

Regards,

--
Robert Nelson
https://rcn-ee.com/

Magnus Wiberg

unread,
Sep 13, 2018, 1:18:23 PM9/13/18
to Machinekit
Is uio what is used in pru_generic.bin?
Shouldnt this take care of that then? https://groups.google.com/forum/#!topic/beagleboard-x15/MfB-GMl0UYA

Any suggestions on what I can do to get machinekit working? Or should I just wipe it and start from scratch?

Robert Nelson

unread,
Sep 13, 2018, 1:23:58 PM9/13/18
to magnus....@gmail.com, Machinekit Mailing List
On Thu, Sep 13, 2018 at 12:18 PM Magnus Wiberg
<magnus....@gmail.com> wrote:
>
> Is uio what is used in pru_generic.bin?
> Shouldnt this take care of that then? https://groups.google.com/forum/#!topic/beagleboard-x15/MfB-GMl0UYA
>
> Any suggestions on what I can do to get machinekit working? Or should I just wipe it and start from scratch?

Oh, i totally forgot about that..

i don't know then. ;)

Just make sure you switch to the v4.14.x-rt kernel, the "non-rt" is
installed by default in the x15 image

Magnus Wiberg

unread,
Sep 13, 2018, 1:32:06 PM9/13/18
to Machinekit
yes I did. I just dont know what/where I messed up my installation of machinekit :S

Magnus Wiberg

unread,
Sep 13, 2018, 8:48:57 PM9/13/18
to Machinekit
I saw in the log that what differs from earlier when it worked and now is the built date. The July 24 build worked for me while the September 9/12 build doesn't. 

Magnus Wiberg

unread,
Sep 14, 2018, 8:13:01 AM9/14/18
to Machinekit
I thinking about installing the earlier build I had before from http://deb.machinekit.io/debian/pool/main/m/machinekit/. Could someone please tell me how to?

tried but I 

schoo...@gmail.com

unread,
Sep 14, 2018, 9:28:47 AM9/14/18
to machi...@googlegroups.com
If you mean install an earlier version of machinekit from packages

apt remove machinekit machinekit-posix

download the packages of the version you want from http://deb.machinekit.io/debian/pool/main/m/machinekit/ and move into a dir on their own (for simplicity)

Then from that dir with the packages in
dpkg -i machinekit_XXXXX.deb machinekit-rt-preemptXXXX.deb

assuming you already have all the depenencies present from the previous install, that should work fine
--

schoo...@gmail.com

unread,
Sep 14, 2018, 9:29:26 AM9/14/18
to machi...@googlegroups.com

On 14/09/18 14:28, schoo...@gmail.com wrote:
If you mean install an earlier version of machinekit from packages

apt remove machinekit machinekit-posix
or machinekit-rt-preempt even :)

Magnus Wiberg

unread,
Sep 14, 2018, 11:15:34 AM9/14/18
to Machinekit
Great! This works! Something must be wrong with the latest build then I guess. Should I take this to some developer to fix the issue in future builds? In that case who?

Thanks a tonne for the help guys!

schoo...@gmail.com

unread,
Sep 14, 2018, 11:44:45 AM9/14/18
to machi...@googlegroups.com


On 14/09/18 16:15, Magnus Wiberg wrote:
Great! This works! Something must be wrong with the latest build then I guess. Should I take this to some developer to fix the issue in future builds? In that case who?

You just did, I'll look at it tomorrow.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages