# tftp cannt start

## nishizawa23

when i input

emerge net-ftp/tftp-hpa

and

 /etc/init.d/in.tftpd start

but it cannt start

start                           [!!]

why?

help me!

----------

## cst

post the error message

post your /etc/conf.d/in.tftpd

Is your network working correctly?

----------

## nishizawa23

config_eth0=("192.168.0.110 netmask 255.255.255.0 brd 192.168.0.255")

routes_eth0=("default via 192.168.0.1")

it work well

tftp configuer is 

/etc/conf.d/in.tftpd

# Path to server files from

# Depending on your application you may have to change this.

# This is commented out to force you to look at the file!

#INTFTPD_PATH="/var/tftp/"

INTFTPD_PATH="/tftpboot/"

#INTFTPD_PATH="/tftproot/"

# For more options, see in.tftpd( :Cool: 

# -R 4096:32767 solves problems with ARC firmware, and obsoletes

# the /proc/sys/net/ipv4/ip_local_port_range hack.

# -s causes $INTFTPD_PATH to be the root of the TFTP tree.

# -l is passed by the init script in addition to these options.

INTFTPD_OPTS="-R 4096:32767 -s ${INTFTPD_PATH}"

but start it ,it show

* Caching service dependencies ...                                                                         [ ok ]

 * Starting tftpd ...                                                                                       [ !! ]

----------

## cst

I had this

```
* Starting dhcp ... [ !! ]
```

and the dhcp server was running fine

maybe your tftp is actually running

you can add 

```
-v
```

 to INTFTPD_OPTS, maybe it will show some errors then

----------

## nishizawa23

but in doc

you input 

netstat -al | grep ^udp

it show

udp        0      0 *:tftp                  *:* <-- (look for this line)

but nothing in my computer

i think it means tftp server didn't work

----------

## nishizawa23

vim /var/log/message

it show

May 18 17:24:05 localhost in.tftpd[15915]: cannot open IPv6 socket, disable IP

v6: Address family not supported by protocol

May 18 17:24:05 localhost in.tftpd[15915]: Cannot set nonblock flag on socket:

 Bad file descriptor

i think it about ipv6

but how to resolve it

----------

## cst

maybe you compiled tftp with ipv6

```
emerge tftp-hpa -pv
```

----------

## nishizawa23

yes!

emerge  tftp -pv

[ebuild   R   ] net-ftp/tftp-hpa-0.49-r1  USE="ipv6 readline tcpd (-selinux)"

and configure is 

./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-ipv6 --with-tcpwrappers --with-readline

but how shall i do?

----------

## cst

you need to add -ipv6 in USE: in /etc/make.conf (for all packages)

or if you want only that package to have -ipv6 you can add it in /etc/portage/package.use

After that emerge the package once more

----------

## nishizawa23

but i don't want to compile with ipv6 and my kernerl aslo have not compile with ipv6

i want to disable it...

----------

## paulusbrand

run as root 

echo "net-ftp/tftp-hpa -ipv6" >> /etc/portage/package.keywords

emerge tftp-hpa

----------

## nishizawa23

and i

cd /usr/portage/distfiles/tftp-hpa-0.49

./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-tcpwrappers --with-readline --without-ipv6

make && make install

/etc/init.d/in.tftpd start

and it worked

but has any good method to do it?

----------

## nishizawa23

 :Embarassed: 

in "-ipv6" the "-" means disable?

i'm stupid

i will try

thank you all

----------

## cst

 *paulusbrand wrote:*   

> run as root 
> 
> echo "net-ftp/tftp-hpa -ipv6" >> /etc/portage/package.keywords
> 
> emerge tftp-hpa

 

 *Quote:*   

> or if you want only that package to have -ipv6 you can add it in /etc/portage/package.use 

 

USE not KEYWORDS

----------

## paulusbrand

 *cst wrote:*   

>  *paulusbrand wrote:*   run as root 
> 
> echo "net-ftp/tftp-hpa -ipv6" >> /etc/portage/package.keywords
> 
> emerge tftp-hpa 
> ...

 

Sorry! Should be package.use instead of package.keywords!

----------

