1. Beatrix Willius
  2. Valentina Server
  3. 土, 3月 28 2020, 09:56 AM
  4.  メールで購読
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 承諾済みの回答
Screenshot was too large. Trying again.
添付ファイル
コメント
There are no comments made yet.
Ivan Smahin 承諾済みの回答
For Restart - you should see in the vServer log that all connections were dropped, vServer restarts every "internal" services and states. But it would not affect pref.panel, since there is no new log file, there is still the same vServer process ID and so on. In other words it restarts internally.

For Server.Shutdown - vServer process must be finished. But, look at

/Library/LaunchDaemons/com.paradigmasoft.vserver_x64.plist



...
<key>KeepAlive</key>
<true/>


It means new instance of vServer will be started if the vServer's process gone. You can not stop vServer without unloading this plist

Something like

launchctl bootout system /Library/LaunchDaemons/com.paradigmasoft.vserver_x64.plist


But you should see at least increased logs' count after Server.Shutdown
コメント
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.
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.
Beatrix Willius 承諾済みの回答
コメント
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 承諾済みの回答
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 承諾済みの回答
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.
François Van Lerberghe 承諾済みの回答
Forget to say : ValentinaServerUtility complied with Xojo 2019r1.1
コメント
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.
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 承諾済みの回答
That's not a typical installation of vServer.
コメント
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.
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.
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 承諾済みの回答
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 承諾済みの回答
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.
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.
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.
  • ページ :
  • 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