Saturday, August 24, 2013

Resolved:unable to bind listener to any port in the range 32000 to 32999


 I got this error when i tried to install e commerce software on raspberry pi.

Error : unable to bind listener to any port in the range 32000 to 32999. (Cannot assign requested address)

Java Service Wrapper Community Edition 32-bit 3.5.20
  Copyright (C) 1999-2013 Tanuki Software, Ltd. All Rights Reserved.
    http://wrapper.tanukisoftware.com
 unable to bind listener to any port in the range 32000 to 32999. (Cannot assign requested address)
<-- span="" stopped="" wrapper="">



Solution :

First check whether any other application is LISTENING on the port range which you have given by using below command

sudo netstat -an|less

output :

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:9091            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:50695           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:8009            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:9001            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:9002            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:9003            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:51413           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN

Make sure that the no other application is listening on ports from 32000 to 32999.If any then change your application min and max port in wrapper.conf file

wrapper.port=65534
wrapper.port.min=65530
wrapper.port.max=65535



Still if you face same error then add below line to wrapper.config file

wrapper.backend.type=PIPE

This configuration  allow you to avoid using sockets and use pipes instead to get around this problem.

"wrapper.backend.type=PIPE"  solved my problem



Tuesday, August 20, 2013

Raspberry Pi Quick Guide

Below are some basic commands which you need to know to PLAY with raspberry pi

How to install softwares/packages in raspberry pi ?
sudo apt-get install packagename

How to remove softwares/packages in raspberry pi ?
sudo apt-get --purge remove

How to update/upgrade raspberry pi

sudo apt-get update && sudo apt-get upgrade

How to go to GUI mode in raspberry pi ?
startx

How to give root access to pi ?
sudo su

How to see all packages installed in raspberry pi?
dpkg -l
How to change password/memory split /time in raspberry pi?
sudo raspi-config

How to see list of devices attached to raspberry pi?
df -h

How to see all services in raspberry pi ?
service  --status-all

How to stop any service in raspberry pi ?
service mysql stop

How to Disabe unwanted services in raspberry pi? 
update-rc.d  mysql disable
 
How to keep raspberry pi up to date? 
Source
    Install software needed to perform the update:
        pi@raspberrypi:~$ sudo apt-get install ca-certificates git-core binutils
    Download the script:
        pi@raspberrypi:~$ sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update
    Copy the script to /usr/local/bin:
        pi@raspberrypi:~$ sudo cp rpi-update /usr/local/bin/rpi-update
    Make the script executable:
        pi@raspberrypi:~$ sudo chmod +x /usr/local/bin/rpi-update
    Run the script:
        pi@raspberrypi:~$ sudo rpi-update
        In the future to check for updates, just execute this last step!

How to Change owner/Group in raspberry pi?
chown -R pi
chgrp  -R pi

How to see what all ports are bind in raspberry pi ?
sudo netstat -an|less

Saturday, March 9, 2013

How to Format Sd card to ext4?

In this tutorial i will explain  how to format SD card to EXT4.I came across this issue when my Raspberry Pi cant detect an SD card .I goggled it and here is a quick fix.
Before we format it to SD card i will explain why we should format it to EXT4.
  • SD cards which are formatted with  NTFS/FAT cant be recognized by Linux based systems.
  • Even if some Linux based OS can recognize it when you try to edit it you will get "permission denied " error even if your are "root" user.
Note : If you format your SD card with ext4 you cant access data present in it  from windows.

I used  Mini Tool Partition wizard Home edition 7 software to do this.

Click To download

GUI of partition wizard is self explanatory. Right click on your partition  ==>'create' then choose "ext4" from drop down of file s/m then "ok".Then Click on "Apply" on top left corner to start formatting. Once formatting is done place your SD card in linux s/m as you cant see that drive in windows.