Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Does this indicate a line lenght limitation in inetd.conf ?

Posted on 2004-11-01
15
Medium Priority
?
1,134 Views
Last Modified: 2013-12-16
I am attempting to start the cvs pserver service.  The following line, placed in /etc/inetd.conf correctly starts the service for the repository 'firmware':

cvspserver3 stream tcp nowait root /sopt/utils/cvs/cvs-1.11.11_solaris/bin/cvs cvs -f --allow-root=/home/mwifi/repository/firmware

However, I have multiple repositories that I would like available through the same pserver service.  So, I add a couple of more repositories to the command in /etc/inetd.conf:

cvspserver3 stream tcp nowait root /sopt/utils/cvs/cvs-1.11.11_solaris/bin/cvs cvs -f --allow-root=/home/mwifi/repository/firmware--allow-root=/ho me/mwifi/repository/drivers --allow-root=/home/mwifi/repository/TestEngineering pserver

This works fine.

HOWEVER, when I add one more repository:

cvspserver3 stream tcp nowait root /sopt/utils/cvs/cvs-1.11.11_solaris/bin/cvs cvs -f --allow-root=/home/mwifi/repository/firmware --allow-root=/ho me/mwifi/repository/drivers --allow-root=/home/mwifi/repository/TestEngineering --allow-root=/home/mwifi/repository/SWCust pserver

The pserver service will not allow anyone to login.  Attempts to login return a consistent error:

cvs -d :pserver:gurhan@dcf401:2403/home/mwifi/repository/firmware login
CVS password:
CVS [login aborted]: unrecognized auth response from [hostname].

The CVS cedarquist user manual says "unrecognized auth response" errors are caused by a bad command line in 'inetd.conf', typically an invalid option or forgetting to put the 'pserver' command at the end of the line.  Another less common problem is invisible control characters that your editor "helpfully" added without you noticing."

I have ruled out invisible control characters.

The command that fails is over 256 characters.
The command that works is under 256 characters.
Solaris5.8 is supposed to have a line limit of 1022 but this does not appear to be holding true with inetd.conf.

Lastly, I rebooted the server starting inetd with the "-l 1022" option, which changes the listener queue length to 1022 characters.  This did not help.

I would deeply appreciate some help.
0
Comment
Question by:jrtanenb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +2
15 Comments
 
LVL 21

Expert Comment

by:tfewster
ID: 12467682
If a line in inetd.conf is"broken" for readability  (as you've done in your examples above [Or EE has done for you!]), the last character of each line should be a "\" continuation character, with _no_ spaces after the \;

To show control characters when editing a file using vi, type  :set list
You'll then see $ symbols to mark any carriage returns.  The line would then look like this:

cvspserver3 stream tcp nowait root /sopt/utils/cvs/cvs-1.11.11_solaris/bin/cvs cvs -f  \$ --allow-root=/home/mwifi/repository/firmware --allow-root=/home/mwifi/repository/drivers \$ --allow-root=/home/mwifi/repository/TestEngineering --allow-root=/home/mwifi/repository/SWCust pserver$

Of course, if there are no line breaks in the line, you won't see any $ symbols apart from after the "pserver"...
0
 

Author Comment

by:jrtanenb
ID: 12467846
Thank you for responding.
Actually, the broken lines are just cut-n-paste errors from my posting.  In inetd.conf I have absolutely confirmed there are no line breaks.  Line breaks have not been the issue.  I apologize for the sloppiness in my posting.

Again, thank you for responding.
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12467891
Looks like a line length issue to me.

However, you might actually try splitting into multiple lines with '\' line-continuation as tfewster shows above. Who knows, the problem might only be in the bit that reads inetd.conf, and not the bit that internally represents the lines to go and exec the program being called.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 40

Expert Comment

by:jlevie
ID: 12468806
"The command that fails is over 256 characters" and that's where the problem lies. The max command line length for /bin/sh (and other shells) is 256 characters.

One solution to this is to move the repositories to a directory in /, say /CVS. That would allow:

cvspserver3 stream tcp nowait root /sopt/utils/cvs/cvs-1.11.11_solaris/bin/cvs cvs -f  \
--allow-root=/CVS/firmware --allow-root=/CVS/drivers \ --allow-root=/CVS/TestEngineering \
--allow-root=/CVS/SWCust pserver

which is below the 256 char limit.
0
 

Author Comment

by:jrtanenb
ID: 12472758
Yes...I had actually tried a similar strategy using symbolic links.  This helped me to demonstrate the problem was strictly a line-length issue.  The problem I face is that the user community has 12 repositories which I must make available through 1 pserver call (and, therefore, through 1 port).  No matter what I do to shrink the paths, 12 repositories will exceed the 256 character limit.  So, finally, after much pain, and some help from friends, I discovered that a call, in inetd.conf, like this will work:

cvspserver3 stream tcp nowait root /home/mwifi/cvs_ref/runpserver.sh

Here is the content of runpserver.sh:

env -i /utils/bin/cvs [space delimited list of repositories] pserver

I am, actually, not sure why this works.  However, runpserver.sh returns a result to inetd.conf that does not cause the line limit length to be exceeded.

Interestingly, the line in runpserver.sh far exceeds the 256 character limit.  From what I have read, the line limit in Solaris is 1022 characters.  However, apparently, for certain utilities like inetd.conf the limit is still 256k.

Thank you, each, for attempting to assist me.  Even though your proposals did not fully address the problem I was facing, would you accept 100 points each for your efforts?
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12472771
Hmm, good catch on the shell line length.

In this case, this is something to complain to Sun about, since POSIX says that compatible implementations must have a minimum line length of 4096 for shell lines.
0
 
LVL 21

Expert Comment

by:tfewster
ID: 12477244
No points for me, as I wasn't even in the right ball park!  I'd apologise for querying your original statements, but sometimes the obvious gets overlooked ;-)

jlevie is a Page Editor, so I think he can reduce the points for you.

0
 
LVL 40

Expert Comment

by:jlevie
ID: 12478810
Yes I can reduce the point total for the question. What would you like it to become?
0
 

Author Comment

by:jrtanenb
ID: 12627663
100 points seems fair.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 300 total points
ID: 12796246
points reduced from 500 to 100 'cause questioner provided own solution

jrtanenb, hope this is as you like, please make your decision for grading or feel free to ask for more assist

{{ ahoffmann EE Page Editor }}
0
 

Author Comment

by:jrtanenb
ID: 13007219
I guess I really do not understand the implications of grading.  What does assigning a grade mean or do for those who answered the question?
0
 

Author Comment

by:jrtanenb
ID: 13007497
OK...I guess a grade is not appropriate, here.  Thanks!!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question