[Solved] Multi-terminal / Message Server woes?

Hmm… @emre, what do I need to do to make Terminals aware that a Workperiod has been opened or closed?

My setup uses the Start Workperiod and End Workperiod Actions.

On the main server Terminal, when I start or end a WP, the clients are not aware of this change…

The Nav Screen POS Tile does not update to reflect {SETTING:ISCURRENTWORKPERIODOPEN}, and it’s operation (clicking on it) does not behave as expected.

For example, if the WP was open and I close it on the Server, I can still click on the POS button and start creating a Ticket.

Vice-versa, if the WP was closed and I open it on the Server, when I click on the POS button on the Client, it does not respond (it thinks the WP is still closed).

Thanks for reporting. It will work fine on next update (.56).

2 Likes

Workperiod update issue Confirmed Fixed in 5.1.56 … thanks again @emre!

Ok, am strugling with firewall.
Diasable firewall and all works ok.
Have added the rules but must be missing something;

Sorry. seem to have got it, didnt specify a TCP port for SQL…

Hi all,

I’m a new Samba user and so far it’s been fun learning the different functionality of the software.

I have one issue with the message server, where the server terminal’s table button colour is updated after the the client terminal made the order but the client terminal’s colour isn’t update when the server makes the order. Does anyone have any idea what might have caused this?

@QMcKay thanks for the detailed recap write-up on the server/client setup.

You don’t have message server setup properly, that’s the reason your entity (table) state is not updating properly across terminals. Double check again the setup above, including your firewall setup. If you are using a third party firewall (not Windows built in) you will have to also make changes to that.

1 Like

One more stumbling block that I think could affect connectivity…

Check the Network Profile Settings for your current connection for both the Server and Client machines. They should all be set to Home/Work/Private. If they are set to Public on any of your machines, then you need to change that…

#Network Profile Settings

##Windows 10 / 8

##Windows 7

##Change Network Profile Windows 10 / 8

  • click on Network Icon at the lower-right of your screen near the Clock.
  • click Network Settings
  • click Wi-Fi or Ethernet (if you have a wired network)
  • click Manage Known Networks
  • select the Network you want to change and click Properties
  • change the setting for “Make this PC discoverable
  • On : Private
  • Off : Public

##Change Network Profile Windows 7

  • click on Network Icon at the lower-right of your screen near the Clock.
  • click Open Network and Sharing Center
  • click on the blue link below your Network
  • select Work Network
  • click Close

###Reference:


#Firewall

The easiest thing to do to check if you have a Firewall problem is to simply disable the Firewall and see if your State Updates work in SambaPOS. If it works when the Firewall is disabled, then you know positively that your Firewall is blocking communication.

Here is my latest version of the Powershell script - the last 3 lines are the important ones that will set up the Rules for the ports …

##fwrules.ps1###

function getRule {
    param(
        [string] $name
    )
    $fw = Get-NetFirewallRule -DisplayName "$name" -ErrorAction:SilentlyContinue
    if ($fw) {
        return [bool]$true
    } else {
        return [bool]$false
    }
}
function setRule {
    param(
        [string] $name,
        [string] $port,
	[string] $protocol,
	[string] $profile
    )
    Set-NetFirewallRule -DisplayName "$name" -Action "Allow" -Direction "Inbound" -Enabled "True" -LocalPort "$port" -Profile "$profile" -Protocol "$protocol" -Verbose
}

function addRule {
    param(
        [string] $group,
        [string] $name,
        [string] $port,
	[string] $protocol,
	[string] $profile
    )

    $fw = getRule("$name")
    if ($fw) {
	Write-Host -ForegroundColor:Black -BackgroundColor:Magenta "`r`n*** Rule already exists, Modifying Rule: '$name' ..."
	setRule -name:"$name" -port:"$port" -profile:"$profile" -protocol:"$protocol" -Action "Allow" -Direction "Inbound" -Enabled "True"
    } else {
	Write-Host -ForegroundColor:Black -BackgroundColor:Green "`r`n****** Adding Rule: '$name' ..."
        New-NetFirewallRule -Group "$group" -DisplayName "$name" -Action "Allow" -Direction "Inbound" -Enabled "True" -LocalPort "$port" -Profile "$profile" -Protocol "$protocol"
    }

}

addRule -profile:"Private" -protocol:"TCP" -port:1433           -group:"Custom Rule - SambaPOS Multi-terminal" -name:"SambaPOS SQL Traffic"
addRule -profile:"Private" -protocol:"UDP" -port:1434           -group:"Custom Rule - SambaPOS Multi-terminal" -name:"SambaPOS SQL Browser Traffic"
addRule -profile:"Private" -protocol:"TCP" -port:9000           -group:"Custom Rule - SambaPOS Multi-terminal" -name:"SambaPOS Messaging Server"

And here is a BAT file to execute the Powershell script. Right-click and Run as Administrator. The 3rd line is the important one. You could also open a Command Prompt (Admin), navigate to the location of fwrules.ps1, and execute line 3.

##fwrules.bat##

D:
CD D:\Programs
powershell -executionpolicy bypass -File fwrules.ps1
pause

This is the Output when the Rules are successfully added:


This is the Output when the Rules are already existing:


And here you can see the Firewall Inbound Rules that the script created:

6 Likes

Thanks for the pointers, @QMcKay. I will give these settings a go.

The change in networks setting on all terminals resolved my issues!

Excellent. Thanks QMcKay!

1 Like

I testing this script at win 10 creator 1703 upgrade series. I make Port is open at private n public, but at sambapos terminal can’t connected to sql server at main computer. Any testing at new win 10 update

It should make no difference, but there is no way to know what things were changed during the upgrade.

Check all your settings again.

Verify your Firewall Rules are in place, or turn off the Firewall.

Ensure your Network is Private …

If i turn off all firewall, terminal client can connected, but if i turn on again firewall, it become not connect. I check port is open at inbound

Then the problem is definitely your Firewall Rules.

Which Port? Have you read this Topic?

You need more than 1 Port to be open. You need 3 Ports open:

1433 (TCP)
1434 (UDP)
9000 (TCP)

There is even a Powershell script in a previous post that makes adding the Firewall Rules very easy.

Yes port 1434, 1433,9000 is open at in bound. I run your script at powershell.

It has to have outbound open as well. How would it communicate otherwise.

I does not need Outbound. And the Rules only apply to the “Server” where the DB resides and the SambaPOS.Messaging.Server Service is running.

There are no SambaPOS-specific Firewall Rules on the Terminals, other that the Server.

There are also no SambaPOS-specific Outbound Rules on any Terminal, including the Server.

Yes, before i reinstall new version windows 10 1703, i run Q script, firewall turn on and work nicely, just inbound firewall without outbound at server. Terminal not open port. But after reinsttal with new vesion win 10 with same script, it not work. May be there is some feature at win 10 1703 that handle port?
Note, i run with the last same script i run before upgrade

I have been reading this discussion with some interest as I am experiencing significant problems with auto update on Entity Screens. The normal operation of the ordering and ticket issuing process is not impacted as we auto logout Waiters and Barmen and therefore when they log back into the system on these Terminals the Table screens and customer tickets are updated.

However we have 2 Reception terminals (plus some occasional use Admin terminals) which use Entity screens for Account management (Hotel Customer Booking accounts which are settled at point of departure from the Hotel) developed from @QMcKay excellent Account statement tutorial. These Entity screens are not refreshing automatically and therefore there is a serious potential for account payments to be incorrectly reported and possible payments missed.

The configuration we have is as follows

1 Dedicated Server PC which is running SQLExpress Server 2014, has SambaPos installed and always running (at login screen) The message server service is installed on this machine and is currently configured to Port 9000+ as per the details above. On this server I have added the Port exceptions within the Firewall AND turned off the firewall. I have edited the settings in SQL Manager as detailed above.

The Server machine is named as the Server in the terminal settings and the Message Server Test says OK and we get a Green Connected message, Even on this machine there is no auto update or refresh of Entity Screens.

All other terminals are configured to this message server and ALL show green connected. All have been restarted after restarting the Server (numerous times!) and NONE will auto refresh any Entity Screens, State Displays. Ticket timers on buttons do not update etc etc.

All Terminals are Hard wired and all are connected to the same Private network as the Server.

Firewalls are currently switched off on all Terminals and the Server

There are no other instances of Message Server Service running on the Network (Server only)

Computer Name includes http:// in the messaging Client Box.

I am completely baffled as this was all working prior to relocating the Server to a dedicated Windows 10 machine (All terminals are Windows 10 also, and are are Networking properly and connected to a Homegroup)

@QMcKay if you have any other suggestion I would be grateful as I have run out of things to try other than a complete reinstall across my whole system (serious last resort)

Cheers

Show a screenshot of your entity screen settings. Are they custom entity screens with widgets? If so show property settings on them.