Hi Gareth and Sven, I have the same problems like Gareth has described. I also use Taverna Server 2.4.1 in insecure mode on Tomcat 6 with Java 6. I have tested the scenario on Mac OS X 10.8 as well as on Windows 7 and on Ubuntu 12.04 LTS. Every time I get the same error message like Gareth described 'problem getting the main directory handle'.
I also tested both the REST interface and the SOAP interface. Both result in the same error. I checked the generated folder of the workflow run in the Taverna Server directories and there has never been an out-directory created. So I thought this might be the problem. I want to use Taverna Server as an enclosed tool and do not want to check out the source code and change some code like Sven suggested. Is there any other possibility to get the Taverna Server working in insecure mode? I wrote an email to this users list before (see attached). http://sourceforge.net/mailarchive/forum.php?thread_name=56FBCFD30D07BA499FFF96080AE9762DA3845EA9%40exmbx2.hhn.hs-heilbronn.de&forum_name=taverna-users http://sourceforge.net/mailarchive/forum.php?thread_name=56FBCFD30D07BA499FFF96080AE9762DA3845EFA%40exmbx2.hhn.hs-heilbronn.de&forum_name=taverna-users I would be glad to find an simple solution (e.g. an pre-installed vm image of Taverna Server 2.4.1 in insecure mode like the one for Taverna Server 2.2) Regards, Nina ________________________________ Von: Schlarb Sven [[email protected]] Gesendet: Montag, 29. Juli 2013 09:37 An: [email protected] Betreff: Re: [Taverna-users] Taverna Server, Problem Accessing Workflow Output Files Hi Gareth, I also had this issue. In insecure mode Taverna returns https (port 8443) URLs while it should actually return HTTP responses. I asked a question related to this to Donal Fellows, the developer of Taverna Server (I didn’t find the corresponding bug: http://dev.mygrid.org.uk/issues/browse/TAVSERV). My question to Donal was: “The only point is that in "insecure" mode, the server returns HTTPS result URLS. As I am using only one at the same time of either the HTTP ("insecure) or the HTTPS client ("secure"), I have to rewrite the URLs in "insecure" mode before sending a new request. I created a quick hack which rewrites https to http urls in "insecure" mode that works fine. But I don't know, maybe the server should generally return http urls in "insecure" mode.” Another “hack” is to use secure mode and accept everything: I extended the client so that it is also able to handle HTTPS, I have configured a "trust everything" https client that validates self signed certificates using a javax.net.ssl.X509TrustManager implementation: public class DefaultTrustManager implements X509TrustManager { @Override public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { } @Override public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { } @Override public X509Certificate[] getAcceptedIssuers() { return null; } } This TrustManager can then be used in a connection manager for creating the DefaultHttpClient: // SECURE with SSL support (trust everything) // SSL certificate validation must be configured, otherwise a // "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" // exception is thrown. SSLContext ctx = SSLContext.getInstance("TLS"); ctx.init(new KeyManager[0], new TrustManager[]{new DefaultTrustManager()}, new SecureRandom()); SSLContext.setDefault(ctx); // SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER: // Don't check if host name in certificate coincides with the server // name of the Taverna Server, otherwise the exception // "javax.net.ssl.SSLException: hostname in certificate didn't match" // is thrown. SSLSocketFactory sf = new SSLSocketFactory(ctx, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); SchemeRegistry schemeRegistry = new SchemeRegistry(); Scheme httpScheme = new Scheme("http", 8080, sf); Scheme httpsScheme = new Scheme("https", 8443, sf); schemeRegistry.register(httpScheme); schemeRegistry.register(httpsScheme); BasicClientConnectionManager cm = new BasicClientConnectionManager(schemeRegistry); DefaultHttpClient httpClient = new DefaultHttpClient(cm); By configuring the SSLSocketFactory of Apache's HTTP client with SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER: SSLSocketFactory sf = new SSLSocketFactory(ctx, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); I was able to get rid of the the hostname checking, otherwise you get the the exception "javax.net.ssl.SSLException: hostname in certificate didn't match". The only point is that in "insecure" mode, the server does not relocate HTTP requests to HTTPS (302 Moved Temporarily), but it returns HTTPS result URLS. As I am using only one at the same time of either the HTTP ("insecure) or the HTTPS client ("secure"), I have to rewrite the URLs in "insecure" mode before sending a new request. I created a quick hack which rewrites https to http urls in "insecure" mode that works fine. But I don't know, maybe the server should generally return http urls in "insecure" mode. Hope that helps! Best regards, Sven Von: Gareth Smith [mailto:[email protected]] Gesendet: Freitag, 26. Juli 2013 17:00 An: [email protected] Betreff: [Taverna-users] Taverna Server,Problem Accessing Workflow Output Files Hi All, I am trying to use Taverna 2.4.1 server to run a workflow. I am running Taverna Server under Tomcat 6.0.37 on a Ubuntu/Linux OS. I am accessing the Taverna Server via the REST interface with the server running in ‘insecure’ mode. The workflow that I am running can be uploaded to the Taverna server fine. I can start and run the workflow via the REST. I can also check the workflow status. When the workflow status is ‘Finished’, I invoke a GET on the Taverna server to retrieve XML file containing the output file paths. I do this by GETting the following URL:-<https://cas.hs-heilbronn.de/owa/UrlBlockedError.aspx> http://localhost:8443/taverna-server/rest/runs/UUID/wd/out Where UUID is a long character string for the current session ID. If I open the path http://localhost:8443/taverna-server/rest/runs/UUID , I see an XML document with path tags like <ts-rest:input />, <ts-rest:output/>. Input XML, creation time XML etc are all available and valid. If I access any of the output paths for a given session however, either by Java REST client or the firefox web browser, Taverna server returns a HTTP 403 error code and the message ‘problem getting main directory handle’. This output path function were working earlier today but something has corrupted with the Taverna Server system state and I do not know what. I have tried re-starting the Tomcat server and the error persists. If I run any workflow, I cannot access any of the output as the output directories are not being published by the Taverna server. Any advice on how to resolve this issue would be most appreciated. I will try undeploying the Taverna server but I would rather have an idea on the root cause. Many thanks in advance, Gareth This E-Mail is sent in confidence for the addressee only. Unauthorised recipients must preserve this confidentiality and should please advise the sender immediately by telephone (+44 (0)1625 505100) and return the original E-Mail to the sender without taking a copy. Cyprotex has taken all reasonable precautions to ensure that no viruses are transmitted from Cyprotex to any third party. Cyprotex accepts no responsibility for any loss or damage resulting directly or indirectly from the use of this E-Mail or the contents.
--- Begin Message ---Hi Donal, I am using the TavernaServer.2.4.1.war from the Taverna Homepage. I have imported the war as web project into Eclipse and deployed it from Eclipse into Tomcat 6 (because I am implementing and testing some java webservices running on the same tomcat (for simpification) which should be called later on from a workflow running in Taverna Server. I undeployed them for the test scenario). If I run Taverna Server on a Tomcat 6 outside of Eclipse I get the same errors as mentioned before. Perhaps this is an configuration or write permission issue? I am using Tavera Server in insecure mode... Would it help to send you the catalina.out? Regards, Nina ________________________________________ Von: Alan R Williams [[email protected]] Gesendet: Dienstag, 7. Mai 2013 11:54 An: [email protected] Betreff: Re: [Taverna-users] Problem getting the output of a workflow on Taverna Server On 06/05/2013 13:32, Bougatf, Nina wrote: > Hello everybody, > > I am using Taverna Server 2.4 (deployed on Tomcat 6 via Eclipse) and > Taverna Workbench 2.4.1 on Mac OS X. Donal Fellows wrote: <quote> OK, but you need to be aware that Taverna Server uses a number of libraries inside itself that do not work well with Eclipse. The correct way to build and deploy is to use a Maven build and then to push the produced WAR artefact into a stand-alone container (Tomcat 6 is the recommended one; we have not tested extensively with others). In particular, many of the libraries in use will do runtime bytecode generation in order to build some of the binding layers (e.g., between the web front end and the web application core, and between the core and the database engine). This is actually pretty hairy stuff, but is driven entirely off annotations in the core code; we don't do any maintenance of the libraries that actually do these bindings. </quote> So depending upon how you are running the Tomcat, it may have problems. Can you try the server in a Tomcat outside Eclipse? [snip] > > Regards, Nina Bougatf Alan
--- End Message ---
------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________ taverna-users mailing list [email protected] [email protected] Web site: http://www.taverna.org.uk Mailing lists: http://www.taverna.org.uk/about/contact-us/
