LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-30-2010, 02:53 PM   #1
jnoake
LQ Newbie
 
Registered: Jan 2009
Posts: 24

Rep: Reputation: 11
Thumbs up F12 - uShare: ioctl: error during boot startup


I have configured ushare on fedora 12 to start as a service during boot (much reading and reference to methods all over the web).

I get an error in the /var/log/boot.log as follows:
Starting ushare: ioctl: Cannot assign requested address [FAILED]


There is no mention of network interface not being available like in other posts, or any hint of what the 'requested address' actually is.

I have renamed the /etc/rc3.d/S75ushare (rc3 to rc6) to /etc/rc3.d/S99ushare to make sure it starts after everything else.

If I start this service manually after I have logged on:
$sudo service ushare start

...it works!.

The firewall on the ushare server is disabled, server is 'wired' to my router (DG834) which is firewalled.

Here is the configuration details:
/etc/ushare.conf:

Code:
# /etc/ushare.conf
# Configuration file for uShare

# uShare UPnP Friendly Name (default is 'uShare').
USHARE_NAME=noake_media

# Interface to listen to (default is eth0).
# Ex : USHARE_IFACE=eth1
USHARE_IFACE=eth0

# Port to listen to (default is random from IANA Dynamic Ports range)
# Ex : USHARE_PORT=49200
USHARE_PORT=49200

# Port to listen for Telnet connections
# Ex : USHARE_TELNET_PORT=1337
USHARE_TELNET_PORT=

# Directories to be shared (space or CSV list).
# Ex: USHARE_DIR=/dir1,/dir2
USHARE_DIR=/var/shared/Downloads

# Use to override what happens when iconv fails to parse a file name.
# The default uShare behaviour is to not add the entry in the media list
# This option overrides that behaviour and adds the non-iconv'ed string into
# the media list, with the assumption that the renderer will be able to
# handle it. Devices like Noxon 2 have no problem with strings being passed
# as is. (Umlauts for all!)
#
# Options are TRUE/YES/1 for override and anything else for default behaviour
USHARE_OVERRIDE_ICONV_ERR=1

# Enable Web interface (yes/no)
USHARE_ENABLE_WEB=yes

# Enable Telnet control interface (yes/no)
USHARE_ENABLE_TELNET=no

# Use XboX 360 compatibility mode (yes/no)
USHARE_ENABLE_XBOX=yes

# Use DLNA profile (yes/no)
# This is needed for PlayStation3 to work (among other devices)
USHARE_ENABLE_DLNA=yes
/etc/init.d/ushare
I tried to get verbose logging by inserting OPTIONS="-v" - it did not help.

Code:
#!/bin/sh
#
# ushare		This shell script takes care of starting and stopping ushare.
#
# chkconfig: - 75 25
# description:	uShare UPnP A/V Media Server.
#

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

OPTIONS="-v"
prog=ushare
DESC="UPnP A/V Media Server"

[ -r "/etc/ushare.conf" ] && . /etc/ushare.conf
# abort if no shared directory is defined
[ -z "$USHARE_DIR" ] && exit 0


start() {
	echo -n $"Starting $prog: "
	daemon --user ushare $prog -d -D
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
}

stop() {
	echo -n $"Stopping $prog: "
	killproc $prog
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
}

reload() {
	echo -n $"Reloading $prog: "
	killproc $prog -HUP
	RETVAL=$?
	echo
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	status $prog
	RETVAL=$?
	;;
  restart)
	stop
	start
	;;
  condrestart)
	if [ -f /var/lock/subsys/$prog ]; then
	  stop
	  start
	fi
	;;
  reload)
	reload
	;;
  *)
	echo $"Usage: $prog {start|stop|restart|condrestart|reload|status"
	exit 1
esac

exit $RETVAL
 
Old 05-30-2010, 04:01 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Quote:
Each service which should be manageable by chkconfig needs two or more commented lines added to its init.d script. The first line tells chkconfig what runlevels the service should be started in by default, as well as the start and stop priority levels. If the service should not, by default, be started in any runlevels, a - should be used in place of the runlevels list. The second line contains a description for the service, and may be extended across multiple lines with backslash continuation.
Your /etc/init.d/ushare says

Code:
# chkconfig: - 75 25
# description:	uShare UPnP A/V Media Server.
#
So it's being told not to start in any run level by default.

man chkconfig

ioctl is the device driver - userspace interface so it could possibly be a memory address that is not being assigned.
 
Old 05-30-2010, 08:21 PM   #3
jnoake
LQ Newbie
 
Registered: Jan 2009
Posts: 24

Original Poster
Rep: Reputation: 11
12 - uShare: ioctl: error during boot startup

Smoker, thanks for the swift response.
A little more reading and it is clear that the '-' on the first line indicates that no run levels are specified, and the 75 is the start priorty and 25 is the stop priority, I changed the 75 to 99 to match the /etc/rc3.d link but I don't think it is relevant.
Despite not having run levels specified, the script is still running and attempting to start, before a user logs on - which is what I want - I want to able to just re-start the server and everything be ready without logging on and manually starting other stuff.

Your memory address suggestion may yield fruit since the process is being started as user 'ushare' and my not be able to initialise properly due to some user restriction, but what stumps me is that it will start fine when a user is logged on...

What I need now is some way of capturing the output during startup - is there a logfile that will show me more information on what went wrong?
 
Old 05-31-2010, 02:24 AM   #4
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
/var/log/dmesg

Or add 3 to the kernel options via the grub menu when booting, and watch the console output.
 
Old 06-24-2010, 07:24 AM   #5
jnoake
LQ Newbie
 
Registered: Jan 2009
Posts: 24

Original Poster
Rep: Reputation: 11
Resolved

Not quite sure what happened but this has started working.
I swear I have not done anything to fix it though?!...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
CDROM disappears after boot.. F12 digitolx Fedora 7 05-20-2010 08:44 AM
error in update F12 anika.ella Linux - Newbie 6 02-06-2010 10:48 AM
Starting uShare automatically at boot Vinnie82 Linux - Software 5 09-11-2008 12:16 PM
uShare Error on openSuse timrs Linux - Software 0 03-02-2007 07:14 PM
Boot Error: can't open /etc/ioctl.save 0_WRONLY parksobong Slackware 2 07-06-2006 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:28 AM.

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