LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-23-2013, 03:31 PM   #1
mpnally
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Rep: Reputation: Disabled
inetd - No such file or directory


I'm trying to implement a simple http handler using inetd. I'm new to linux, and am following examples like this: http://www.debian-administration.org...a_shell_script and this: http://www.perlmonks.org/?node_id=544341. As far as I can tell, inetd is correctly installed and configured to point to my handler (a shell script). When I send an http request to my server, I get this error message in /var/log/syslog

Aug 23 20:06:31 precise32 inetd[7434]: cannot execute /usr/local/bin/bashhttpd: No such file or directory

and curl terminates with this message:

C:\Users\IBM_ADMIN>curl -X POST --data "http://exmple.org/foo" http://localhost:3010/build --header "Content-Type:text/xml" --include
curl: (52) Empty reply from server

(the odd-looking url is because curl is running on my windows host and port 3010 is redirected to port 80 on my Ubuntu 12.04 guest VM)

inetd appears to looking for my file in the right place but not finding it. I cannot figure out why - it appears to be there:

root@precise32:~# ls -l /usr/local/bin/bashhttpd
-rwxr-xr-x 1 root root 175 Aug 23 20:04 /usr/local/bin/bashhttpd

Here is the line from /etc/inetd.conf for my handler:

www stream tcp nowait nobody /usr/local/bin/bashhttpd bashhttpd

I have no idea what to even look at to figure out why this doesn't work - any suggestions welcome. Thanks in advance. I will be embarrassed if the problem is a simple typo.

I can't imagine that the details of my handler script are relevant, since I don't seem to be getting that far, but here is my minimal test handler

#!/bin/bash
read request

while /bin/true; do
read header
[ "$header" == $'\r' ] && break;
done

read data

echo $"HTTP/1.1 200 OK\r"
echo $data
 
Old 08-23-2013, 06:07 PM   #2
mpnally
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
I have made some progress on my own problem. I am not 100% sure, but I believe that in fact I was getting into my script and was failing there.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
inetd.conf file is missing prasad_ark Linux - Newbie 1 07-02-2008 01:40 AM
How do I determine which servers in Slack 11 are monitored by inetd / inetd.conf Old_Fogie Slackware 2 11-25-2006 01:06 PM
chrooting or jailing inetd or inetd started daemons ? MasterC Linux - Security 2 07-15-2003 05:28 PM
Qpopper on RHL 9 - no /etc/inetd.conf file gbbza Linux - Newbie 1 06-07-2003 07:42 AM
missing swat file in /etc/inetd.d/ in 7.1 MrX Linux - Software 9 11-25-2002 12:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration