Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'

Posted by SnapCount 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
October 31, 2015 03:09AM
pi@mypi ~ $ sudo /etc/init.d/piratebox start
[....] Starting script piratebox :
Generating hosts file ....
Generating dnsmasq.conf .....
Generating Environment-config for lighttpd .....
Empty tmp folder
rm: cannot remove `/opt/piratebox/tmp/': Is a directory
Copy over design files
[ ok ] Starting hostap... :.
[....] Setting up wlan:Bringing up wifi interface wlan0
Setting up wlan0
[FAIL] Starting dnsmasq... : failed!
[ ok ] Starting droopy...:.
Generated HTML-Shoutbox File.
[....] Starting lighttpd...:2015-10-30 21:49:13: (network.c.405) can't bind to port: 80 Address already in use
(warning).
pi@mypi ~ $ FUCK!


i


I received this error on my final step of my first ALMOST successful setup of a Pi(rate)Box. Iv literall been either working on that damn Pi or Im figuring out how to get the damn wifi dongle to register, all over the past 38 hours... no sleep lolz. Anyhow got that done with at about hour 28, then proceeded to use the Diy manual install guide on the site, and I received this error as you can see... PLEASE if you can help with ANYTHING let me know, ill be greatly in your debt!
Thanks,
-SnapCount
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 01, 2015 01:32AM
I run my piratebox on a TL-MR3040 so I can't say for certain on a Pi, but it looks like you have another service running that's listening on port 80:

[....] Starting lighttpd...:2015-10-30 21:49:13: (network.c.405) can't bind to port: 80 Address already in use
(warning).


As root run #netstat -tulpn to see what's sitting on port 80:

root@BetaPi:# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 5826/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6702/apache2
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 8132/sshd

In my example apache2 is currently listening to port 80. Find out what running on port 80 on your pi and use #service <PROGRAM NAME> stop to stop it and free up the port. That may be what's causing the dnsmasq failure too. Once the port is free you can try to run* again.

To keep the offending program from starting up when the pi restarts you can use #update-rc.d <SERVICE> disable to avoid conflicts the next time you reboot.



Edited 1 time(s). Last edit at 11/01/2015 10:01PM by ilgrande.
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 01, 2015 06:35PM
So i found using


$netstat -tulpn | grep :80


shows this


"tcp 0 0.0.0.0:80 0.0.0.0:* LISTEN 2616/lighttpd"

so this may be a problem right? isnt "lighttpd" a service I NEED running to use Piratebox? OR can I simply stop the service and boot up the PirateBox finally? I'm lost at this point, thanks for your reply, hope to hear back again =D
-SnapCount



Edited 2 time(s). Last edit at 11/01/2015 06:57PM by SnapCount.
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 01, 2015 10:05PM
Check if lighttpd is currently running with:
$ service lighttpd status

If it's running, use:
$ sudo service lighttpd stop

Afte you've confirmed lighttpd is stopped, try to start piratebox again:
$ sudo /etc/init.d/piratebox start

If you're still getting errors post the output.
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 02, 2015 01:36PM
UGH this makes no sense to me, here is what I got for outputs;

pi@mypi ~ $ service lighttpd status
[FAIL] lighttpd is not running ... failed!
pi@mypi ~ $ sudo /etc/init.d/piratebox start
[....] Starting script piratebox :
Generating hosts file ....
Generating dnsmasq.conf .....
Generating Environment-config for lighttpd .....
Empty tmp folder
rm: cannot remove `/opt/piratebox/tmp/': Is a directory
Copy over design files
[ ok ] Starting hostap... :.
[....] Setting up wlan:Bringing up wifi interface wlan0
Setting up wlan0
[FAIL] Starting dnsmasq... : failed!
[ ok ] Starting droopy...:.
Generated HTML-Shoutbox File.
[....] Starting lighttpd...:2015-11-02 07:25:18: (network.c.405) can't bind to port: 80 Address already in use
(warning).
pi@mypi ~ $ sudo netstat -tulpn | grep :80
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 2579/python
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2616/lighttpd


So what do you think I can do here?
-SnapCount
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 02, 2015 11:26PM
Try $ sudo kill -9 2616 to kill the lighttpd process and run again. If your lighthttpd is still giving you issues check out the lighttpd log to see if you can get more descriptive information on why it won't start (you can use $ locate lighttpd.log to help)

Failing that, it might be more worth your time to re-download and attempt a fresh install. Sometimes it's just easier that way smiling smiley
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 03, 2015 07:49PM
right on brother, you got that part fixed but im still getting this error recurring on attepts to start up the box,

pi@mypi ~ $ sudo /etc/init.d/piratebox start
[....] Starting script piratebox :
Generating hosts file ....
Generating dnsmasq.conf .....
Generating Environment-config for lighttpd .....
Empty tmp folder
rm: cannot remove `/opt/piratebox/tmp/': Is a directory
Copy over design files
[ ok ] Starting hostap... :.
[....] Setting up wlan:Bringing up wifi interface wlan0
Setting up wlan0
[FAIL] Starting dnsmasq... : failed!
[ ok ] Starting droopy...:.
Generated HTML-Shoutbox File.
[ ok ] Starting lighttpd...:.
pi@mypi ~ $


so its something with the dnsmasq starting. If i knew what this even was for i wouldnt still be bothering you for insight, but i need it again lol

Thanks for the awesome help by the way,
-SnapCount
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 03, 2015 07:52PM
SWEET that fixes 1 part of it now its just something with the dnsmasq

pi@mypi ~ $ sudo /etc/init.d/piratebox start
[....] Starting script piratebox :
Generating hosts file ....
Generating dnsmasq.conf .....
Generating Environment-config for lighttpd .....
Empty tmp folder
rm: cannot remove `/opt/piratebox/tmp/': Is a directory
Copy over design files
[ ok ] Starting hostap... :.
[....] Setting up wlan:Bringing up wifi interface wlan0
Setting up wlan0
[FAIL] Starting dnsmasq... : failed!
[ ok ] Starting droopy...:.
Generated HTML-Shoutbox File.
[ ok ] Starting lighttpd...:.
pi@mypi ~ $ pi@mypi ~ $


any insight on this matter? lol sorry for the constant bother, but your really helpin out alot here =D

thanks,

SnapCount
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 03, 2015 08:33PM
So as far as i can see is "dnsmasq" is addressed in /opt/piratebox/conf/piratebox.conf file. Should it be configured different from default? this pi , omfg.... anyhow thanks let me know,
-SnapCount
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 03, 2015 10:33PM
I wouldn't think that you'd have to change any conf defaults to start, is dnsmasq running already?

Try netstat -tulpn again to see if dnsmasq is listening on a port. If it is, use $ sudo /etc/init.d/dnsmasq stop to stop it. If that fails you can use $ sudo kill -9 to kill the process (same as lighttpd) previously. From there try to start piratebox again.
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 04, 2015 07:13PM
Well i took your other advice as nothing is working out well. I reinstalled it (piratebox) with a "Wifi Compatible" Edimax dongle, as prior I was using a generic one which still works but requires configuration to work right, thus interfering with the network/interfaces file setup used in the install instructions.

Anyhow now I installed it fully with 0 errors, my question is now, whats next? there is no new PirateBox connection open in WiFi to join... lol is this a hopeless endeavor for me? Cannot connect in SSH via 192.168.77.1, or 192.168.1.1
-SnapCount


Edit:

K, "ssh root@mypi" got me to the root login screen yet i have no clue the password is. The one I setup in the initial raspi-config setup step, doesnt work, the one i set in the config file where you set your secret key and stuff, well that one doesnt work either,

Now im locked out on 2 TP Links, mr3040, me 3020, and a rasperry pi 2b.

WTF Am I doing wrong here,

ANY insight would be great,
-SnapCount


edit:
I found that i can log into the pirate box on the raspberry pi itself using a monitor 192.168.77.1 to access. But its still not broadcasting a signal. Also can connect to "ssh root@myrpi" and it asks for a password , but what is this password? we never set one up in install ... did steps for the noob crows, like myself, get left out?

this is the instructions i followed

http://forum.piratebox.cc/read.php?7,14544 also found here: https://piratebox.cc/raspberry_pi:diy:manual

-SnapCount



Edited 2 time(s). Last edit at 11/04/2015 10:02PM by SnapCount.
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 04, 2015 08:06PM
OK figured out how to log in ssh, simply

ssh root@mypi

then it asks for root, now what in the fu#@ is it? is it the password i set at the start during the initial raspi-config panal setup stage? which is also the pw in the config file next to admins password, which is 1 line atop of the line with your secret key.

Like im locked out now on a MR3020, MR3040, and a Rasperry Pi 2B. Cannot log into any of them with the SET PASSWORD!

im loosing it, any insight would be great,
-SnapCount
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 05, 2015 02:59AM
Per [piratebox.cc] password is root. Default pi password is raspberry, have you tried that?

Not really sure about that one, you'd have to review your docs or check the forums. Like I said, I run my box on openwrt so unfortunately I don't have first hand experience with installation on a pi, just general linux knowledge.
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 05, 2015 05:24AM
It seems on archlinux they changed the default password combination. So if you built your RPi image from scratch with a newer archlinux image:
Quote

Use the serial console or SSH to the IP address given to the board by your router.

Login as the default user alarm with the password alarm.
The default root password is root.
[archlinuxarm.org] , you might need to use the default user and then "su" to switch to user "root"


This is only my signature.
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
November 05, 2015 01:11PM
@ ilgrande

Yes i have tried the default root password for user "pi" login: "raspberry" to still be locked out...


@ Mathias

I installed it on Raspbian Weezy as per the instructions:

https://piratebox.cc/raspberry_pi:diy:manual

thanks for the replys, still locked out and am dumbfounded atm
-SnapCount
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
January 14, 2016 02:38AM
you can change root password if you log in as pi and $sudo passwd root

On other fronts, I too have set this up on a raspberry pi zero and have had no luck getting dnsmasq to start correctly or hand out IPs. The AP is broadcasting, but no IPs are assigned.

Edit: Fixed it

sudo nano /etc/dnsmasq.conf

# Uncomment this to enable the integrated DHCP server, you need
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.

next line change to:
dhcp-range=192.168.77.10,192.168.77.150,12h

sudo reboot



Edited 1 time(s). Last edit at 01/14/2016 02:50AM by TheExpertNoob.
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
January 14, 2016 06:38AM
I'm not sure if that REALLY helps, man.

You have to disable the default dnsmasq shipped with Debian!! If not nothing will work correctly, like the catch-all DNS request.


This is only my signature.
Re: Pi(rate)Box [ERROR ONLY ON THE LAST STEP OF INSTALL!!!] - 'Im cursed'
January 14, 2016 09:59AM
I was able to comment out the configuration line above dhcp that delt with DNS and the catch-all seemed to work. I agree, a Debian setup is very broken.