Sudden problems with using EPPC for remote commands

I have pretty successfully used EPPC commands for several years to control my music server in another room from my desktop iMac.

All of sudden, this has stopped working for me almost entirely. My scripts with EPPC commands will no longer even compile, and simply give me a Syntax Error saying, “Application isn’t running”, regardless of which app I specify (and the apps ARE running, I can see that on the remote machine.)

I haven’t changed a thing about my wiring or telecommunications setup. The problem did start to manifest after a recent Mavericks security update on both machines. I have tried every form of computer and router reset I can think of, but the problem persists. The computers ARE connected, file and screen sharing work fine.

Most of my scripts are of the form:



try
	tell application "Keyboard Maestro Engine" of machine "eppc://myusername:mypassword@my-machine-name.local"
		
		do script "Amplifier Volume Down"
		
	end tell
end try


Any help or useful suggestions would be tremendously appreciated!!

(My OS version is 10.9.5, which doesn’t seem to be an option in the pull-down)

Model: 2.7 GHz Intel Core i5
AppleScript: 2.6.1
Browser: Chrome Version 41.0.2272.89
Operating System: Mac OS X (10.8)

No help to offer, but have you tried:

choose remote application

Well, that is definitely a useful command that I didn’t know about before. But it doesn’t seem to help.

If I run it as just “Choose Application” it comes up with the full list of local applications (on either machine I do it on.)

If I run it as “Choose Remote Application”, it comes up with a blank list of applications for either of the two machines it finds (my desktop iMac and my Mac Mini music server.)

Is there something I need to do (other than allowing Remote Apple Events) to permit Applescript to “see” applications running remotely?

Oh! Assuming that Allow Remote Apple Events allows You to use them, maybe in the Firewall settigs? But looks like the dreaded case of re-install. :frowning:

I just went to the Mavericks side and I am in the same situation!

Thank you for that info, Mouramartins! That definitely makes it seem more likely that it’s something Apple did, and not something broken in any part of my setup.

Hi,

the “classical” syntax works on my machine(s)


property remoteHost : "my-machine-name.local"
property user_name : "myusername"
property pass_word : "mypassword"

set RemMachine to "eppc://" & user_name & ":" & pass_word & "@" & remoteHost & "."

tell application "Keyboard Maestro Engine" of machine RemMachine
	using terms from application "Keyboard Maestro Engine"
		do script "Amplifier Volume Down"
	end using terms from
end tell

Yes it seems like that. I’m surprised that there aren’t more complaints.

I have a similar set-up, except the wurlitzer is a PowerPC. The Mavericks side sees all the apps running there, so my problem is not a problem. Yet.
I went through the error logs and found nothing. Now the pain of re-installing, testing, re-upgrading…

Ouch!

And “Choose remote Application” ?

I’ve never used choose remote application because I’m checking always the remote application from the local host. The process element of System Events is available “ but not documented “ also from the Finder. And the Finder is the only scriptable application which is running permanently on every Mac.

Thanks StefanK, but that script still doesn’t work for me. After I got a couple of authentication issues ironed out, it still throws an error -600, application not running error.

I’ve encountered this in the past, and rebooting the target machine always fixed it. But not today. :frowning:

My setup is 6 web servers that use AppleScript to process the access logs (rolled nightly at midnight) and send the pertinent data to an application (Helix Server) on ‘machine #7.’ Every night launchd faithfully triggers the script on each machine. This all works quite well, with just a few occasional hiccups.

But yesterday I had a power outage when a UPS overloaded (don’t ask), and "machine #7’’ went down. It rebooted OK when power was restored, but today I noticed that all but one of the remote machines was unable to contact the target machine. The console error reads “CFNetwork SSLHandshake failed (-4)” and running the script manually returns the “Application isn’t running (-600)” error.

(It’s really odd to me that one of the machines is still able to establish contact. All the rest can not and they all return the same -600 error.)

Trying to debug this, I fired up Script Debugger and created a simple “choose remote application” script. When I run this, the target machine (running Mountain Lion Server, BTW) shows either no applications or a bit of garbage text.

So it seems that something is now corrupted on the target machine. I’ve tried rebooting a few times, I’ve tried a turn “Remote Apple events” off/reboot/turn “Remote Apple events” on sequence, I’ve tried switching the “Allow access for” switch to “All users,” and I’ve tried clearing out the allowed users list and rebuilding it. Nothing is fixing it.

Next up is to run Disk Utility and see if that fixes anything. If that doesn’t help, I’ll clear out some caches and maybe think about upgrading it to Mavericks or Yosemite.

Hello.

Sometimes it helps to clean out the system caches, when things errs mystically, It might not help in your cases, but at least it won’t hurt. You can use a tool such as Onyx, to clean them out, (you need to reboot right afterwards, so that the system can rebuild the caches.)

Onyx cleared caches on both machines and rebooted, no help.

Well, that was the only shot I had for you really, as eppc events aren’t really my cup of tea.

I apologize if those questions sound stupid, but have you looked at the Console.app, while you are running the scripts that tries to start up things, I’d especially look for firewall and or ipfw entries. But I’d rather go through every error thrown, also things that may seem unrelated, like Dyld errors. I’d also go through the settings in the appfirewall from the preferences pane, but I don’t know exactly what I’d look for there.

HTH anyways.

Just out of curiosity, are both machines language settings set to English? Is the application’s bundle name localized like messages.app? When using remote events I address remote application by the localized bundle name rather than the actual application name. I think Yosemite automatically corrects this, at least it did for me when I had Yosemite. But if your system language is set to English or the application’s bundle name is not localized you don’t have to look into this.

Hello.

I am wondering about one more thing, and I’m sorry if this is a stupid question, but what kind of answer do you get when you ping the remote address and port?

I discovered another breakdown today, with a different pair of machines doing a different function. Between the two (first one described above) I think I know what the problem is: Security Update 2015-002 (https://support.apple.com/en-us/HT204413) includes a fix for the “FREAK” exploit:

I’m convinced this is what broke it, because I’ve run some tests on various machines here, and have found that as long as the machines are 10.7.x or lower, there is no error. But if either of the machines is 10.8.5 or higher, it fails. I guess the eppc protocol uses “ephemeral RSA keys.”

The AppleScript error (-600: Application not running) isn’t very helpful, but the one captured in Console (-4: CFNetwork SSLHandshake failed) is what has me convinced that Security Update 2015-002 is the culprit.

I proved it (to myself at least) by testing on a friend’s machine (running 10.9.5) where the Security Update is not yet installed. Here’s how you can confirm it with a single machine:

tell application "Finder" of machine "eppc://127.0.0.1" to activate

Run that…
with Remote Apple Events turned off: error “Remote access not allowed”
with Remote Apple Events turned on and:
Security Update installed: error “Application not running”
Security Update not installed: Finder activates (no error)

That seems pretty conclusive to me. Anybody got a data point to refute it?

Now I’m off to file a bug report with Apple.

Nicely done, mstrange!! That seems pretty definitive to me.

Thanks!
I’ve reported my findings to http://radar.apple.com, http://www.openradar.me, http://www.macintouch.com, and http://www.macissues.com – let’s hope they fix this quickly.