Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18th September 2007, 04:34 PM
branchms Offline
Registered User
 
Join Date: Sep 2007
Location: Near Austin, Tx
Age: 39
Posts: 9
shells, Nice, setenv aaaarrrrgggghhhhh

So I kept getting this error.

./sculpt: error while loading shared libraries: libservo.so.1: cannot open shared object file: No such file or directory

Until I noticed that libservo.so.1 wasn’t in a location defined as a place that holds library files at the beginning of the script.



So now this program does what it is supposed to. Sort of, It draws the stuff on the screen numerous times then at some point is stops working and says.

Sculpt [init_data_dir_env]: WRAP_PARAMS_PATH env variable not set could not read in all of the environment variables. Exiting.

The fun part is that they have 3 servers here that run this stuff just fine but they were created long before I got here.

They all run RH ES 2.1.

In order to make it work with the VPN software I had to use Fedora Core 4.

That whole nice thing I mentioned before was part of this same story. He said they stopped getting these kinds of errors years ago when they implemented nice. The script that starts the process on the working servers runs a script that calls another script and it that script there’s this line.

Nice -15 ./servo_text_ui.pl –c

Now this works fine on the new system if I run it from the command line but if it’s in the script it gets “set priority: Permission denied”

Why it works out of the script but not in the script I don’t get.

I changed the top of the original script to read #!/bin/bash and the nice thing didn't give me an error but the setenv gives me errors now. The older servers all use #!/bin/tcsh –f

Let me know if I should post the whole script.
BrAnCh-
Reply With Quote
  #2  
Old 18th September 2007, 05:03 PM
giulix's Avatar
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
Quote:
Originally Posted by branchms

Why it works out of the script but not in the script I don’t get.

I changed the top of the original script to read #!/bin/bash and the nice thing didn't give me an error but the setenv gives me errors now. The older servers all use #!/bin/tcsh –f

Let me know if I should post the whole script.
BrAnCh-
setenv is tcsh only. The reason why is not giving you an error is because you changed tcsh to bash. tcsh has a builtin nice command which accepts the priority in the format `-n' or `+n', n being a number from -20 to +19. On the contrary, bash uses /bin/nice to set the priority, which accepts the format `-n-N' or `-n+N', N being again the priority from -20 to +19. Optionally, /bin/nice accepts the shorthand `-N' to decrease the priority to N. So, before you were using tcsh, thus invoking the builtin nice command to set the priority to -15. Now you are using bash, thus invoking /bin/nice to set the priority to +15. Mind that in order to increase the priority (negative value) you need to be root, independently of which nice command you are executing, whilst you don't need to be root to decrease it.

Last edited by giulix; 18th September 2007 at 05:08 PM.
Reply With Quote
  #3  
Old 18th September 2007, 05:22 PM
branchms Offline
Registered User
 
Join Date: Sep 2007
Location: Near Austin, Tx
Age: 39
Posts: 9
Ok good, That's pretty much what I thought.
Now when I set it leave it at #!/bin/tsch -f as it was originally file I get set priority: Permission denied.
What I don't understand is why it works on the older systems and not this one.

What if I create a seperate .sh file that simply says:

#!/bin/bash
nice -15 ./servo_text_ui-remote.sh -c

Trying to call that from the original script.
Reply With Quote
  #4  
Old 18th September 2007, 05:35 PM
giulix's Avatar
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
That will invoke /bin/nice, thus decreasing the priority to 15 (+15), which I don't think is what you want. Probably you need to check on the other machines under which user the script runs. I suspect it runs as root on the other machines, and not on the one that gives you problems.
Reply With Quote
  #5  
Old 18th September 2007, 05:52 PM
branchms Offline
Registered User
 
Join Date: Sep 2007
Location: Near Austin, Tx
Age: 39
Posts: 9
I wish I could say that's true but it appears to be running as the user and not root.
I even went so far as to get on one of the older boxes running ES 2.1 and created a new user ie:branchms logged in went to the directory where the script is, ran it and it worked.

Tried the same thing on the newer setup and got the same error.
It's as though I'm missing something set else where. I had a friend suggest looking at .cshrc and the like but they're all coming up no help.

Here is the original script. So you'll see why I can't leave it using bash. both this file and sculpt.env use setenv way too many times. I DID NOT MAKE THIS FILE.



[root@localhost bin]# cat start_servo-remote.sh
#!/bin/tcsh -f

# Uncomment once the hosts file is brought up to date
#if ($?REMOTEHOST) then
# setenv iphost `ypcat hosts | grep $REMOTEHOST | head -1 | awk '{print $1}'`
# setenv DISPLAY ${iphost}:0.0
#else if ($?HOST) then
# setenv iphost `ypcat hosts | grep $HOST | head -1 | awk '{print $1}'`
# setenv DISPLAY ${iphost}:0.0
#else if (! $?DISPLAY) then
# echo "Cannot run program DISPLAY enviroment variable not set"
# exit
#endif
#
#echo "$DISPLAY"
#unsetenv iphost
echo "One"
umask 002

set ignoreeof=10000
stty intr undef
stty eof undef
stty susp undef
stty quit undef
stty kill undef
stty start undef
stty stop undef
stty rprnt undef
stty lnext undef
stty werase undef
#bindkey ^G vi-replace-mode #This might allow over writes need lot of testing
echo "Two"
source sculpt.env
echo "Three"
setenv XAPPLRESDIR .

setenv LD_LIBRARY_PATH /usr/local/lib:../lib:/usr/lib
setenv WRAP_VERSION `./wrap80 -v`
setenv SCULPT_VERSION `./sculpt -v`
setenv AS400_FTP_DIR /tmp
echo "Four"
#nice -15 ./servo_text_ui-remote.pl -c
./servo_text_ui-remote.pl -c
echo "Five"

#./servo_text_ui.pl

stty intr "^c"
stty eof "^d"
stty susp "^z"
stty quit "^\"
stty kill "^u"
stty start "^s"
stty rprnt "^r"
stty lnext "^v"
stty werase "^W"

set ignoreeof=0;
Reply With Quote
  #6  
Old 18th September 2007, 05:59 PM
giulix's Avatar
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
This line is commented out:
Code:
#nice -15 ./servo_text_ui-remote.pl -c
This line is the one that actually starts the process:
Code:
./servo_text_ui-remote.pl -c
Reply With Quote
  #7  
Old 18th September 2007, 06:11 PM
branchms Offline
Registered User
 
Join Date: Sep 2007
Location: Near Austin, Tx
Age: 39
Posts: 9
Yes, So here's my problem.
When I have it uncommented. The telnet session crashes.
When I don't include nice in it the little program does it's drawing thing serveral times then I get.
Sculpt [init_data_dir_env]: WRAP_PARAMS_PATH env variable not set could not read in all of the environment variables. Exiting.

but in sculpt.env it clearly says:
setenv WRAP_PARAMS_PATH /production/data/style_setups/wrap/parms60
Reply With Quote
  #8  
Old 18th September 2007, 06:46 PM
branchms Offline
Registered User
 
Join Date: Sep 2007
Location: Near Austin, Tx
Age: 39
Posts: 9
btw, Creating a script that just says use bash shell and and nice the program when starting it worked.

but I'm still getting that dang
Sculpt [init_data_dir_env]: WRAP_PARAMS_PATH env variable not set could not read in all of the environment variables. Exiting.
error.

ggrrrrr....
Reply With Quote
  #9  
Old 18th September 2007, 08:35 PM
giulix's Avatar
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
Ok, so let's try to recap:
In your first post you said:
Quote:
Originally Posted by branchms
That whole nice thing I mentioned before was part of this same story. He said they stopped getting these kinds of errors years ago when they implemented nice.
Since I have no way of knowing what servo_text_ui.pl –c does, I'll take it for granted that running the process with a higher priority gets rid of the error (strange though).
If you nice it using the tcsh builtin, you raise its priority, while by using bash, the tcsh builtin does not apply anymore and, because of the difference I tried to explain, the same command actually lowers the priority of the running process, so I am not surprised that you get the error just the same.
I hope it's clearer now: By using bash, you're actually achieving exactly the opposite of what you intend, which is to raise the process priority in order to get rid of the error. As an example, to achieve the same result in bash, you'd have to specify nice -n-15 to raise the process priority to -15; specifying nice -15 in bash you're lowering the process priority to +15, therefore you still get the error (remember: negative numbers mean higher priority).
Now, unless you find a way to run the tcsh script as root, you will get the infamous `Permission denied' error message, no matter what you do. There are a few ways to do so: The one I prefer is to run the script with sudo. That way it'll be as if root ran the script, therefore you won't get any errors trying to raise the process priority and hopefully the error will go away.

Last edited by giulix; 18th September 2007 at 08:43 PM.
Reply With Quote
  #10  
Old 18th September 2007, 08:57 PM
branchms Offline
Registered User
 
Join Date: Sep 2007
Location: Near Austin, Tx
Age: 39
Posts: 9
Thank you, I totally forgot that about that.
You're right I'm probably lowering the priority. Now that is frustrating.
So I've really NOT solved my problem at all. (Thanks for accurately bursting that bubble)

I did at one point go the Sudo route on Friday and it did work however the application ran as ROOT which sadly caused a problem. Because I'm told the database isn't created for root but for the user I'm having all the trouble with.

I'll try now to run it with the correct syntax on nice in the Bash script. So I can witness the failure.

Do you think I should forget nice all together since I can't seem to figure out why it works on the older systems and not this one and focus on the error itself?
The error being: Sculpt [init_data_dir_env]: WRAP_PARAMS_PATH env variable not set could not read in all of the environment variables. Exiting.

BrAnCh
Reply With Quote
  #11  
Old 18th September 2007, 09:17 PM
giulix's Avatar
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
Quote:
Originally Posted by branchms
Do you think I should forget nice all together since I can't seem to figure out why it works on the older systems and not this one and focus on the error itself?
The error being: Sculpt [init_data_dir_env]: WRAP_PARAMS_PATH env variable not set could not read in all of the environment variables. Exiting.
BrAnCh
That would be the perfect solution, I reckon...
Reply With Quote
  #12  
Old 18th September 2007, 10:38 PM
branchms Offline
Registered User
 
Join Date: Sep 2007
Location: Near Austin, Tx
Age: 39
Posts: 9
Everything I have read about nice says you have to be a superuser to make it a higher priority.
How do I make my user a superuser with a method other than sudo?

I added the user to the root group to no avail.

BrAnCh-
Reply With Quote
Reply

Tags
aaaarrrrgggghhhhh, nice, setenv, shells

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
setenv TERM James Board Using Fedora 4 6th November 2008 07:37 PM
cannot use setenv command yg8p2 Using Fedora 4 11th October 2005 10:03 AM
Very nice FC 4, clear letters and nice desktop rdw Fedora Core 4 Test 14 6th June 2005 04:04 AM


Current GMT-time: 11:53 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat