Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: JBrennan on October 15, 2010, 10:22:02 AM
-
Ours is a fairly simple setup. A half dozen users running Win XP and connected to the SME server, functioning in server mode only. It is a recent installation running 7.5 I think and everything else seems to be operating satisfactorily. But our shared database, configured with the Access scripts on the users machines and the data on the server becomes either unresponsive or slow if there are more than 1 user with the database open.
It is important to note that this program was operating well with the Access data file on another linux based file server. I simply
1. Copied the contents of the folder on that old server over to the SME server
2. Altered a mdb configuration file that contains project data, so that it pointed to the SME server. This in effect involved little more than changing the mapped drive letter.
Is there any other information you need know?
Any help would be much appreciated.
John
-
John
take a lok at VetoOplockFiles directive in http://wiki.contribs.org/DB_Variables_Configuration page
anyway, IMHO, access is the worst tool.. I suggest you to use it simply as a frontend, moving your data to mysql (native in SME)
My 2c
-
Stefano,
Thanks for this suggestion. I have no choice about the type of database even if I had the know-how to change it.
My linux knowledge is rudimentary and I won't be in front of the machine for a couple of days. Do I understand right, that I should open the /etc/samba/smb.conf file in an editor like pico and alter the VetoOplockFiles variable to the value: veto oplock files ?
John
-
Thanks for this suggestion. I have no choice about the type of database even if I had the know-how to change it.
....
Do I understand right, that I should open the /etc/samba/smb.conf file in an editor like pico and alter the VetoOplockFiles variable to the value: veto oplock files ?
no
if you re-read carefully you'll see:
Samba per i-bay settings (smbd)
Usage
db accounts setprop ibay_name variable value
signal-event ibay-modify
where ibay_name is your ibay name, variable and value are in the table below that sentence..
to apply that change you have to log in as root in console or via ssh
HTH
-
Worked great! Thanks Stefano for your patient explanation of the steps required
-
Sorry but I've got to come back to this again
After a shut down and restart, the same problem reappeared again. I reentered the two commands which fixed it, but how do I make this fix more permanent?
Incidentally, the shutdown takes 10 - 15 minutes (I used the web page management option). Is that normal?
Thanks
John
-
JBrennan
Please quote here exactly the commands that you issued.
As far as I can see there is no reboot command involved.
Changing the database setting as Stefano indicated should be a permanent change, unless of course you have entered it incorrectly or done something else you are not telling us about.
You should not be editing the conf file manually.
What does this show
db accounts show ibayname
(replace ibayname with your ibayname)
Re reconfigure/reboot time I assume you did a
signal-event post-upgrade
reboot
On an older slower machine this could take 15 minutes or even more. On a fast modern machine maybe 3 or 4 minutes all up, it depends also on your particular configuration, number of ibays & users etc. What is your server spec ?
-
Thanks Mary for your full reply
Changing the database setting as Stefano indicated should be a permanent change,
I'm not entirely sure what happened, but after the reboot I entered
db accounts setprop ibay_name variable value - which was accepted
and
signal-event ibay-modify - which appeared to be rejected
and everything is working fine.
My previous reboot had been initiated through the web page, but I have since tested it by pulling the plug
reboot
On an older slower machine this could take 15 minutes or even more. On a fast modern machine maybe 3 or 4 minutes all up, it depends also on your particular configuration, number of ibays & users etc. What is your server spec ?
It is older - so now I know what to expect
-
First of all, please, use the standard quote tag, don't "invent" a new way to quote, thank you :-)
I'm not entirely sure what happened, but after the reboot I entered
db accounts setprop ibay_name variable value - which was accepted
please post the result of
db accounts show ibayname
signal-event ibay-modify - which appeared to be rejected
ok.. but... you forgot to tell us the message you read.. you say "rejectes".. I'm quite sure SME told you something (the reason for failure)
and everything is working fine.
mmmhhh... sincerely.. I can't figure how it could be..
-
Dear Stefano,
[First of all, please, use the standard quote tag, don't "invent" a new way to quote, thank you :-)
Couldn't find it the other day. After seeing the ugly result I had resolved not to try that again :) Hope I got the quote thing right this time.
please post the result of
db accounts show ibayname
db accounts show ibayname
[/code]
CgiBin=disabled
Gid=5012
Group=shared
name= Database and Backup
PasswordSet=No
PublicAccess=none
Vid=5012
UserAccess=wr=group-rd-group
ok.. but... you forgot to tell us the message you read.. you say "rejectes".. I'm quite sure SME told you something (the reason for failure)
Sorry. forgot to note it down
and everything is working fine.
mmmhhh... sincerely.. I can't figure how it could be..
You are right. Hadn't done enough testing. Concurrent searches on different machines is working (when it wasn't before), but this afternoon with my machine entering new records, other machines would hang on start up as they could not reconnect to the data file.
thanks
John
-
Could your iBay name be a problem?
Its long and have spaces.
-
Rounding off the post.
Just for the record, I put these four commands in [altering the word 'name']:
db accounts setprop ibay_name VetoOplockfiles veto oplock files
signal-event ibay-modify
signal-event post-upgrade
reboot
and so far it has passed the tests that I have undertaken.
Be prepared for a long wait after the 'post-upgrade' command
Thanks Boris for the suggestion, but the shortname for the ibay is just one word. The name that returned for the show ibayname command is the longname or the description of the ibay.
-
Rounding off the post.
Just for the record, I put these four commands in [altering the word 'name']:
db accounts setprop ibay_name VetoOplockfiles veto oplock files
signal-event ibay-modify "HERE Should be IBAYNAME"
signal-event post-upgrade
reboot
and so far it has passed the tests that I have undertaken.
Be prepared for a long wait after the 'post-upgrade' command
Thanks Boris for the suggestion, but the shortname for the ibay is just one word. The name that returned for the show ibayname command is the longname or the description of the ibay.
-
db accounts setprop ibay_name VetoOplockfiles veto oplock files
signal-event ibay-modify
signal-event post-upgrade
reboot
For the record the commands need a little adjustment indeed:
db accounts setprop ibay_name VetoOplockfiles veto oplock files
signal-event ibay-modify ibay_name
signal-event post-upgrade
signal-event reboot
-
JBrennan
Based on what you write in this thread, there are serious fundamental errors in your commands eg VetoOplockfiles is misspelt (case is wrong), it should be spelt VetoOplockFiles
Also the setting value is also in error, it would not be veto oplock files (which is three words), it would be the type of files that you want to apply the oplocks veto to.
See this forum post for details
http://forums.contribs.org/index.php/topic,36140.msg159638.html#msg159638
You need to fix whatever incorrect setting you have made.
Please show the current output of
db accounts show ibayname
(replace ibayname with the actual name of the ibay where the Access database is)
eg if the ibay name is acessdata then do
db accounts show accessdata
do not leave out or obfuscate anything
Try these commands (which will more likely do the job you want)
db accounts setprop accessdata VetoOplockFiles /*.mdb/*.MDB/
signal-event ibay-modify accessdata
(Of course, replace accessdata with the name of the ibay where the Access database is)
I don't believe it is necessary to do the post upgrade and reboot steps.
-
Thanks Boris for your quick response the other day and Mary for your patience with me as I had some basic flaws in my understanding of linux commands. It looks like we have finally nailed it.
db accounts show nameofibay
now includes: VetoOplockFiles=/*.mdb/*.MDB/
I did have to do a reboot before the different computers could edit the database at the same time without hanging or running slow.
The relevant commands then were:
db accounts setprop nameofibay VetoOplockFiles /*.mdb/*.MDB/
signal-event ibay-modify nameofibay
signal-event post-upgrade
signal-event reboot
John
-
JBrennan
I did have to do a reboot before the different computers could edit the database at the same time without hanging or running slow.
As you are effectively making changes to samba configuration, it is always the case that workstation users need to log off and then log back in to pick up those changes.
I do not see it necessary to reboot SME after having done
signal-event ibay-modify nameofibay
-
I would of tried turning off opportunistic file locking on the windows client os first then compared for trouble and performance on the client computers first.
I always suggest turning off opportunistic file locking on client computers where performance for a client to server is not affected much.
-
As you are effectively making changes to samba configuration, it is always the case that workstation users need to log off and then log back in to pick up those changes.
That is helpful to know, but I’m struggling to understand why it seems to work one day, and not the next. Yesterday (after the reboot), I tested with 4 computers editing the same table in the same access file and it worked wonderfully. Today, with client computers logging in afresh, a second computer trying to open the program and connect to the Access file hangs on start up!!
db accounts show ibayname returns:
regulated=ibay
CgiBin=disabled
Gid=5012
Group=shared
name= Database and Backup
PasswordSet=no
PublicAccess=none
Vid=5012
UserAccess=wr-group-rd-group
VetoOplockFiles=/*.mdb/*.MDB/
I would of tried turning off opportunistic file locking on the windows client os first
From what I read, this increases the chances of corruption. And as I mentioned in my first post, the old linux server (whatever it was) was handling things fine.
John
-
JBrennan
Perhaps you should also disable opportunistic locking (oplocks) on your windows workstations
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html
-
here is an registry entry that needs to be created or edited to force/stop a windows os 2000/XP client computer from using oplocks.
setting the entry to 0 will allow oplocks to be used from a client computer, the default of windows when not registry entry exist and the default of windows too.
reboot of the client computer is needed after changing the registry in order for the setting to take place.
a trick i use after making a change on one computer is to use the windows regedit to export the registry setting to a file ending with ".reg".
then i edit the reg file to remove any unwanted registry settings exported into the file.
then by just coping the reg file to other computers and while logged in as administrator account, just type the file name you saved with the .reg file extension, then reboot.
i have two files i use for this purpose, oplocksdisabled.reg and oplocksenabled.reg
this only changes the client oplocks, there is a server oplock too, search google.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MRxSmb\Parameters]
"OplocksDisabled"=dword:00000001
-
Thanks Purvis for your latest post including help with updating registry entries which I will save for future reference as I approach such a task with much care.
I’ve just had a visit from a guy with more computer nous than I, and he not only updated a couple of computers with the registry key you posted, but also ruled out interference from the Anti virus program, and checked the MS Access settings.
But testing with these two computers still produced the same behaviour!??!
John
-
But testing with these two computers still produced the same behaviour!??!
then it's a Access issue..
another good reason to trash access
-
@Stefano: that may be, but OP did say that "previous Linux server, whatever it was" handled the requirement just fine.
So JBrennan, it might be time to give up on SME for now. What about just using XP Pro as a peer "server" for your half-dozen workstations? Give it plenty of RAM (up to 3 gigabytes, but more than 2 won't help that much) and do this:
Right-click My Computer, choose Properties, click Advanced tab. Click "Settings" in Performance box. Click this new Advanced tab. Tick "Background Services" and "System Cache" radio buttons. "OK" until you're out, then reboot.
Gigabit Ethernet network-wide. Don't use the peer server as a workstation. Don't bother with antivirus on the peer server. Use hardware RAID-1 on the peer server if its chipset supports it, as XP Pro won't do software RAID without a hack. How big is the database? Maybe copy often to a Dropbox folder for offsite backup and versioning.
-
And oh yeah, you can run the peer server headless with Remote Desktop, or VNC, or even LogMeIn.
-
JBrennan
Trust me here, you are going to have to get a grip on what oplocks(opportunistic file locking) does.
Microsoft created as far as i know and included it in windows NT. Basically to speed up sharing of files in a terrible way that does not work with general programming of sharing and locking files or locking records within files.
Do a google on either "oplock" or "opportunistic file locking".
I believe linux has had to deal oplocks because of windows nt os.
Here is microsoft suggested way of controlling it with the registry.
http://support.microsoft.com/kb/296264
I have read that microsoft did not want make any corrections to oplocks in order to sell MS SQL, that is their answer some i had read, but that does not solve my issue either.
You have to turn oplocks off all the workstations not just one if you are going to control oplocks from client computers.
Windows client workstations have a choice of either oplocks being off or on, the default on a windows workstation is it that is turned off(the windows registry entry for oplocks is not created.)
In Sme Linux, you can turn if off(on the server side) i believe, but you can leave it turned on, the default state, or set certain files names to not use oplocks. This is something that cannot be done in windows as far as i know.
By turning it off on all client workstations, this gives you a chance to test your software for trouble as well as performance.
As mentioned also, you can test or run access on another windows nt peer computer acting as a sole server, I did this for years before using Sme Linux.
There is also a setting on a windows nt os computer where you can set the oplocks to not be allowed in a server role, set the above microsoft website link.
If you set the windows nt os computer server to not use oplocks in a server role, you then do not have to make changes to any client computers registry as far as oplocks go.
and if you like that setup, as was suggested, run the computer without monitor and use ultravnc remote control software.
One thing to consider, was your access application written correctly to begin with for a multi-user system, if not, and it was written for a single user, then you will always have issues when it comes to multi-users.
One a sme linux server, i suggest doing what i did, have a way to see what files are in a open state, this will help you to possibly figure out what is going on.
See what files are open when a client computer has oplocks turned on compared to turned off.
Here is a problem i solved. We have databases in use with a certain program. Everything runs fine when oplocks are turn off, but there are some reports at the end of the day and end of the month where it would take 20 minutes to run these routines. To solve that problem, i only let a single certain workstation run these routines with oplocks turned on and all other workstations oplocks turn off.
Also on the Sme Linux server, i set vetoplocks for all files that had nothing to do with high performance in doing the daily and monthy routines, i tweaked my oplocks so to say, but like i said, on other client workstations the oplocks where all set to off using the registry entry.
And personally, i disliked Access from the first time i used it from years ago.
It will get you by for a few years, but then there is a time when you probably are going to have to bite the bullet and use something more robust and dependable.
If somebody tells me they written something with Access and are using that a database, i just think how low skilled they are with database programming.
I personally would suggest you move away from Access ASAP, even if it takes a few years to do it. And Dbase is not much different.
-
here are two php webpage scripts to view your open files with.
one will run in a loop every 2 seconds, refresh webpage every 2 seconds
you can see how your files stay open on a sme server with oplock locks turned on a windows nt client computer.
create these two files in your ibays/Primary/html folder and end the file with a ".php" extension.
notice that when oplocks are turned on, that your files are still open for about 10 seconds on the server after you have gotten out of your windows based program.
notice that when oplocks are turned off, the file close immediately when you get out of your windows based program.
i use these programs all the time to detect if somebody is either logged into the server, or logged in and has files opened. this is a must know when you are maintaining the sme server as to not damage the files the workstations are using.
no loop code
samabafilesopen.php
<!--DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"-->
<html>
<head>
<title>Server Status</title>
</head>
<body>
<tt>
<b>
<div>
<?php
print "<pre>";
echo '<font size="4">';
print "Server Status Report\n";
print "\n";
print "Current date : ";
system("date +'%m-%d-%Y %T %Z' | col -b",$return);
print " URL name : ";
print ($_SERVER['SERVER_NAME']);
print "\n";
print " Server name : ";
system("uname -n | col -b",$return);
print "************** UPTIME ***************\n";
system("uptime | col -b",$return);
print "\n";
print "\n";
print "************** SMB STATUS ****************\n";
system("smbstatus | col -b",$return);
print "\n";
print "\n---end of report---\n";
print "</pre>";
?>
</div>
</body>
</html>
loop code added
samabafilesopenloop.php
!--DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"-->
<html>
<head>
<meta http-equiv="refresh" content="2">
<title>Server Status</title>
</head>
<body>
<tt>
<b>
<div>
<?php
print "<pre>";
echo '<font size="4">';
print "Server Status Report\n";
print "\n";
print "Current date : ";
system("date +'%m-%d-%Y %T %Z' | col -b",$return);
print " URL name : ";
print ($_SERVER['SERVER_NAME']);
print "\n";
print " Server name : ";
system("uname -n | col -b",$return);
print "************** UPTIME ***************\n";
system("uptime | col -b",$return);
print "\n";
print "\n";
print "************** SMB STATUS ****************\n";
system("smbstatus | col -b",$return);
print "\n";
print "\n---end of report---\n";
print "</pre>";
?>
</div>
</body>
</html>
-
Hey Purvis, you are recording a lot of interesting stuff here.
In in regard to your first post giving a background to Oplocks, I am waiting on someone to come and help me work through that stuff as it is a bit beyond me.
I have tried out the php webpage scripts. I have successfully copied them to primary/html folder. But how do I get them to work? I found a way of opening them up but the browser just treated them as text files.
In regard to the earlier posts by others, I don't believe it is an Access issue.
I have just run a test linking a couple of windows work stations with the data file on another windows workstation and they ran like a charm. The computers edited adjacent records in the same table at the same time without complaint or noticeable slowness. And I had not applied any oplock registry adjustments to the computers involved.
-
JBrennan
Open a web browser and type in the URL of
http://www.yourdomain.com/samabafilesopen.php
Do similar for the other filename
-
Thanks Mary.
Its asking for a Username and Password.
The only ones I have set up are for admin and root. So I have tried usernames admin, root and Primary without success.
-
JBrennan
Did you put the files in the Primary ibay ? If so there is no password protection function for the Primary ibay unless you have done some workarounds eg refer the htaccess howto.
If you have put them in another ibay, then it seems that you have a password set on that ibay for web access.
The username will be the ibay name, and the password will be whatever password you have set in the server manager ibays panel for that particular ibay.
Please read the manual as this is explained there.
-
I checked things out this morning Mary, and can confirm the following:
Using the Windows workgroup, I was able to confirm that the required files are in this directory:
\\Elpserver\Primary\html
In the browser, anything that starts with
http://www.elpserver.com/
will result in a window that includes the following:
A username and password are being requested by http://www.elpserver.com. The site says: "Password Protected"
I looked through the Server manager pages for anything relevant. I could only find this :
Under manage domains, the
Brief description is Primary Domain
I-bay is primary site
DNS is Resolve locally
The only other thing that puzzled me is that another name appears under Domain information on the Review Configuration page:
Primary domain: elpwaikato
Virtual domains : elpwaikato
Primary web site : http://www.elpwaikato
However substituting this name for elpserver in the browser prompted a “Failed to load” page message.
I haven’t any ‘workarounds’ Other than the responding to the requests at installation and setting up the Users and Ibays, I have done no other changes to the configuration outside of what is included in this forum discussion.
-
JBrennan
Brief description is Primary Domain
I-bay is primary site
DNS is Resolve locally
That suggests the Primary page content is directed to an ibay, but you do not say what the ibay name is.
What other ibays are on the sytem, look in ibays panel in server manager.
Note that ibays can be password protected, so this may be the source of the web page user & password request.
Do you mean it is referring to the ibay name of elpwaikato ?
Primary web site : http://www.elpwaikato
That appears to be an old domain that is maybe no longer in use for which external DNS records no longer exist, or are setup incorrectly ??? I did not check, just guessing.
I haven’t any ‘workarounds’ Other than the responding to the requests at installation and setting up the Users and Ibays, I have done no other changes to the configuration outside of what is included in this forum discussion.
Well someone has done various configuration. Are you suggesting this is a clean install and you did not add that domain or password setups ? Who did ? Please provide the full history of this server.
-
That suggests the Primary page content is directed to an ibay, but you do not say what the ibay name is.
What other ibays are on the sytem, look in ibays panel in server manager.
Note that ibays can be password protected, so this may be the source of the web page user & password request.
Do you mean it is referring to the ibay name of elpwaikato ?
These are just the default settings, so I presume they are referring to the Primary I-bay
That appears to be an old domain that is maybe no longer in use for which external DNS records no longer exist, or are setup incorrectly ??? I did not check, just guessing.
This came from the setup at time of installation. For better or worse, I chose to give different names for the files server and the web server (at least that is what I thought I was doing).
Well someone has done various configuration. Are you suggesting this is a clean install and you did not add that domain or password setups ? Who did ? Please provide the full history of this server.
It was a clean install. I just set up the users, two I-bays and copied data over from the previous server.
-
did you manage to sort out issues with MS Access files???
-
No Bas60 - I concluded that I had come to the end of the line of the community support - and was considering other alternatives (not as good as SME server) - but have been too busy to do anything about it.
I'm still open to working on the problem again if someone is willing to walk alongside.
John