DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-06-15 02:43:31

DNS-323 Talker
Member
Registered: 2007-05-21
Posts: 245

Lighttpd problem...

I've got Fonz's fun plug with lighttpd installed and confired to a specific port in the lighttpd.conf file, forwarded that port in my router, and it was working fine when  pointing to a simple place-holder index.htm page that I created.

I replaced that index.htm page with another one, and now I can't get to the page any more...is there a need to reboot the DNS-323 to reset some pointer or another to the file?  I haven't changed anything in the lighttpd.conf file except for the port number....can't figure out why it was working, and now isn't.

Any ideas/trouble-shooting advice appreciated.  I've tried multiple versions of the index.htm file, including putting the original back, and nothing is working...

Thanks!


DNS-323 w/two Seagate 500 GB RAID1
Fonz's Fun_Plug- Don't DNS-323 without it!

Offline

 

#2 2007-06-15 10:31:20

shadowandy
Member
From: Singapore
Registered: 2007-05-26
Posts: 89
Website

Re: Lighttpd problem...

what port did you change to? did it happen to clash with the admin page port number (TCP 80)? Is lighttpd running in the first place (use ps to check).


SpeedStream 5660, DIR-655,  DNS-323, MLDonkey (DNS-323), DNS-343, DIR-300 Tips & Hacks

Offline

 

#3 2007-06-15 17:19:41

DNS-323 Talker
Member
Registered: 2007-05-21
Posts: 245

Re: Lighttpd problem...

Thanks, Shadowandy...I think my message above was confusing in retrospect.  I changed the port number a while back, not recently.  I didn't use 80.

I'll check and ensure lighttpd is running...good idea. 

/# ps wrote:

BusyBox v1.5.0 (2007-05-06 16:42:17 CEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ # ps -l
PID   USER     COMMAND
    1 root     init
    2 root     [ksoftirqd/0]
    3 root     [events/0]
    4 root     [khelper]
    5 root     [kthread]
   11 root     [kblockd/0]
   14 root     [khubd]
   50 root     [pdflush]
   51 root     [pdflush]
   53 root     [aio/0]
   52 root     [kswapd0]
  190 root     [scsi_eh_0]
  191 root     [scsi_eh_1]
  192 root     [scsi_eh_2]
  193 root     [scsi_eh_3]
  204 root     [mtdblockd]
  219 root     [kcryptd/0]
  220 root     [kmirrord/0]
  248 root     [loop0]
  791 root     smbd -D
  793 root     nmbd -D
  860 root     [md0_raid1]
  935 root     chkbutton
  951 root     /web/webs
  959 root     fancontrol
  975 root     op_server 3 3 3
  989 root     -sh
1028 root     lpd Waiting
1137 root     /mnt/HD_a2/fun_plug.d/bin/lighttpd -f /mnt/HD_a2/fun_plug.d/etc/lighttpd.conf
1177 root     /mnt/HD_a2/fun_plug.d/bin/telnetd -l /mnt/HD_a2/fun_plug.d/bin/sh
1226 root     [scsi_eh_4]
1227 root     [usb-storage]
15765 root     ftpd: accepting connections on port ####
12878 root     crond
12893 root     /sys/custom/upnp/upnp 0 D-Link Corporation http://www.redsonic.com D-Link Net
30935 root     atd
25673 nobody   mt-daapd
25674 nobody   mt-daapd
25680 root     mt-daapd
25681 root     mt-daapd
25692 root     mt-daapd
22105 nobody   smbd -D
3507 root     smbd -D
7177 root     mt-daapd
7173 root     smbd -D
10555 root     smbd -D
21538 root     /mnt/HD_a2/fun_plug.d/bin/sh

I replaced the FTP port number w/"#" signs above.

So it looks like lighttpd is running...see anything amiss?

BTW, what's this line doing?!

/# ps wrote:

12893 root     /sys/custom/upnp/upnp 0 D-Link Corporation http://www.redsonic.com D-Link Net

If I try to go to www.redsonic.com, I get a Network Solutions page with the following:

Network Solutions page wrote:

redsonic.com expired on 05/18/2007 and is pending renewal or deletion.

Last edited by DNS-323 Talker (2007-06-15 17:32:01)


DNS-323 w/two Seagate 500 GB RAID1
Fonz's Fun_Plug- Don't DNS-323 without it!

Offline

 

#4 2007-06-15 18:04:05

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Lighttpd problem...

There's a log file somewhere (/mnt/HD_a2/www/logs, I think). Have a look what's inside.
Use "netstat -tln" to check if a port is "listening" or not (e.g. check when lighty is running and when it's not running).

Offline

 

#5 2007-06-15 18:21:05

DNS-323 Talker
Member
Registered: 2007-05-21
Posts: 245

Re: Lighttpd problem...

Thanks, Fonz.  Yes, the port I forwarded in the router for Lighttpd is listed as active.  Then I killed lighttpd and ran netstat again and the lighttpd port was missing from the list.  So it seems like it is listening to the port when lighttpd is running. 

BTW...should I have this many ports listening?  I have fun-plug installed, and FTP and Lighttpd runnning, and am using telnet. 

/ # netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:###             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:####            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:####            0.0.0.0:*               LISTEN (this is my FTP port, expected that)
tcp        0      0 0.0.0.0:###             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:##              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:#####           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:##              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:####            0.0.0.0:*               LISTEN (this is my lighttpd port)
tcp        0      0 0.0.0.0:###             0.0.0.0:*               LISTEN


DNS-323 w/two Seagate 500 GB RAID1
Fonz's Fun_Plug- Don't DNS-323 without it!

Offline

 

#6 2007-06-15 18:36:22

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Lighttpd problem...

Then it's running. Have a look at the logs, both error and access logs.
Also check permissions of the index file (chmod 0644 index.html, if in doubt)

Offline

 

#7 2007-06-16 06:20:44

DNS-323 Talker
Member
Registered: 2007-05-21
Posts: 245

Re: Lighttpd problem...

I checked permissions, and the file was set to chmod 700.  I changed it to 744.  But still unable to access it via http. 

Error log shows a lot of stops/starts...here's a section of it below.  This section at the end seems odd...why would the service stop for over an hour this morning? 

2007-06-15 07:18:18: (log.c.135) server stopped
2007-06-15 08:24:18: (log.c.75) server started

error log wrote:

2007-05-26 08:27:25: (log.c.135) server stopped
2007-05-26 08:27:38: (log.c.75) server started
2007-05-26 08:29:49: (log.c.75) server started
2007-05-26 08:30:05: (log.c.135) server stopped
2007-05-26 08:30:05: (log.c.135) server stopped
2007-05-26 08:30:22: (log.c.75) server started
2007-05-26 09:36:35: (log.c.135) server stopped
2007-05-26 10:36:12: (log.c.75) server started
2007-05-26 17:47:35: (log.c.135) server stopped
2007-05-26 17:47:07: (log.c.75) server started
2007-05-27 01:10:56: (log.c.75) server started
2007-06-15 07:18:18: (log.c.135) server stopped
2007-06-15 08:24:18: (log.c.75) server started

The access log only shows accesses from 23 May through May 30th...that doesn't make sense...why would it show no access in June?


DNS-323 w/two Seagate 500 GB RAID1
Fonz's Fun_Plug- Don't DNS-323 without it!

Offline

 

#8 2007-06-18 20:44:50

DNS-323 Talker
Member
Registered: 2007-05-21
Posts: 245

Re: Lighttpd problem...

Well, I solved teh problem...I deleted and then reinstated the http port forwarding on my router, and it works again.  Not sure how it happened or what happened, but for some reason the port forwarding I had set up had stopped working, even though it was listed properly on the port forwarding page...

Hopefully it will keep working....


DNS-323 w/two Seagate 500 GB RAID1
Fonz's Fun_Plug- Don't DNS-323 without it!

Offline

 

#9 2007-07-25 00:46:10

MiK
Member
From: Sweden
Registered: 2006-12-17
Posts: 102

Re: Lighttpd problem...

Another problem; what do I do to get rid of theese error messages when I try to UL "large" pictures to Gallery1?

Code:

2007-07-24 15:36:47: (connections.c.1080) denying upload as opening to temp-file for upload failed: /var/tmp/lighttpd-upload-U7LbUq No such file or directory

/MiK

Offline

 

#10 2007-07-25 15:19:35

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Lighttpd problem...

It seems lighttpd wants to store large uploads in /var/tmp which does not exist on the DNS. Try the following workaround until I find out how to tell lighttpd to use a different temp directory:

Code:

mkdir -p /mnt/HD_a2/tmp
cd /var
ln -s /mnt/HD_a2/tmp

This should make lighttpd store uploaded files on disk.

Offline

 

#11 2007-07-25 16:34:33

MiK
Member
From: Sweden
Registered: 2006-12-17
Posts: 102

Re: Lighttpd problem...

Thanks, that worked smile

Offline

 

#12 2007-07-25 16:38:44

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Lighttpd problem...

Just found out that there's a configuration option for this. Default is obviously:

Code:

server.upload-dirs = ( "/var/tmp" )

Adding this to the config (with a different path, of course) is probably the cleaner solution.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB