[Archivesspace_Users_Group] proxying with a prefix [ was: Mysql connector issues with a source build ]

David Hietpas hietpasd at uwosh.edu
Wed Jul 22 16:23:05 EDT 2015


This is the exact same problem I'm having too.  The assets are not loading
properly even when you declare a proxy url in the config.rb.  I've
hardcoded the proxy url even and it doesn't even reflex anywhere.

On Wed, Jul 22, 2015 at 3:09 PM, Steven Majewski <sdm7g at virginia.edu> wrote:

>
> Adding those lines breaks everything ( whether I use the proxy address or
> not ).
>
> Before adding those lines to config, the values for those settings were:
>
> irb(main):001:0> AppConfig[:frontend_prefix]
> "/admin/"
> irb(main):002:0> AppConfig[:public_prefix]
> "/public/"
>
>
> which looked correct to me.
>
> After that change they are the whole URL, not just the prefix:
>
> irb(main):001:0> AppConfig[:frontend_prefix]
> "http://d-172-25-72-74.bootp.Virginia.EDU/admin/"
>
>
>
> ( Also: It looks like that first bunch of missing glyphs are coming from
> Bootstrap javascript
> which maybe doesn’t know about the prefix.  )
>
>
> — Steve Majewski
>
>
>
>
> On Jul 22, 2015, at 3:50 PM, Brian Hoffman <brianjhoffman at gmail.com>
> wrote:
>
> Hi Steve,
>
> I think you might be able to resolve that error by adding this to your
> config.rb:
>
> AppConfig[:frontend_prefix] = proc {"
> http://#{AppConfig[:hostname]}/admin/“}
> <http:/#%7BAppConfig[:hostname]%7D/admin/%E2%80%9C%7D>
> AppConfig[:public_prefix] = proc {"
> http://#{AppConfig[:hostname]}/public/”}
> <http:/#%7BAppConfig[:hostname]%7D/public/%E2%80%9D%7D>
>
> There is probably some redundancy in the way the _prefix and _proxy values
> are used - perhaps they could be combined in a future release.
>
> Brian
>
>
>
>
>
>
> On Jul 22, 2015, at 3:39 PM, Steven Majewski <sdm7g at virginia.edu> wrote:
>
>
>
>
> On Jul 22, 2015, at 3:24 PM, Steven Majewski <sdm7g at virginia.edu> wrote:
>
>
>
> I’m using
>
> config.rb:
>
> AppConfig[:hostname] = proc { Socket.gethostname }
> # […]
> AppConfig[:frontend_url] = "http://localhost:8088/admin" # 8080 used by
> tomcat!
> AppConfig[:public_url] = "http://localhost:8081/public"
> AppConfig[:frontend_proxy_url] = proc { "
> http://#{AppConfig[:hostname]}/admin
> <http:/#%7BAppConfig[:hostname]%7D/admin>" }
> AppConfig[:public_proxy_url] = proc { "
> http://#{AppConfig[:hostname]}/public
> <http:/#%7BAppConfig[:hostname]%7D/public>" }
>
>
>
> apache conf:
>
>     ProxyPass /admin     http://localhost:8088/admin
>     ProxyPass /public   http://localhost:8081/public
>
>
>
> Which mostly works.
>
>
> On the admin welcome page (after login) I’m missing these assets:
>
> http://localhost/assets/glyphicons-halflings-regular.woff2 Failed to load
> resource: the server responded with a status of 404 (Not Found)
> http://localhost/assets/icomoon/icomoon.woff?-z7cehr Failed to load
> resource: the server responded with a status of 404 (Not Found)
> http://localhost/assets/glyphicons-halflings-regular.woff Failed to load
> resource: the server responded with a status of 404 (Not Found)
> http://localhost/assets/icomoon/icomoon.ttf?-z7cehr Failed to load
> resource: the server responded with a status of 404 (Not Found)
> http://localhost/assets/glyphicons-halflings-regular.ttf Failed to load
> resource: the server responded with a status of 404 (Not Found)
>
>
> which, I assume is what is causing some glyphs (which I had thought were
> images) to come up as empty squares.
>
>
> And when looking at Collections in the public interface, I get the missing
> Components
> (with a constant 'busy loading’ icon ) that was reported in a previous
> message by Reid, Sarah N.
>
>
> Chrome Console error message is:
>
> GET
> http://d-172-25-72-74.bootp.virginia.edu/publictree?uri=%2Frepositories%2F8%2Fresources%2F12
>  404 (Not Found)bH.ajaxTransport.e.send @
> application-a05f22ac3ad515fde2728c1832af5791.js:25bH.extend.ajax @
> application-a05f22ac3ad515fde2728c1832af5791.js:25a.add_children @
> application-a05f22ac3ad515fde2728c1832af5791.js:25(anonymous function) @
> application-a05f22ac3ad515fde2728c1832af5791.js:25bH.extend.each @
> application-a05f22ac3ad515fde2728c1832af5791.js:14bH.fn.bH.each @
> application-a05f22ac3ad515fde2728c1832af5791.js:14(anonymous function) @
> application-a05f22ac3ad515fde2728c1832af5791.js:25bH.Callbacks.i @
> application-a05f22ac3ad515fde2728c1832af5791.js:25bH.Callbacks.cc.fireWith
> @ application-a05f22ac3ad515fde2728c1832af5791.js:25bH.extend.ready @
> application-a05f22ac3ad515fde2728c1832af5791.js:25bY @
> application-a05f22ac3ad515fde2728c1832af5791.js:25
>
>
> And it I insert a ‘/‘ between ‘public’ and ‘tree’ in that URL above,
>
>
> http://d-172-25-72-74.bootp.virginia.edu/public/tree?uri=%2Frepositories%2F8%2Fresources%2F12
> <http://d-172-25-72-74.bootp.virginia.edu/public/tree?uri=/repositories/8/resources/12>
>
>
> and try it in the browser, I get back some JSON that looks like what the
> AJAX calls are expecting:
>
> {"self":{"title":"Alderman Family Papers","id":12,"node_type":"resource","publish":true,"suppressed":false,"record_uri":"/repositories/8/resources/12","level":"collection","jsonmodel_type":"resource_tree","instance_types":[],"containers":[],"has_children":false},"path_to_root":[],"direct_children":[]}
>
>
> I just found that a few minutes ago, so I haven’t yet found the source of
> that bug.
>
>
>
>
> I’m thinking it’s here:
>
> https://github.com/archivesspace/archivesspace/blob/master/public/app/assets/javascripts/record_tree.js#L12
>
>
> $.ajax({ url: APP_PATH + "tree",
>
>
> — Steve Majewski
>
>
>
>
> On Jul 22, 2015, at 2:27 PM, David Hietpas <hietpasd at uwosh.edu> wrote:
>
> Thanks Chris.  I saw the version number and assumed it would work from
> 1.0.2 and up.
>
> I tried what you suggested yesterday without success.  I've attached a
> screenshot with what is happening with my config information with the setup
> you suggested.
>
> config.rb:
> AppConfig[:backend_url] = "http://localhost:8092"
> AppConfig[:frontend_url] = "http://localhost:8090"
> AppConfig[:solr_url] = "http://localhost:8093"
> AppConfig[:public_url] = "http://localhost:8091"
>
> AppConfig[:frontend_proxy_url] = "http://localhost/archivesspace/frontend"
> AppConfig[:public_proxy_url] = "http://localhost/archivesspace/public"
>
>
> Apache:
>     RewriteRule ^/archivesspace/frontend$ http://localhost:8090/ [L,P]
>     RewriteRule ^/archivesspace/frontend/(.*)$ http://localhost:8090/$1
> [L,P]
>
>
>
>
>
>
>
>
>
>
>
>
> On Wed, Jul 22, 2015 at 12:06 PM, Chris Fitzpatrick <
> Chris.Fitzpatrick at lyrasis.org> wrote:
>
>>
>>
>> Hi David,
>>
>>
>> Wow, this documentation is extremely outdated ( from v1.0.2 ).
>>
>>
>> I'll update this.
>>
>>
>> But the new way for adding this is to use the proxy_url settings in the
>> config.rb file:
>>
>>
>> https://github.com/archivesspace/archivesspace/blob/master/common/config/config-defaults.rb#L156-L157
>>
>>
>> Change your url that you're proxying here, like
>>
>> AppConfig[:public_proxy_url] = "http://my.aspace.edu/public"
>>
>> AppConfig[:frontend_proxy_url] = "http://my.aspace.edu/staff"
>>
>>
>>
>> Does that make sense? No need to compile from source for this...
>>
>> b,chris.
>>
>>
>> Chris Fitzpatrick | Developer, ArchivesSpace
>> Skype: chrisfitzpat  | Phone: 918.236.6048
>> http://archivesspace.org/
>>
>>
>> ------------------------------
>> *From:* archivesspace_users_group-bounces at lyralists.lyrasis.org <
>> archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of
>> David Hietpas <hietpasd at uwosh.edu>
>> *Sent:* Wednesday, July 22, 2015 6:34 PM
>> *To:* Archivesspace Users Group
>> *Subject:* Re: [Archivesspace_Users_Group] Mysql connector issues with a
>> source build
>>
>> Hi Brian,
>>
>> As I mentioned in the original email, I'm following the instructions
>> posted from ArchivesSpace Github to setup a installation with prefixes (
>> https://github.com/archivesspace/archivesspace/blob/master/README_PREFIX.md).
>> I have to use prefixes at our institute, I can't use sub-domains due to
>> policies.
>>
>> When I start with the original zip file, I don't run into this problem
>> and the app starts up fine.  However, I'm plagued with url issues (css, js,
>> assets, etc...) from the app when setting up the application with prefixes
>> through Apache.
>>
>> Thanks.
>>
>>
>> On Wed, Jul 22, 2015 at 11:24 AM, Brian Hoffman<brianjhoffman at gmail.com>
>> wrote:
>>
>>> Hi David,
>>>
>>> Why are you building the application from source rather than just
>>> downloading the zip and starting there? Can you confirm that you have the
>>> same problem when you start from the ZIP file?
>>>
>>> Brian
>>>
>>>
>>> On Jul 22, 2015, at 11:07 AM, David Hietpas <hietpasd at uwosh.edu> wrote:
>>>
>>> Due to Archon migrations, I installed Aspace v1.0.4 (
>>> https://github.com/archivesspace/archivesspace/releases/tag/v1.0.4)
>>> without issue but our University will not allow sub-domains so I have to
>>> use the Prefix method explained here (
>>> https://github.com/archivesspace/archivesspace/blob/master/README_PREFIX.md
>>> )
>>>
>>> So I reinstalled using the 1.0.4 from the source code adding the
>>> config/config.rb with the proper prefixes just as instructed.  I ran
>>> "build/run dist".  Unzipped the compiled code.  I put the
>>> mysql-connector-java.jar in the archivesspace/lib directory like I had in
>>> the working version above.  I've attached a screenshot.
>>>
>>> It can't find the mysql-connector-java though it is in the lib directory
>>> of Archivesspace.  I've drop the exact version 5.1.13 as well as the
>>> newest.  It works perfectly fine in the non-source version but not the
>>> source build version.
>>>
>>> Error: http://pastebin.com/FQVJEjEi
>>>
>>> Please advise.  Thanks.
>>>
>>> --
>>> David Hietpas
>>> University of Wisconsin Oshkosh
>>> hietpasd at uwosh.edu | 920-424-0291
>>> <lib-jar-example.jpg>_______________________________________________
>>> Archivesspace_Users_Group mailing list
>>> Archivesspace_Users_Group at lyralists.lyrasis.org
>>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>>>
>>>
>>>
>>> _______________________________________________
>>> Archivesspace_Users_Group mailing list
>>> Archivesspace_Users_Group at lyralists.lyrasis.org
>>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>>>
>>>
>>
>>
>> --
>> David Hietpas
>> University of Wisconsin Oshkosh
>> hietpasd at uwosh.edu | 920-424-0291
>>
>> _______________________________________________
>> Archivesspace_Users_Group mailing list
>> Archivesspace_Users_Group at lyralists.lyrasis.org
>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>>
>>
>
>
> --
> David Hietpas
> University of Wisconsin Oshkosh
> hietpasd at uwosh.edu | 920-424-0291
> <example.jpg>_______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>


-- 
David Hietpas
University of Wisconsin Oshkosh
hietpasd at uwosh.edu | 920-424-0291
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20150722/377c472f/attachment.html>


More information about the Archivesspace_Users_Group mailing list