Ticket #10371 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Cannot use the ScriptRepo on the mac

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: blocker Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description

As reported by users (Ross Stuart) the script repository is currently failing on OSX with the message:

Connection and request failed . Unkown:Timeout: connect timed out: 198.74.56.37:80

This should not be happening and needs fixing ASAP.

Attachments

Screen Shot 2014-10-15 at 16.47.33.png (140.5 KB) - added by Owen Arnold 6 years ago.

Change History

comment:1 Changed 6 years ago by Owen Arnold

I have done some testing round this, and find that the issue goes away if you set the http_proxy in the same environment in which you are running mantid. Looking at the code this seems to be because the ScriptRepositoryImpl code is treating OSX the same way as Linux. However, most Mac users will lean on the the system network proxy settings, they will not want to (or even know how to) set the proxy in a way that it can be picked up system wide in the linux style.

The main challenge with this ticket will be in implementing the solution as follows.

  1. Treat the proxy configuration separately only for OSX.
  2. Find out how to access the proxy and proxy pac configuration settings and safely extract the http proxy settings if available.

comment:2 Changed 6 years ago by Owen Arnold

  • Status changed from new to assigned

comment:3 Changed 6 years ago by Owen Arnold

  • Status changed from assigned to inprogress

refs #10371. Put new component classes in place.

Changeset: e1d87e8c2e93147ef054d24ad3b9af72e7561e7b

comment:4 Changed 6 years ago by Owen Arnold

refs #10371. Add in system queries.

Changeset: b6f28dec7439f8ae870fdf6018f5463a9629ef8d

Changed 6 years ago by Owen Arnold

comment:5 Changed 6 years ago by Owen Arnold

refs #10371. Try to make platform specific.

Use Logger to report problems rather than fall over Treat isHttpProxy nicely rather than throwing Use preprocessor and cmake commands to limit these changes to only affect OSX Make logging better Test that it works

Changeset: 0d79ee2067aa3e4cc035e99e4e683b10f29b27a4

comment:6 Changed 6 years ago by Owen Arnold

  • Status changed from inprogress to verify
  • Resolution set to fixed

This is being verified as pull request #43.

comment:7 Changed 6 years ago by Owen Arnold

Tester: I have fixed this by adding utilities to extract and use the network proxy information in a robust way for OSX. I attempt to use the automatic proxy script in preference to looking or specific HTTP PROXY settings.

Ideally at ISIS (as per the following instructions) and definitely running on OSX 10.8.

Things should build on all platforms. new test ProxyInfoTest in the ScriptRepository should only be running on OSX and should be passing.

Prior to running the following. Verify that you see the message in the ticket description on an old version of Mantid that does not contain these changes.

  1. Open the dialog shown in the screenshot via System -> Network
  2. Disable Automatic Proxy Configuration and Web Proxy (HTTP). Accept the changes.
  3. Start up MantidPlot. Look at the Logger output. You should see an info message saying "ScriptRepository: No HTTP network proxy settings found for OSX. None used." You should then get the same error as occurred originally.
  1. Reopen the Proxy dialog, and enable ONLY the Web Proxy (HTTP) set this to be http://wwwcache.rl.ac.uk port 8080. Accept the changes
  2. Open MantidPlot, this time you should not get the warning about the script repository being inaccessible. You should see a log info message saying "ScriptRepository: HTTP System network proxy settings found" in the log history.
  1. Reopen the proxy dialog, and enable the Automatic Proxy Configuration option.
  2. This should be set to http://wwwcache.rl.ac.uk/proxy.pac
  3. Open MantidPlot, and again you should get no warning messages regarding the script repository. You should be able to use the script repository as usual.

comment:8 Changed 6 years ago by Owen Arnold

refs #10371. Fix assignment operator.

Changeset: 9eb56b687b6f185e3258f4e5cd007cea88135717

comment:9 Changed 6 years ago by Owen Arnold

comment:10 Changed 6 years ago by Owen Arnold

refs #10371. Fix minor issues.

Documentation fix. Duplicate cmake command fix.

Changeset: b4f4a1abbd933901679f16dc069a678020cb8f34

comment:11 Changed 6 years ago by Owen Arnold

Tester: I have fixed this by adding utilities to extract and use the network proxy information in a robust way for OSX. I attempt to use the automatic proxy script in preference to looking or specific HTTP PROXY settings.

Ideally at ISIS (as per the following instructions) and definitely running on OSX 10.8.

Things should build on all platforms. new test ProxyInfoTest in the ScriptRepository should only be running on OSX and should be passing.

Prior to running the following. Verify that you see the message in the ticket description on an old version of Mantid that does not contain these changes.

  1. Open the dialog shown in the screenshot via System -> Network
  2. Disable Automatic Proxy Configuration and Web Proxy (HTTP). Accept the changes.
  3. Start up MantidPlot. Look at the Logger output. You should see an info message saying "ScriptRepository: No HTTP network proxy settings found for OSX. None used." You should then get the same error as occurred originally.
  1. Reopen the Proxy dialog, and enable ONLY the Web Proxy (HTTP) set this to be http://wwwcache.rl.ac.uk port 8080. Accept the changes
  2. Open MantidPlot, this time you should not get the warning about the script repository being inaccessible. You should see a log info message saying "ScriptRepository: HTTP System network proxy settings found" in the log history.
  1. Reopen the proxy dialog, and enable the Automatic Proxy Configuration option.
  2. This should be set to http://wwwcache.rl.ac.uk/proxy.pac
  3. Open MantidPlot, and again you should get no warning messages regarding the script repository. You should be able to use the script repository as usual.

comment:13 Changed 6 years ago by Martyn Gigg

test this please

comment:14 Changed 6 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:15 Changed 6 years ago by Owen Arnold

refs #10371. Move services to kernel.

This needs to be checked on all other OS. I doubt this works yet on windows or linux properly.

Changeset: a00b14671c208565f7794cc5e029c3b644faf67a

comment:16 Changed 6 years ago by Owen Arnold

refs #10371. More robust for OSX.

Changeset: 71a109693c426454f2864f5de662056639e7560d

comment:17 Changed 6 years ago by Owen Arnold

refs #10371. Windows NetworkProxy implementation done.

Changeset: bbe4d1db4c4c9ca8c4fefd5764b330382d27ac4c

comment:18 Changed 6 years ago by Owen Arnold

test this please

comment:19 Changed 6 years ago by Owen Arnold

refs #10371. Get things working on linux.

Update the ProxyInfo class. Calling the public methods is good from an encapsulation perspective, but causes it to throw in certain circumstances. Change to copy member variables across and cover broken functionality with regression tests.

Changeset: 392cecf0a6bb96b7d81cd9e2a0638838e72c6bca

comment:20 Changed 6 years ago by Owen Arnold

test this please

comment:21 Changed 6 years ago by Martyn Gigg

test this please

comment:22 Changed 6 years ago by Martyn Gigg

Fix a type conversion warning on OS X.

Refs #10371

Changeset: 6a0a79f80a33e597ba530e98ad9d9f46a570e836

comment:23 Changed 6 years ago by Owen Arnold

test this please

comment:24 Changed 6 years ago by Owen Arnold

refs #10371. Missing include added.

Changeset: ccf42a234c7b25399ae3cc97de4b5bbc5680783f

comment:25 Changed 6 years ago by Owen Arnold

test this please

comment:26 Changed 6 years ago by Martyn Gigg

retest this please

comment:27 Changed 6 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge pull request #43 from mantidproject/feature/10371_osx_proxy_issue

Feature/10371 osx proxy issue

Full changeset: 590fa0d7c34f7ac1de70bab7e4923f0382511756

comment:28 Changed 6 years ago by Martyn Gigg

I tested this with clean packages on each platform and I was able to connect to the script repository from behind the site proxy

comment:29 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11213

Note: See TracTickets for help on using tickets.