1. Beatrix Willius
  2. Valentina Server
  3. Суббота, Март 28 2020, 09:56 AM
  4.  Подписаться через email
How do I use both Server.Restart and Server.Shutdown?

I'm testing those commands in the example ValentinaServerUtility. Both don't do anything. Using latest version of Valentina Server on High Sierra. The screenshot is from immediately after clicking the shutdown button. Restart also doesn't seem to do anything.
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Very odd. Why don't I see the same here? Need to test on my other computer with Catalina.

@Valentina folks: any information? I need to have a solution soon.
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
My project is working fine now. Only the example doesn't work. I'll check what the example is doing (or not).
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
FYI, In my variation of ValentinaUtility,
1) in DoServerRestart, I do

mValentinaServer.Restart
DisconnectFromServer

2) in DisconnectFromServer, I
- reset properties
- close the connection
- start a Timer to wait 1 second letting the server to restart
If I don't wait, I'm raising sometime an error

mValentinaServer = nil
mVConnection.Close
mVConnection = nil
// Update UI
...
// Wait 1 second before manually reconnect
myTimerConnection.Mode = 1
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Now using the latest version 10.1.2. I'm still working with the Valentina Server Utility.

I was successful when changing the cache size. MAXIDLECLIENTTIMEOUT still doesn't want to be changed.

Why do I get an error 394507 after changing properties and restarting?
Вложения
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
BTW,
As I can see in the log file, the server is trying to terminate endlessly but is failing so ("Terminating the connection : FAILED";) and the log file is rapidly growing...


Could you send me the vServer log? Please do it with VerbooseMode == 3.
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
François, I saw you bug report about "vServer's restart in Windows". I will take a look there a bit later.
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
Something like


SET PROPERTY MAXIDLECLIENTTIMEOUT OF SERVER to 30;
...
do restart
...
GET PROPERTY MAXIDLECLIENTTIMEOUT OF SERVER;
-- 30
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
Beatrix, it seems ValentinaServerUtility example is a bit "out of sync".

MAXCLIENTTIMEOUT is deprecated now, you should use MAXIDLECLIENTTIMEOUT variable instead.
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Yes indeed.
I've done that in order to manage the backups myself (by the client app).
If the server is in a system owned folder (/Library/), I cannot use/create/delete other folders in the server folder via the client app as it don't have permissions to do so.
I want to make backup using the Valentina API (SQLExecute(BACKUP DATABASE)) and next move/copy to another location and manage older backup.

This configuration is working well, but I don't consider myself a server guru and perhaps I do that the wrong way.
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
That's not a typical installation of vServer.
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Some additional information about my installation on MacOS :
- My vServer folder is installed in the user Documents folder
- it as the following permissions : theUser RW, myCustomGroup RW, everyone no access
Every account allowed to access to the server is included in myCustomGroup
The INI file is created by me and has the same permissions (but if I let Valentina server create this ini file automatically, the results are the same : I can change the settings)


My server is launched by a plist file stored in /Library/LaunchDaemons/ (permissions are the same as the parent folder)
In this plist file, I've added
<key>GroupName</key>
<string>myCustomGroup</string>
<key>Umask</key>
<integer>7</integer>

In the INI file, have you the HOSTINGMODE = 0 ?
(if <> 0 then vServer properties are not changeable)
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Screenshot was too large. Trying again.
Вложения
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Forget to say : ValentinaServerUtility complied with Xojo 2019r1.1
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
On MacOS side (Mojave 10.14.6, Valentina 10.1), mValentinaServer.SetVariable (tried on MaxClientTimeout) is working well too (=correctly set as on Windows side). The ini file is changed.
The restart or shutdown command (mValentinaServer.Restart) is working well here on MacOS.
I can see it in the Log folder : a new log file is created each time. Secondly, I must allow the app in the firewall each time too (as, I think, my custom* Valentina server app is not signed).
Not tried with the pref pane.

*I've changed the app name, exe name (and the ini file name) and reflected in the plist file with a custom name.
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Interesting. That's not what I see. The variables aren't set. Which becomes evident when after restarting the old variable values are loaded.
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
mValentinaServer.SetVariable seems to be working well : the new value is stored in the ini file.

But the restart command freeze the server app (as explained in the bug report ID #8756 for the shutdown command).
As I can see in the log file, the server is trying to terminate endlessly but is failing so ("Terminating the connection : FAILED";) and the log file is rapidly growing...
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
@Francois Van Lerberghe: yes, my problems on macOS seem similar to yours. What use is a shutdown command if it doesn't do anything? What happens for you when you do the restart command on Windows? Are the properties saved?
Комментарий
There are no comments made yet.
François Van Lerberghe Ответ принят
Комментарий
There are no comments made yet.
Beatrix Willius Ответ принят
Thanks for the information, Ivan.

Restart: yes, I can see the log files in Valentina Studio. The restart is done. However, when I try to change a server property then property isn't changed after the restart.

In the server utility:

- Click on Connect
- Change any property. For instance change the Max Client Timeout to 30. Click on the Set button.
- Click on Restart.
- Max Client Timeout is changed back to 20.

Is this the correct usage of restart?

- Shutdown: sorry, that isn't very useful. I know how to use the stop_me.sh script with launchctl unload.
Комментарий
There are no comments made yet.
  • Страница :
  • 1
  • 2


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories