1. Beatrix Willius
  2. Valentina Server
  3. Thursday, May 23 2019, 01:29 PM
  4.  Subscribe via email
My installer now mostly works. What is really problematic is mixing my installer, the PrefPane and Lingon. Which is an app that shows you which services are running. As long as I only use either my app or the PrefPane everything is okay. But mixing them is a bad idea. Now with Lingon added to the mix I think I screwed up something - again.

Lingon doesn't show any service with vserver anymore. I deleted the LaunchDaemon. Doing a


sudo launchctl list | grep vserver


gives an empty result. Nevertheless, vServer is running and I can't quit it. Are the LaunchDaemons cached somewhere? I tried to deactivate/activate the LaunchDaemon in Lingon for testing. And I get lots of log files again:

Valentina Non-secure port : 15432
Valentina SSL port : 15434
Sqlite port : 15532
Sqlite SSL port : 15534
SNMP port : 15161
Notification port : 15436
Thu May 23 2019 15:12:00.254626 (TID 140735490986880): Server started
Thu May 23 2019 15:12:00.254679 (TID 140735490986880): Scheduler started

Thu May 23 2019 15:12:00.975927 (TID 123145431343104): Bonjour service registered as Trixis iMac._vsrv_sqlite-ssl._tcp.local.
Thu May 23 2019 15:12:00.976648 (TID 123145430269952): Bonjour service registered as Trixis iMac._valentina-ssl._tcp.local.
Thu May 23 2019 15:12:00.976844 (TID 123145429733376): Bonjour service registered as Trixis iMac._valentina._tcp.local.
Thu May 23 2019 15:12:00.977533 (TID 123145430806528): Bonjour service registered as Trixis iMac._vsrv_sqlite._tcp.local.

I'd simply restart the computer. But I'm rendering a large fractal and I need to know what I screwed up again.

Mit freundlichen Grüßen/Regards

Beatrix Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
I must have done something right because the flood of log files has stopped.

The stop script is very simple because it only checks if the LaunchDaemon exists or not. So executing it doesn't do anything.
Comment
There are no comments made yet.
Hello Beatrix,

Not sure you solved your problem.
In case not, what is your code to stop the server ?
I use a shell script :

sudo launchctl unload /Library/LaunchDaemons/be.mycompany.my_serveur.plist

"be.mycompany.my_serveur.plist" is a file located in the LaunchDaemons folder
Be careful using parameters with launchctl especially -w. This parameter modify the Disabled key of your configuration file. As explained in the documentation ("man launchctl";), if you use this parameter one time, the state of the Disabled key is stored elsewhere on disk in a location that may not be directly manipulated by any process other than launchd. And you must use it in subsequent command in order to stop/start the server (use -wF as parameter to force start). These commands are provided by Valentina in Applescript files.
(Why do you use Lingon. I use shell script to stop/start on demand and Activity monitor to manually verify).

Cheers.

François
Comment
There are no comments made yet.
Doing a
sudo launchctl list | grep vserver
gives an empty result. Nevertheless, vServer is running and I can't quit it.


Note that this command is case sensitive. you must write "vServer", not "vserver".

Cheers.

François
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
Thanks, Francois, I forgot that grep is case-sensitive.

Trixis-iMac:~ beatrix_willius$ sudo launchctl stop com.paradigmasoft.vserver_x64
Trixis-iMac:~ beatrix_willius$ sudo launchctl unload /Library/LaunchDaemons/com.paradigmasoft.vserver_x64.plist
/Library/LaunchDaemons/com.paradigmasoft.vserver_x64.plist: Could not find specified service

Trixis-iMac:~ beatrix_willius$ sudo launchctl list | grep erver
- 0 com.apple.touchbarserver
186 0 com.apple.WindowServer
- 0 com.apple.AppleFileServer
98 0 com.acronis.mobile_backup_server
280 0 com.apple.audio.systemsoundserverd
57 0 com.acronis.mobile_backup_status_server

By using just "erver" is don't need to care for case. So the service isn't running, but the LaunchDaemon is still loaded and I can't unload it. The computer has already been restarted.

I'm confused.
Comment
There are no comments made yet.
What are the content of your plist file, especially the values of keys Disabled, KeepAlive, RunAtLoad or/and OnDemand ?
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
The server is set to KeepAlive. Here is the full text of the plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Users/beatrixwillius 1:/usr/local/sbin</string>
</dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.paradigmasoft.vserver_x64</string>
<key>ProgramArguments</key>
<array>
<string>/Library/VServer_x64/vserver_x64.app/Contents/MacOS/vserver_x64</string>
</array>
<key>QueueDirectories</key>
<array/>
<key>RunAtLoad</key>
<true/>
<key>WatchPaths</key>
<array/>
</dict>
</plist>


Next on the to-do list is to change the KeepAlive and nuke the app that way.
Comment
There are no comments made yet.
My file is similar to yours (KeepAlive=true, RunAtLoad=true), except I have a Disabled key = false (but I don't remember why I added this key and not sure it's useful)
Also, check the permissions of the file. Mine is system:rw, wheel:r, everyone:r
In order to start or stop vServer app, I use only "launchctl load" and "launchctl unload". But not "launchctl start" nor "launchctl stop".
If you restart your computer,
- open Activity monitor and check if the vServer is running (All process)
- go to the Terminal and type "sudo launchctl unload /Library/LaunchDaemons/com.paradigmasoft.vserver_x64.plist"
- go to Activity monitor and check if the vServer is always running.
Is it ?
*If no,
- go to the Terminal and type "sudo launchctl load /Library/LaunchDaemons/com.paradigmasoft.vserver_x64.plist"
This command must restart the vServer.
*If yes, try with the -w parameter :
- go to the Terminal and try with "sudo launchctl unload -w /Library/LaunchDaemons/com.paradigmasoft.vserver_x64.plist"
- go to Activity monitor and check if the vServer is always running.
Is it ?
*If no,
- go to the Terminal and type "sudo launchctl load -wf /Library/LaunchDaemons/com.paradigmasoft.vserver_x64.plist"
- go to Activity monitor and check if the vServer is running again.
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
vServer is running.

When I do the stop_me.sh script I get

Trixis-iMac:~ beatrix_willius$ /Users/beatrixwillius\ 1/Documents/Development/Mail\ Archiver/Classes/Build\ Automation/Server/stop_me.sh
Trying to stop the current VServer
Password:
/Library/LaunchDaemons/com.paradigmasoft.vserver_x64.plist: Could not find specified service


Afterwards vServer still is running.

The permissions were incorrect. After correcting them I still get the same result.

Did a big of Goggling and found https://www.jamf.com/jamf-nation/discussions/19070/load-unload-or-enable-disable-launch-agents-and-daemons-for-junos-pulse-update . But I don't understand the answer.
Comment
There are no comments made yet.
The permissions were incorrect. After correcting them I still get the same result.

Have you reboot after the corrections in order to relaunch with the correct permissions ?

I think the url you provided seems to talk about a launchAgent and the difference launching and managing from a root or a user. But here, you must (I think) launch via root and stop/start from a root user.
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
Some new information.

According to https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/ the launchctl syntax has changed. Load and undload are deprecated.

Instead of

launchctl list


the current syntax is


launchctl print system


And here I find my vServer:

disabled services = {
{
"com.apple.AppleFileServer" => false
"com.ProxyConfigDaemon" => false
"com.apple.screensharing" => false
"com.apple.ftpd" => true
"at.obdev.littlesnitchd" => false
"com.crashplan.engine" => false
"com.apple.mdmclient.daemon.runatboot" => true
"com.apple.mrt" => false
"com.apple.smbd" => false
"com.apple.bootpd" => false
"com.paradigmasoft.vserver_x64" => true
"org.ntp.ntpd" => true
"com.apple.ftp-proxy" => false
}
}


If I understand https://www.launchd.info (the Operations part) correctly I managed to permanently disable the service. But I can only re-enable the service by booting into recovery mode. Is my understanding correct?

Valentina persons???
Comment
There are no comments made yet.
Indeed, load/unload is listed in the legacy subcommands of launchctl.
But according to launchctl documentation (man launchctl) you can
- override the Disabled key using -w parameter
- force the loading/unloading of the plist, ignoring the Disabled key using the -f parameter
It's still working in MacOS 10.14, and I don't know about a replacement command.
Valentina advice welcome...
Comment
There are no comments made yet.
  • Page :
  • 1


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. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories