Need Help! Running EMC2

More
10 Jan 2010 14:39 #1484 by faran
hello everybody,
I'm new to Linux and Emc2, i install emc2 from live CD. and now i want to install it from source code. it built successfully. when i want to run it, i got this error in terminal:

Starting EMC2...
module_helper is not setuid root
Realtime system did not load
Shutting down and cleaning up EMC2...
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=13)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
module_helper is not setuid root
module_helper is not setuid root
module_helper is not setuid root
module_helper is not setuid root
module_helper is not setuid root
module_helper is not setuid root
module_helper is not setuid root
Cleanup done
EMC terminated with an error. You can find more information in the log:
/home/faran/emc_debug.txt
and
/home/faran/emc_print.txt





NOTE: when i configure it as simulator (./configure --enable-run-in-place --enable-simulator
) it works correctly

thanks

Please Log in or Create an account to join the conversation.

More
10 Jan 2010 19:27 #1485 by cblack
Replied by cblack on topic Re:Need Help! Running EMC2

module_helper is not setuid root


Looks like you forgot the

sudo make setuid

command after compiling and your user doesn't have enough access to load the realtime drivers.

Please Log in or Create an account to join the conversation.

More
12 Jan 2010 05:41 #1496 by faran
Replied by faran on topic Re:Need Help! Running EMC2
Dear cblack
I do these commands

$ cd src
$ ./configure --enable-run-in-place
$ make
$ sudo make setuid

after it completes and tell build successfully, when i run emc with this command
cd scripts
./emc

those error will appear in terminal
and if i don't run the last command "$ sudo make setuid" again, these error will appear.
I mean with or without this command i get this error

>>>>>>>>
Starting EMC2...
module_helper is not setuid root
Realtime system did not load
Shutting down and cleaning up EMC2...

Please Log in or Create an account to join the conversation.

More
17 Jan 2010 13:10 #1527 by faran
Replied by faran on topic Re:Need Help! Running EMC2
my problem solve. that's for root.
I should use root user

Please Log in or Create an account to join the conversation.

More
17 Jan 2010 21:40 #1538 by acemi
Replied by acemi on topic Re:Need Help! Running EMC2
It's not a good idea to run EMC using root account.

Could you give the following command in the EMC src directory again and send the output?

sudo make setuid

Please Log in or Create an account to join the conversation.

More
21 Jan 2010 07:06 #1568 by faran
Replied by faran on topic Re:Need Help! Running EMC2
Dear acemi

this is the complete command that i enterd, and the output that i gave

$ cd src
$ ./configure --enable-run-in-place
$make clean
$ make
$ sudo make setuid


my output after enter "sudo make setuid"

>>>>>>>>>>>>>>>>>>>>>
[sudo] password for faran:
chown root ../bin/emc_module_helper
chmod 4750 ../bin/emc_module_helper
chown root ../bin/bfload
chmod 4750 ../bin/bfload
chown root ../bin/pci_write
chmod 4750 ../bin/pci_write
chown root ../bin/pci_read
chmod 4750 ../bin/pci_read
faran@faran-desktop:/media/Faran/Computer/EMC/Run_Emc/emc2-2.3.4/src$
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

and then I enter this command

$cd scripts
$./emc

and my complete output after running emc2 is:


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
EMC2 - 2.3.4
Machine configuration directory is '/home/faran/emc2/configs/stepper'
Machine configuration file is 'stepper_mm.ini'
Starting EMC2...
module_helper is not setuid root
Realtime system did not load
Shutting down and cleaning up EMC2...
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
RTAPI: ERROR: could not open shared memory (errno=2)
HAL: ERROR: rtapi init failed
halcmd: hal_init() failed: -9
NOTE: 'rtapi' kernel module must be loaded
module_helper is not setuid root
module_helper is not setuid root
module_helper is not setuid root
module_helper is not setuid root
module_helper is not setuid root
module_helper is not setuid root
module_helper is not setuid root
Cleanup done
EMC terminated with an error. You can find more information in the log:
/home/faran/emc_debug.txt
and
/home/faran/emc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
faran@faran-desktop:/media/Faran/Computer/EMC/Run_Emc/emc2-2.3.4/scripts$
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


and now, in this state, if i enter these command


$sudo su
#./emc

the EMC2 run and and the axis.ngc loaded

and a guestion:
why is't good idea to run EMC using root account?

Thanks for your attention

Please Log in or Create an account to join the conversation.

More
21 Jan 2010 08:05 #1570 by acemi
Replied by acemi on topic Re:Need Help! Running EMC2
Hi faran,

Could you send the output for the following commands?

$ ulimit -a
$ cat /etc/security/limits.conf
$ grep rtai /etc/udev/rules.d/*

Please Log in or Create an account to join the conversation.

More
21 Jan 2010 10:28 #1575 by acemi
Replied by acemi on topic Re:Need Help! Running EMC2
Is EMC directory in a FAT partition?

Please Log in or Create an account to join the conversation.

More
21 Jan 2010 11:13 #1578 by faran
Replied by faran on topic Re:Need Help! Running EMC2
Hi acemi
yes of course

$ ulimit -a[/b]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
faran@faran-desktop:~/Desktop$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 4095
max locked memory (kbytes, -l) 20480
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 4095
virtual memory (kbytes, -v) unlimited
file locks
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


$ cat /etc/security/limits.conf
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
faran@faran-desktop:~/Desktop$ cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to
# - rtprio - max realtime priority
# - chroot - change root to directory (Debian-specific)
#
#<domain> <type> <item> <value>
#

#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#ftp - chroot /ftp
#@student - maxlogins 4

# End of file
* hard memlock 20480 #EMC2
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

grep rtai /etc/udev/rules.d/*
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
faran@faran-desktop:~/Desktop$ $ grep rtai /etc/udev/rules.d
bash: $: command not found
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

The grep is installed, but when i run your command, the command not found


Is EMC directory in a FAT partition?
No, It is in a NTFS partition

Please Log in or Create an account to join the conversation.

More
21 Jan 2010 17:21 #1579 by acemi
Replied by acemi on topic Re:Need Help! Running EMC2

No, It is in a NTFS partition


I think that it is not possible to set user ID bit in NTFS partition. This is for ext2/ext3 partition.Therefore the normal users can not run the program (like module_helper) with root privileges.

If you compile EMC in an ext3 partition, this problem will disappear

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum