NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Other Clients Old Stuff (legacy) NextPVR Enhanced Web Admin (NEWA) v
« Previous 1 … 25 26 27 28 29 … 47 Next »
Internal/External I don't get it.

 
  • 0 Vote(s) - 0 Average
Internal/External I don't get it.
fuzzweed
Offline

Posting Freak

Posts: 1,210
Threads: 200
Joined: May 2006
#11
2008-07-09, 07:36 AM
erm, it's not the webserver won't start on vista post in the survival sticky is it?
http://forums.gbpvr.com/showpost.php?p=2...ostcount=5
[SIZE="1"]Server: Win7 N | AMD Phenom II X4 3.2GHz | 4Gig RAM | Gigabyte GA-MA770-DS3 Mobo | 5TB+ HDDs | 2x BlackGold Twin HD DVB-T| ATI HD 5450 | Cambridge Audio DAC Magic
Client 1: OpenElec / XBMC | Dell GX280 P4 3.4GHz |2Gig RAM | ATI HD 5450 | SPDIF pass through
Client 2: OpenElec / XBMC | Dell GX280 P4 3.4GHz |2Gig RAM | ATI HD 5450 | C-MEDIA USB DAC
Android: Samsung Galaxy S2 GT-I9100 4.4.2 Cyanogenmod 11[/SIZE]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#12
2008-07-09, 07:49 AM
If it's not that, make sure that the service is running under the SYSTEM account and not a user account.
ElihuRozen
Offline

Senior Member

Massachusetts, USA
Posts: 514
Threads: 51
Joined: Apr 2006
#13
2008-07-13, 02:14 AM
Turn off the web server piece or stop the recording service & install some other prgram that will let you configure the port like a ftp or telnet server. Configure that server to use 7647. Then try to connect to the machine using the appropriate client configured to use that same port.

On second thought, I just wrote a small Java app that will let you test your connection to a machine & port. If I can figure out how to attach the class file I will attach it to this. Otherwise, here is the source that you can compile yourself:

Code:
import java.io.IOException;
import java.net.ConnectException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.logging.Logger;

public class CheckPort
{
//  Set the logger on for CheckPort to see debug messages
//  See .\lib\logging.properties in your Java installation for more info
    private static Logger logger = Logger.getLogger("CheckPort");

    public static boolean inUse(String sHost, String sPort) throws UnknownHostException, IOException
    {
        logger.entering("CheckPort", "inUse");
        String altHost = "";
        try
        {
            logger.finer("sPort = " + sPort );
            int nPort = 0;
            if ((sPort != null) && !sPort.equals("") && !sPort.equals("null"))
            {
                nPort = Integer.parseInt(sPort);
            }
            else
            {
                throw new IOException();
            }
            InetAddress iHost = InetAddress.getByName(sHost);
            altHost = iHost.getHostAddress();
            if (altHost.equals(sHost))
            {
                altHost = iHost.getHostName();
            }
            logger.finer("altHost = " + altHost);
            
            Socket socket = new Socket(iHost, nPort);
            logger.fine("Created socket");
            
            int localPort = socket.getLocalPort();
            if (localPort != -1)
            {
                logger.finer("socket is connected");
                System.out.println("Connected to " + sHost + " (" + altHost + ") at port: " + sPort);
                return true;
            }
            logger.finer("socket is not connected");
            System.out.println("Could not connect to " + sHost + " (" + altHost + ") at port: " + sPort);
            return false;
        } catch (ConnectException e)
        {
            logger.finer("not in use");
            System.out.println("Could not connect to " + sHost + " (" + altHost + ") at port: " + sPort);
            return false;
        } catch (UnknownHostException e)
        {
            logger.finer("UnknownHostException");
            throw new UnknownHostException();
        } catch (IOException e)
        {
            logger.finer("IOException");
            throw new IOException();
        }
    }
    
    public static void main (String[] args)
    {
        if (args.length != 2)
        {
            System.out.println("Invalid number of arguments\nFirst argument is host and second argument is port");
            System.exit(1);
        }
        try {
            inUse(args[0], args[1]);
        } catch (UnknownHostException e) {
            System.out.println("Unknown host (" + args[0] + ")");
        } catch (IOException e) {
            System.out.println("IO Error");
        }
    }
}

To run it, place the classfile in a directory on the client machine. In a Dos prompt, switch to that directory & run this:
java CheckPort {yourHost} 7647
where {yourHost} is replaced by your host name or IP address.

For example:
java CheckPort pvr-vista 7647
or
java CheckPort 192.168.1.39 7647


I just wrote & tested this, so if anyone wants to try it out & let me know of any problems or changes that are needed, that would be great.
ElihuRozen
Offline

Senior Member

Massachusetts, USA
Posts: 514
Threads: 51
Joined: Apr 2006
#14
2008-07-13, 04:05 AM
Now you can optionally pass in a URL instead of the host & port. It will find the host & port in the URL and use those values. For standard schemes like http, ftp, mms, https, etc., it will use the standard port number if one is not found in the URL. See the code below for the list of what I am using. I even support ignoring the username and password in the URL when specified with the @.

Examples:

java CheckPort http://dvr-vista:7647/gbpvr/Login.aspx
Can you connect to your EWA?

java CheckPort http://forums.nextpvr.com/showthread.php?t=36374
Can you connect to the GBPVR forums?

java CheckPort telnet://root@192.168.2.102
Can you connect to your mvp running mvpmc?

Maybe someday I'll rewrite this as a Windows app with a user interface.


Code:
import java.io.IOException;
import java.net.ConnectException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.logging.Logger;

public class CheckPort
{
//  Set the logger on for CheckPort to see debug messages
//  See .\lib\logging.properties in your Java installation for more info
    private static Logger logger = Logger.getLogger("CheckPort");

    public static boolean inUse(String sHost, String sPort) throws UnknownHostException, IOException
    {
        logger.entering("CheckPort", "inUse");
        String altHost = "";
        try
        {
            logger.finer("sPort = " + sPort );
            int nPort = 0;
            if ((sPort != null) && !sPort.equals("") && !sPort.equals("null"))
            {
                nPort = Integer.parseInt(sPort);
            }
            else
            {
                throw new IOException();
            }
            InetAddress iHost = InetAddress.getByName(sHost);
            altHost = iHost.getHostAddress();
            if (altHost.equals(sHost))
            {
                altHost = iHost.getHostName();
            }
            logger.finer("altHost = " + altHost);
            
            Socket socket = new Socket(iHost, nPort);
            logger.fine("Created socket");
            
            int localPort = socket.getLocalPort();
            if (localPort != -1)
            {
                logger.finer("socket is connected");
                System.out.println("Connected to " + sHost + " (" + altHost + ") at port: " + sPort);
                return true;
            }
            logger.finer("socket is not connected");
            System.out.println("Could not connect to " + sHost + " (" + altHost + ") at port: " + sPort);
            return false;
        } catch (ConnectException e)
        {
            logger.finer("not in use");
            System.out.println("Could not connect to " + sHost + " (" + altHost + ") at port: " + sPort);
            return false;
        } catch (UnknownHostException e)
        {
            logger.finer("UnknownHostException");
            throw new UnknownHostException();
        } catch (IOException e)
        {
            logger.finer("IOException");
            throw new IOException();
        }
    }
    
    public static void main (String[] args)
    {
        String host = "";
        String port = "";
        if (args.length == 2)
        {
            logger.finest("Found two arguments");
            host = args[0];
            port = args[1];
        }
        else if (args.length == 1)
        {
            logger.finest("Found one argument");
            String url = args[0];
            int marker1 = url.indexOf("://");
            if (marker1 > 0)
            {
                if (url.indexOf("@") >= 0)
                {
                    boolean use = true;
                    String tempUrl = "";
                    for (int i = 0; i < url.length(); i++)
                    {
                        if (i < (marker1 + 3))
                        {
                            tempUrl += url.charAt(i);
                        }
                        else if (i == (marker1 + 3))
                        {
                            use = false;
                        }
                        else if (url.charAt(i) == '@')
                        {
                            use = true;
                        }
                        else if (use)
                        {
                            tempUrl += url.charAt(i);
                        }
                    }
                    url = tempUrl;
                    logger.finest("tempUrl = " + tempUrl);
                }
                String [] pieces = url.split(":");
                String temp = pieces[1].substring(2);
                int marker2 = url.indexOf(":", marker1 + 3);
                if (marker2 > 0)
                {
                    host = temp;
                    temp = pieces[2];
                    pieces = temp.split("/");
                    port = pieces[0];
                }
                else
                {
                    String type = pieces[0];
                    logger.finest("type = " + type);
                    pieces = temp.split("/");
                    host = pieces[0];
                    if (type.equalsIgnoreCase("http"))
                    {
                        port = "80";
                    }
                    else if (type.equalsIgnoreCase("ftp"))
                    {
                        port = "21";
                    }
                    else if (type.equalsIgnoreCase("telnet"))
                    {
                        port = "23";
                    }
                    else if (type.equalsIgnoreCase("https"))
                    {
                        port = "443";
                    }
                    else if (type.equalsIgnoreCase("nntp"))
                    {
                        port = "119";
                    }
                    else if (type.equalsIgnoreCase("mms"))
                    {
                        port = "1755";
                    }
                    else if (type.equalsIgnoreCase("ssh"))
                    {
                        port = "22";
                    }
                    else if (type.equalsIgnoreCase("smb"))
                    {
                        port = "445";
                    }
                }
            }
           }
        if (host.length() == 0 || port.length() == 0)
        {
            System.out.println("Invalid number of arguments\nFirst argument is host and second argument is port or only argument is URL with optional embedded port number");
            System.exit(1);
        }
        
        try {
            inUse(host, port);
        } catch (UnknownHostException e) {
            System.out.println("Unknown host (" + host + ")");
        } catch (IOException e) {
            System.out.println("IO Error");
        }
    }
}
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  External Streaming chairmanfaust 9 5,036 2019-05-08, 04:35 PM
Last Post: things4u2get
  All content missing on external network lazereagle 3 3,283 2018-03-21, 05:40 PM
Last Post: mvallevand
  Internal Server Error SilverTiger 5 3,332 2016-07-24, 04:03 PM
Last Post: UncleJohnsBand
  How to View Live with External Player instead of VLC plugin? yardern 8 6,701 2013-02-23, 05:47 PM
Last Post: yardern
  Issue getting "external" VLC to work phmt 4 3,783 2012-09-28, 10:23 PM
Last Post: phmt
  doesn`t work with external recorder ercuem 4 2,652 2006-11-12, 01:08 AM
Last Post: ercuem

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode