Server deployment

4 views
Skip to first unread message

Duncan Brown

unread,
Jul 12, 2019, 3:40:55 PM7/12/19
to SciTokens Discussion
Hi Jeff,

I have tomcat up and running on sugwg-scitokens.phy.syr.edu and I uploaded the war, but when I try and deploy it, I get the error:

edu.uiuc.ncsa.security.core.exceptions.MyConfigurationException: Error: could not load configuration

Where does server-conf.xml go and how do I tell it to use that file?

I tried the manager option that lets me specify both an XML and a WAR, but that fails with

/opt/tomcat/logs/catalina.out:java.io.FileNotFoundException: https:/github.com/scitokens/scitokens-java/releases/download/v.1.2a/server-config.xml (No such file or directory)
/opt/tomcat/logs/catalina.out:java.io.FileNotFoundException: https:/github.com/scitokens/scitokens-java/releases/download/v.1.2a/scitokens-server.war (No such file or directory)

presumably because java.io isn't following the 302 it gets from GitHub.

Cheers,
Duncan.

--

Duncan Brown Room 263-1, Physics Department
Charles Brightman Professor of Physics Syracuse University, NY 13244
http://dabrown.expressions.syr.edu Phone: 315 443 5993

Duncan Brown

unread,
Jul 12, 2019, 6:00:57 PM7/12/19
to SciTokens Discussion
Hi Jeff,

Found it, I think:

<context-param>
<param-name>oa4mp:scitokens.server.config.file</param-name>
<param-value>/opt/tomcat/conf/scitokens-server-config.xml</param-value>
</context-param>

in /opt/tomcat/webapps/scitokens-server/WEB-INF/web.xml

Cheers,
Duncan.
> --
> You received this message because you are subscribed to the Google Groups "SciTokens Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@scitokens.org.
> To view this discussion on the web visit https://groups.google.com/a/scitokens.org/d/msgid/discuss/6FD99686-F68B-45EF-BD73-9820DA44704C%40syr.edu.

Duncan Brown

unread,
Jul 12, 2019, 6:17:02 PM7/12/19
to Jeff Gaynor, SciTokens Discussion
Hi Jeff,

Still no luck. I made the following changes to the server config file:

<https://gist.github.com/duncan-brown/82c3f05fbb6eb8746fe514bb534351fb>

which I saved here

[root@sugwg-scitokens WEB-INF]# ls -l /opt/tomcat/conf/scitokens-server-config.xml
-rw-r----- 1 root tomcat 3875 Jul 12 18:09 /opt/tomcat/conf/scitokens-server-config.xml

and set

<context-param>
<param-name>oa4mp:scitokens.server.config.file</param-name>
<param-value>/opt/tomcat/conf/scitokens-server-config.xml</param-value>
</context-param>

but when I try and start the server, I get

12-Jul-2019 18:14:03.068 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1483 ms
edu.uiuc.ncsa.security.core.exceptions.MyConfigurationException: Error: No configuration found. Cannot configure the server.
at edu.uiuc.ncsa.myproxy.oa4mp.server.servlet.AbstractBootstrapper.getConfigurationLoader(AbstractBootstrapper.java:36)

Cheers,
Duncan.
> To view this discussion on the web visit https://groups.google.com/a/scitokens.org/d/msgid/discuss/F4E5977C-A937-4A93-B487-B327E47DF583%40syr.edu.

Duncan Brown

unread,
Jul 16, 2019, 8:19:10 PM7/16/19
to Jeff Gaynor, SciTokens Discussion
Hi Jeff,

In WEB-INF/web.xml, I set

<context-param>
<param-name>oa4mp:scitokens.server.config.file</param-name>
<param-value>/opt/tomcat/conf/scitokens-server-config.xml</param-value>
</context-param>

<context-param>
<param-name>oa4mp:oauth2.server.config.name</param-name>
<param-value>sugwg-scitokens.phy.syr.edu</param-value>
</context-param>

and then in /opt/tomcat/conf/scitokens-server-config.xml I set

<config>
<server name="sugwg-scitokens.phy.syr.edu">
<service name="oa4mp:scitokens.fileStore"

...

</service>

</server>
</config>

But I still get the same error:

16-Jul-2019 20:17:50.705 SEVERE [http-nio-8443-exec-14] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.scitokens.loader.STBootstrapper
edu.uiuc.ncsa.security.core.exceptions.MyConfigurationException: Error: could not load configuration
at edu.uiuc.ncsa.security.servlet.Bootstrapper.contextInitialized(Bootstrapper.java:46)

Cheers,
Duncan.

> On Jul 16, 2019, at 7:37 AM, Jeff Gaynor <gay...@illinois.edu> wrote:
>
> First off, you must specify both the path to the file and the name of the configuration within the file. There can be several configurations in a file.
>
> <context-param>
>
>
> <param-name>oa4mp:oauth2.server.config.name</param-name>
>
>
> <param-value>scitokens-server</param-value>
> </context-param
> >
>
> Which in turn means you need to have the name set as something like
>
> <config>
> <server name="scitokens-server ...
>
> within the file.
>>> https://groups.google.com/a/scitokens.org/d/msgid/discuss/F4E5977C-A937-4A93-B487-B327E47DF583%40syr.edu

Duncan Brown

unread,
Jul 17, 2019, 5:01:05 PM7/17/19
to Jeff Gaynor, SciTokens Discussion
Hi Jeff,

The permissions look correct:

[root@sugwg-scitokens webapps]# ls -ld /opt/tomcat/conf/
drwxrwxr-x 3 root tomcat 322 Jul 17 16:55 /opt/tomcat/conf/

[root@sugwg-scitokens webapps]# ls -l /opt/tomcat/conf/scitokens-server-config.xml
-rw-rw---- 1 root tomcat 3928 Jul 16 20:18 /opt/tomcat/conf/scitokens-server-config.xml

I noticed that there's also a server.xml in the conf directory that defines:

<Server port="8005" shutdown="SHUTDOWN">
...
<Service name="Catalina">
...
<Connector port="8443"

Should any of this config be in that file?

Cheers,
Duncan.

> On Jul 17, 2019, at 1:29 PM, Jeff Gaynor <gay...@illinois.edu> wrote:
>
> Are the permissions for this file set right? Should be access only to root (rw) and the group should be set to tomcat (rw only too).

Jeff Gaynor

unread,
Jul 19, 2019, 8:31:55 AM7/19/19
to Duncan Brown, SciTokens Discussion
Are the permissions for this file set right? Should be access only to
root (rw) and the group should be set to tomcat (rw only too).


Jeff Gaynor

unread,
Jul 19, 2019, 8:31:55 AM7/19/19
to Duncan Brown, SciTokens Discussion
First off, you must specify both the path to the file and the name of the configuration within the file. There can be several configurations in a file.

<context-param>
    <param-name>oa4mp:oauth2.server.config.name</param-name>
    <param-value>scitokens-server</param-value>
</context-param>

Which in turn means you need to have the name set as something like

<config>
   <server name="scitokens-server ...

within the file. 
On 7/12/19 5:16 PM, Duncan Brown wrote:

Jeff Gaynor

unread,
Jul 19, 2019, 4:20:47 PM7/19/19
to Duncan Brown, SciTokens Discussion
Hi!

Seems like you have an extra level of tagging. You config file should read

<config>
    <service name="sugwg-scitokens.phy.syr.edu"
                   debug="trace"
                  ... other stuff/>
       ... more stuff
</config>

There is no server tag any place in the configuration.  The debug tag
turns on tracing so a bunch of stuff should start to print out once it
loads.
Reply all
Reply to author
Forward
0 new messages