Client Server - IP COnnection

More advanced topics discussed.

Moderators: Susan Smith, admin, Gabriel

gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Client Server - IP COnnection

Post by gtisdale »

I have client server working now on a Windows Vista machine using LOCALHOST as the IP address for connection. That works well so far.

I then accessed the server machine from another workstation on my home network using the HOST=XXX.XXX.XXX.XXX in the BR_PARMS.txt file. This also is working fine, except when my router changes the IP address of the server, which it does from time to time, and I then have to run upstairs and find out what the current IP address is (I know that there is a way to make it a fixed IP, but I forget at the moment how to do that.)

I now have added client server to my office network, which is a Small Business Back Offie Server 2003. So far no luck. I have done the install just like I did on the first Vista machine. I can see that BRLISTENER is running as a service on the server, but I can not get a connection from the outside using the external IP address for my server. I am not using a VPN to connect to the server, although I could do this and then use an internal IP address for the connection. My goal would be to use the external address.

Any suggestions?

FNGeorge
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Post by bluesfannoz »

Depending upon what service pack level you have installed on your SBS 2003 server, Windows firewall may have been installed and turned on. If so I would turn it off. It would be listed in your control panel on the server.

If turning it off fixes it. Then I would add a rule to allow communication on port 8555. Then turn it back on and see if it works with the Firewall still turned on.
Steve Koger
Computer Specialist
SEKESC-MACS Division
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

George,

You have to configure your router. In the router, you have to assign a hard coded ip address to the server. Some routers can do this, look in the DHCP settings for Reserved Addresses. If your router doesn't have this setting, don't worry.. all you have to do is hard code your server to not use DHCP. You do this by simply specifying an IP address in the TCP/IP properties of the network connection settings on the server you're working with.

The second step is to configure port forwarding. In the router you need to set up port forwarding so that any incoming traffic on the port you're using for Client Server (8555), to go to the internal ip address of the server.

Now, you should be able to access client server from anywhere on the internet.

There's one other step I recommend. Most ISPs will change your external IP address on you at random times. So to get around this, you want to get a DNS name. I use DynDNS.Com which has free dns names. You sign up for an account, you configure DynDNS to point to your external ip address, and you configure your router to automatically talk to DynDNS.com and send them the new IP address whenever it detects that its IP address has changed.

Now you can get to your client server from any computer of the internet regardless of weather or not your office's external IP address changes.

Call me if you have questions.. and when I make it to Boston, if you still don't have it working, I'd be happy to help.

gabriel
GomezL
Posts: 258
Joined: Wed Apr 29, 2009 5:51 am
Contact:

Post by GomezL »

CLS provides the following web site as a public service

http://www.collectionsoftware.com/asp

The web page will return your "Public IP Address"
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Post by bluesfannoz »

I see now that I completely missed the part about wanting to be able to see it from outside your network. I am assuming that you have first made sure you can see it from inside the office network. That you must do before you start trying to connect to it from the outside.

The as stated by Gabriel. Routes will need to be setup in your router that basically do NAT translation that when the Router gets a request on port 8555, that the request is then passed to your server IP address on that same 8555 port. Most routers have this feature and wizard that can be used to set it up.
Steve Koger
Computer Specialist
SEKESC-MACS Division
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

I have CS working now on my SMB 2003 Server on the external IP address. I had to go into server management on the Server and use the wizard to Enable Windows Firewall, that let me access the settings for the firewall that was already enabled. Becasi SMB 2003 does so many things you can not go to the Control panel to make changes to the firewall, you need to go through Server mangement. I needed to change the way that I set my ENV$("PD") (my pointer to the main BR directory) The way that I had been setting it was not compatable. I found that puting a SETENV statement in the BRCONFIG.sys fifle immediately after my drive statements was the best way to assure that I had the pointer point to the correct location. From my previous tests I found that I could only set one ENV$ in the BRCONFIG.sys file in BR4.2 (I have not tried setting more in BR4.3 since 1 is all I need at this point.

Now the hard part comes of tring my programs in this environment. This is hard becasue I use BR to interface with a lot of other programs Word, Atlantis, Excel, and ASccess absed GL Package Adobe Standard etc. For these I can no longer create a file in the temp folder and make a simple system call to access the created file. I need to move the temp file to the client machine in the client's temp folder, wherever that may be, then call the non-BR program from the client's machine to interact with the created file in the client temp directory,and, when all done I need to mpve a copy of the final file back to the server.

I've done this for one of my programs, I just need to work on an efficient way of doing it for other programs (saome of which are ancient).

Thank you all for the help, I'll keep yuou posted

FNGeorge
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Post by bluesfannoz »

If they are small files. You could create them on the client directly.

open #xxx, "name=@:filename" works as long as the user has permission to write in the folder.

I would use this for small display files. I do not believe it works on indexed files.
Steve Koger
Computer Specialist
SEKESC-MACS Division
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

I'm glad you got it working. use functions to copy the file to the client, run the program, and copy the results back to the server when done. I'm sure you're already doing that. :-) they don't call you fngeorge for nothing!
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Client Server - DIR on Server

Post by gtisdale »

Is there a way to get a DIR command to work on the Server in Client Server?

I can not use the standard DIR within BR because it trims long files names and the file date is not always in the same format, but I have found the system DIR command to work perfectly.

What I am trying to do is write a text file to the disk using the DIR command

Code: Select all

EXECUTE "sys -M dir audatc\*.* >tmp"&SESSION$
I then read the text file, load it into a grid and process selected files. I need the full long file name to use as a description and to call the file for processing. The standard dir command processes the client side only and so is useless for this case.

If there is a way to have the SYS command work on the server that is what I need.

Thanks for the help.

FNGeorge
GomezL
Posts: 258
Joined: Wed Apr 29, 2009 5:51 am
Contact:

Post by GomezL »

That is one of the nice things about client server, you can shell to the server and do all kinds of nifty things!

The SYSTEM command has two different parameters:

-s Server Shell Call (this is the default for Unix). If -s is omitted, on Windows, then this shell call is performed on the client.
-@ Client Shell Call (default for Windows). If -@ is omitted, on Unix - shell call is performed on the server.
(search path not implemented on client)

Simply change your code as follows:

Code: Select all

EXECUTE "sys -s -m dir audatc\*.* >tmp"&SESSION$ 
gordon
Posts: 358
Joined: Fri Apr 24, 2009 6:02 pm

Post by gordon »

Have you tried the -B flag?

This displays only long filenames.
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

Thank you Luis, I had missed that in the documentation. I'll use -@ and -S to accomplish this (I had found that I could CONFIG the default and did do that to switch temporarily to SERVER, but -S is much better option.)

Gordon: Thanks for that suggestion, It does provide the full file name without truncation, my application though needs the date and time as well however, so I still need to do the system DIR. The -S and -@ solve the problem however.

Thank you both.

FNGeorge
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Post by bluesfannoz »

I will take the time to throw out there that it would be extremely useful to provide directory info into an array within BR. Even more helpful would be to provide a facility to do so on any folder I choose, not just the one I am in, and yes providing extended info about those files like size, date, time, etc would be great!

My 2 cents
Steve Koger
Computer Specialist
SEKESC-MACS Division
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Post by Susan Smith »

I'm right there with you Steve! I have a lot of uses for such a feature where you don't have to roll your own functions to process DIR information by dumping it to a text file and then parsing it yourself!

And I'd love to add that if it could make use of wildcards (DIR APD*W.*), it would be even more useful. Then I supposed the Client/Server users might have some more suggestions about client vs server function of such a feature.

-- Susan
GomezL
Posts: 258
Joined: Wed Apr 29, 2009 5:51 am
Contact:

Post by GomezL »

I have a library function that I use

Code: Select all

34282   DEF LIBRARY Fnget_Dir(Dir_Path$*256,Mat Dirs$,Mat Files$,Mat Size,Mat Dait$;Long$)
Dir_PATH$ is the directory I am querying (Allows wild cards and paths).

MAT DIRS$ returns the subfolders included in the "DIR_PATH".
MAT FILES$ returns the FILES included in the "DIR_PATH".
MAT SIZE returns the file size for files included in the "DIR_PATH".
MAT DAIT$ returns the Dates of the Files included in the Dir Path.
Long$ is a flag for the "-b" option to return the "Long Name".

It would be great to support Time as well.

Additional items that would be nice to know.

Attributes
Owner
Created/Modified/Accessed Date
Post Reply