Wednesday, August 15, 2018

#1 2015-03-13 11:59:53 am

Ramben66
Member
Registered: 2015-03-13
Posts: 7

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:

Applescript:



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)

Offline

 

#2 2015-03-13 02:02:52 pm

mouramartins
Member
From:: Algarve
Registered: 2010-11-21
Posts: 156

Re: Sudden problems with using EPPC for remote commands

No help to offer, but have you tried:

Applescript:

choose remote application

Offline

 

#3 2015-03-13 03:48:07 pm

Ramben66
Member
Registered: 2015-03-13
Posts: 7

Re: Sudden problems with using EPPC for remote commands

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?

Offline

 

#4 2015-03-13 07:38:38 pm

mouramartins
Member
From:: Algarve
Registered: 2010-11-21
Posts: 156

Re: Sudden problems with using EPPC for remote commands

Ramben66 wrote:

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. sad

Offline

 

#5 2015-03-13 08:54:09 pm

mouramartins
Member
From:: Algarve
Registered: 2010-11-21
Posts: 156

Re: Sudden problems with using EPPC for remote commands

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

Offline

 

#6 2015-03-14 11:06:29 am

Ramben66
Member
Registered: 2015-03-13
Posts: 7

Re: Sudden problems with using EPPC for remote commands

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.

Offline

 

#7 2015-03-14 12:03:08 pm

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11501
Website

Re: Sudden problems with using EPPC for remote commands

Hi,

the "classical" syntax works on my machine(s)

Applescript:


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


regards

Stefan

Offline

 

#8 2015-03-14 12:03:33 pm

mouramartins
Member
From:: Algarve
Registered: 2010-11-21
Posts: 156

Re: Sudden problems with using EPPC for remote commands

Ramben66 wrote:

That definitely makes it seem more likely that it's something Apple did, and not something broken in any part of my setup.


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!

Offline

 

#9 2015-03-14 02:03:06 pm

mouramartins
Member
From:: Algarve
Registered: 2010-11-21
Posts: 156

Re: Sudden problems with using EPPC for remote commands

StefanK wrote:

Hi,

the "classical" syntax works on my machine(s)
]


And "Choose remote Application" ?

Offline

 

#10 2015-03-14 02:13:45 pm

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11501
Website

Re: Sudden problems with using EPPC for remote commands

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.

Last edited by StefanK (2015-03-14 02:15:48 pm)


regards

Stefan

Offline

 

#11 2015-03-15 10:13:12 am

Ramben66
Member
Registered: 2015-03-13
Posts: 7

Re: Sudden problems with using EPPC for remote commands

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.

Offline

 

#12 2015-03-18 12:10:05 pm

mstrange
Member
From:: Mansfield, PA
Registered: 2011-03-19
Posts: 6
Website

Re: Sudden problems with using EPPC for remote commands

I've encountered this in the past, and rebooting the target machine always fixed it. But not today. sad

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.


M. Strange
--
"When anyone takes an unblinking look into the well, if they don't find living water, they'll find nothing but a black hole."
Steve Taylor

Offline

 

#13 2015-03-18 12:19:05 pm

McUsrII
Member
Registered: 2012-11-21
Posts: 3046
Website

Re: Sudden problems with using EPPC for remote commands

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.)

Offline

 

#14 2015-03-18 08:33:38 pm

Ramben66
Member
Registered: 2015-03-13
Posts: 7

Re: Sudden problems with using EPPC for remote commands

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

Offline

 

#15 2015-03-18 08:59:33 pm

McUsrII
Member
Registered: 2012-11-21
Posts: 3046
Website

Re: Sudden problems with using EPPC for remote commands

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.

Offline

 

#16 2015-03-19 06:32:34 am

DJ Bazzie Wazzie
Member
From:: the Netherlands
Registered: 2004-10-20
Posts: 2794
Website

Re: Sudden problems with using EPPC for remote commands

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.

Offline

 

#17 2015-03-19 06:54:41 am

McUsrII
Member
Registered: 2012-11-21
Posts: 3046
Website

Re: Sudden problems with using EPPC for remote commands

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?

Offline

 

#18 2015-03-19 11:54:50 am

mstrange
Member
From:: Mansfield, PA
Registered: 2011-03-19
Posts: 6
Website

Re: Sudden problems with using EPPC for remote commands

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:

Secure Transport
Available for: OS X Mountain Lion v10.8.5, OS X Mavericks v10.9.5, and OS X Yosemite v10.10.2
Impact: An attacker with a privileged network position may intercept SSL/TLS connections
Description: Secure Transport accepted short ephemeral RSA keys, usually used only in export-strength RSA cipher suites, on connections using full-strength RSA cipher suites. This issue, also known as FREAK, only affected connections to servers which support export-strength RSA cipher suites, and was addressed by removing support for ephemeral RSA keys.


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:

Applescript:

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.


M. Strange
--
"When anyone takes an unblinking look into the well, if they don't find living water, they'll find nothing but a black hole."
Steve Taylor

Offline

 

#19 2015-03-19 12:54:13 pm

Ramben66
Member
Registered: 2015-03-13
Posts: 7

Re: Sudden problems with using EPPC for remote commands

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

Offline

 

#20 2015-03-19 01:38:12 pm

mstrange
Member
From:: Mansfield, PA
Registered: 2011-03-19
Posts: 6
Website

Re: Sudden problems with using EPPC for remote commands

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.


M. Strange
--
"When anyone takes an unblinking look into the well, if they don't find living water, they'll find nothing but a black hole."
Steve Taylor

Offline

 

#21 2015-03-19 02:31:24 pm

DJ Bazzie Wazzie
Member
From:: the Netherlands
Registered: 2004-10-20
Posts: 2794
Website

Re: Sudden problems with using EPPC for remote commands

Thanks mstrange. Learned again something new smile . I always assumed it wasn't encrypted but it was an open and insecure network protocol. Maybe I have missed the memo.

Last edited by DJ Bazzie Wazzie (2015-03-19 02:31:43 pm)

Offline

 

#22 2015-03-20 07:42:35 am

mstrange
Member
From:: Mansfield, PA
Registered: 2011-03-19
Posts: 6
Website

Re: Sudden problems with using EPPC for remote commands

I got a reply from Apple (!) stating that "Engineering has determined that your bug report (20226451) is a duplicate of another issue (20219161)..." so we now know they are aware of it. Let's hope there's a fix made available quickly. (But thoroughly tested this time!)


M. Strange
--
"When anyone takes an unblinking look into the well, if they don't find living water, they'll find nothing but a black hole."
Steve Taylor

Offline

 

#23 2015-03-20 10:43:12 am

McUsrII
Member
Registered: 2012-11-21
Posts: 3046
Website

Re: Sudden problems with using EPPC for remote commands

Hello.

I believe there are other SSL implementations, you can use out there, to replace Apple's current implementation with, but, they are probably patched the same way, anyways, if this is critical for running your business, then I'd go to Apples Opensource directory for Yosemite. I'd reall also make an account at  The MacPorts Project -- Home and check out anything regarding any implementations of openSSL that they distribute, there, at least, you may find people among the maintainers of any openSSL packages, that you can ask questions you may have.

Who knows, they may even provide an openSSL version that works for you! smile

HTH

(And I have started to fancy the idea of my own Wurlitzer! wink )

Last edited by McUsrII (2015-03-20 10:45:09 am)

Offline

 

#24 2015-03-20 11:20:57 am

DJ Bazzie Wazzie
Member
From:: the Netherlands
Registered: 2004-10-20
Posts: 2794
Website

Re: Sudden problems with using EPPC for remote commands

mstrange wrote:

"Engineering has determined that your bug report (20226451) is a duplicate of another issue (20219161)..."


Duplication message is a good thing. Priority of solving bugs works a bit different for Apple than other software companies. For Apple the amount of duplicates determines the level of priority of a bug. While normal bug report systems try to avoid duplicate reports, for Apple you should definitely create as much as duplicates as you like.

Offline

 

#25 2015-04-09 05:38:41 am

DougAdams
Member
From:: Newton, MA, USA
Registered: 2003-05-09
Posts: 81
Website

Re: Sudden problems with using EPPC for remote commands

Looks like this was fixed in Security Update 2015 004.


Doug

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)