Re: [the-fascinator-dev] possible mod_rewrite issue -- localhost redirects on fresh install

18 views
Skip to first unread message

Duncan Dickinson

unread,
Oct 22, 2012, 5:52:48 PM10/22/12
to the-fasci...@googlegroups.com
Hi Alex,

Certainly not a full answer but would mod_proxy be another option? We tend to use that with ReDBox and Mint (which run on Fascinator).

Cheers,

Duncan

On Tue, Oct 23, 2012 at 7:49 AM, Alex Garnett <axf...@gmail.com> wrote:
Hi folks,

Alex here, Data Curator at Simon Fraser University in Vancouver, Canada. I saw Peter Sefton give a talk on The Fascinator a couple of years ago and was very impressed; now have a chance to try to put it into production at SFU. Got it working no problem on a local machine, but am having a very stupid problem getting it up and running on one of our servers. Specifically, after install, I can access the application through a public IP (lib-hf1.lib.sfu.ca:9997 for the curious), but the domain of every link within that page is changed to localhost, including links to images and CSS, so nothing loads correctly and all of the links are broken.

I've googled around and found some people who appear to be having this issue with WP and Drupal, but nothing makes reference to a system-wide setting. I have a faint memory that this might have something to do with mod_rewrite, but I'm pretty well stumped. This is on a stock install of 12.04 with apt-get install lamp-server^ and nothing else provided. On the assumption that this may well be a system-wide issue and not a Fascinator issue -- mind weighing in?

Thanks!

--
You received this message because you are subscribed to the Google Groups "The Fascinator Developer's List" group.
To post to this group, send an email to the-fasci...@googlegroups.com.
To unsubscribe from this group, send email to the-fascinator-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/the-fascinator-dev/-/QCaP789-knYJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Cheers, 


Duncan 


Duncan Dickinson 

QCIF Project Manager 

Central Queensland University 

My contact details:

ph: 07 3138 2084

m: 0432 402 511

skype: de.dickinson

website calendar | LinkedIn

Project involvement

ReDBox (Research Data Box)

TERN Central Portal

Tropical Data Hub


Developer? Check out dev8D-AU at 
 http://dev8dau.info/



Peter Sefton

unread,
Oct 22, 2012, 10:48:59 PM10/22/12
to the-fasci...@googlegroups.com
HI Alex,

I think that's config, from memory you need to change the URL in a few places, not sure if it's in system_config or in the batch files that start the system, what's happening is that the fascinator is adding the root URL to all links. I can have a look later on if that's not enough of a hint.

Peter
Peter Sefton +61410326955 p...@ptsefton.com http://ptsefton.com
Gmail, Twitter & Skype name: ptsefton


Peter Sefton

unread,
Oct 22, 2012, 10:55:25 PM10/22/12
to the-fasci...@googlegroups.com
Assuming you installed it using the instructions for running trunk then you will have a tf.sh script somewhere eg /opt/thefascinator/code and system-config ~/.fascinator - look in those directories. I don't have an install to hand to check now.



On Tue, Oct 23, 2012 at 10:42 AM, Alex Garnett <axf...@gmail.com> wrote:
Afraid that's not something I'm familiar with, but I imagine it's something I'll want to become familiar with, as grepping for "localhost:" finds quite a few instances within various config files (e.g. /common/src/main/resources/system-config.json), and while I may be missing something, I'm certain I don't want to change all of those if they're hardcoded.

I still can't help but feel as though I shouldn't be having this trouble if no one else is, though...


On Monday, October 22, 2012 2:52:50 PM UTC-7, Duncan Dickinson wrote:
Hi Alex,

Certainly not a full answer but would mod_proxy be another option? We tend to use that with ReDBox and Mint (which run on Fascinator).

Cheers,

Duncan

On Tue, Oct 23, 2012 at 7:49 AM, Alex Garnett <axf...@gmail.com> wrote:
Hi folks,

Alex here, Data Curator at Simon Fraser University in Vancouver, Canada. I saw Peter Sefton give a talk on The Fascinator a couple of years ago and was very impressed; now have a chance to try to put it into production at SFU. Got it working no problem on a local machine, but am having a very stupid problem getting it up and running on one of our servers. Specifically, after install, I can access the application through a public IP (lib-hf1.lib.sfu.ca:9997 for the curious), but the domain of every link within that page is changed to localhost, including links to images and CSS, so nothing loads correctly and all of the links are broken.

I've googled around and found some people who appear to be having this issue with WP and Drupal, but nothing makes reference to a system-wide setting. I have a faint memory that this might have something to do with mod_rewrite, but I'm pretty well stumped. This is on a stock install of 12.04 with apt-get install lamp-server^ and nothing else provided. On the assumption that this may well be a system-wide issue and not a Fascinator issue -- mind weighing in?

Thanks!

--
You received this message because you are subscribed to the Google Groups "The Fascinator Developer's List" group.
To post to this group, send an email to the-fasci...@googlegroups.com.

To unsubscribe from this group, send email to the-fascinator-dev+unsub...@googlegroups.com.

To view this discussion on the web, visit https://groups.google.com/d/msg/the-fascinator-dev/-/QCaP789-knYJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Cheers, 


Duncan 


Duncan Dickinson 

QCIF Project Manager 

Central Queensland University 

My contact details:

ph: 07 3138 2084

m: 0432 402 511

skype: de.dickinson

website calendar | LinkedIn

Project involvement

ReDBox (Research Data Box)

TERN Central Portal

Tropical Data Hub


Developer? Check out dev8D-AU at 
 http://dev8dau.info/



--
You received this message because you are subscribed to the Google Groups "The Fascinator Developer's List" group.
To post to this group, send an email to the-fasci...@googlegroups.com.
To unsubscribe from this group, send email to the-fascinator-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/the-fascinator-dev/-/xAnNv2lF6QEJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Shilo

unread,
Oct 22, 2012, 11:16:40 PM10/22/12
to the-fasci...@googlegroups.com
Did you set "configured": "true" in system-config.json? It seems like it isn't from the error message. If you did, please check that you are editing the right config file as Peter indicated below.

Happy hunting,
Shilo

On Oct 23, 2012, at 13:00, Alex Garnett <axf...@gmail.com> wrote:

Thanks for jumping in, Peter. I was able to find a walk-through of yours, having configured mod_proxy for the Fascinator, here: http://jiscpub.blogs.edina.ac.uk/2011/07/15/the-repository-is-watching-automated-harvesting-from-replicated-filesystems-2/

But as you can see from the below link, it doesn't seem to be doing the trick for me: http://lib-hf1.lib.sfu.ca:9997/portal/default/home

If in fact the thing to do is to change the hardcoded URL in a few places, I can do that. I was just disheartened after having done it in system_config and finding that the problem persisted, and grepping for it afterwards made me feel like I was taking the wrong tack there. I'll have another go at that route.

On Monday, October 22, 2012 7:55:26 PM UTC-7, Peter Sefton wrote:
Assuming you installed it using the instructions for running trunk then you will have a tf.sh script somewhere eg /opt/thefascinator/code and system-config ~/.fascinator - look in those directories. I don't have an install to hand to check now.

On Tue, Oct 23, 2012 at 10:42 AM, Alex Garnett <axf...@gmail.com> wrote:
Afraid that's not something I'm familiar with, but I imagine it's something I'll want to become familiar with, as grepping for "localhost:" finds quite a few instances within various config files (e.g. /common/src/main/resources/system-config.json), and while I may be missing something, I'm certain I don't want to change all of those if they're hardcoded.

I still can't help but feel as though I shouldn't be having this trouble if no one else is, though...


On Monday, October 22, 2012 2:52:50 PM UTC-7, Duncan Dickinson wrote:
Hi Alex,

Certainly not a full answer but would mod_proxy be another option? We tend to use that with ReDBox and Mint (which run on Fascinator).

Cheers,

Duncan

On Tue, Oct 23, 2012 at 7:49 AM, Alex Garnett <axf...@gmail.com> wrote:
Hi folks,

Alex here, Data Curator at Simon Fraser University in Vancouver, Canada. I saw Peter Sefton give a talk on The Fascinator a couple of years ago and was very impressed; now have a chance to try to put it into production at SFU. Got it working no problem on a local machine, but am having a very stupid problem getting it up and running on one of our servers. Specifically, after install, I can access the application through a public IP (lib-hf1.lib.sfu.ca:9997 for the curious), but the domain of every link within that page is changed to localhost, including links to images and CSS, so nothing loads correctly and all of the links are broken.

I've googled around and found some people who appear to be having this issue with WP and Drupal, but nothing makes reference to a system-wide setting. I have a faint memory that this might have something to do with mod_rewrite, but I'm pretty well stumped. This is on a stock install of 12.04 with apt-get install lamp-server^ and nothing else provided. On the assumption that this may well be a system-wide issue and not a Fascinator issue -- mind weighing in?

Thanks!

--
You received this message because you are subscribed to the Google Groups "The Fascinator Developer's List" group.
To post to this group, send an email to the-fasci...@googlegroups.com.

To unsubscribe from this group, send email to the-fascinator-dev+unsubscribe@googlegroups.com.

To view this discussion on the web, visit https://groups.google.com/d/msg/the-fascinator-dev/-/QCaP789-knYJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Cheers, 


Duncan 


Duncan Dickinson 

QCIF Project Manager 

Central Queensland University 

My contact details:

ph: 07 3138 2084

m: 0432 402 511

skype: de.dickinson

website calendar | LinkedIn

Project involvement

ReDBox (Research Data Box)

TERN Central Portal

Tropical Data Hub


Developer? Check out dev8D-AU at 
 http://dev8dau.info/



--
You received this message because you are subscribed to the Google Groups "The Fascinator Developer's List" group.
To post to this group, send an email to the-fasci...@googlegroups.com.
To unsubscribe from this group, send email to the-fascinator-dev+unsub...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/the-fascinator-dev/-/xAnNv2lF6QEJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Peter Sefton +61410326955 p...@ptsefton.com http://ptsefton.com
Gmail, Twitter & Skype name: ptsefton


--
You received this message because you are subscribed to the Google Groups "The Fascinator Developer's List" group.
To post to this group, send an email to the-fasci...@googlegroups.com.
To unsubscribe from this group, send email to the-fascinator-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/the-fascinator-dev/-/G6mJORc3MY0J.

Greg Pendlebury

unread,
Oct 23, 2012, 2:34:11 AM10/23/12
to the-fasci...@googlegroups.com

Sorry, quick notes on the bus:

1) The file you found with grep looks like the default file in the src tree. This gets deployed to your ~/.fascinator folder if it is not found there during startup. So that is the file you want to be editing.

2) this deploy/build pattern is for development. There a few other patterns used by downstream projects like redbox that may be more server/prod friendly.

3) that problem in particular is most definitely config. The application is aware of the URL it is supposed to present to the world and uses it when rendering content. I'm sorry to say it came from me and it has bitten a number of people. It was to allow the jvm to gracefully live behind an IIS server that was screwing with http headers... a scenario that has never come again :(

Ta,
Greg

==========
"Sent from Ye Olde mobile device. Forgive my fat fingers and their typos."

p: +61 2 6262 1228, m: 0403 674 810, e: greg.pe...@gmail.com

Peter Sefton

unread,
Oct 25, 2012, 1:15:09 AM10/25/12
to the-fasci...@googlegroups.com
Well, I cranked up my VM, did  a svn update (not the latest git code) rebuilt, edited the ~/.fascinator/syste,-config.json file so that all the URLs reflect the new address (http://115.146.92.199/) and it worked, so I think that means that if you have installed things in the standard way for development as I understand it then there should be only one file to change. Not sure where else you could look. Have you tried "./tf.sh rebuild"?

On Wed, Oct 24, 2012 at 6:05 AM, Alex Garnett <axf...@gmail.com> wrote:
Folks,

While I really do appreciate that I've seemingly gotten the whole team to come out within about twelve hours of one another, I don't seem to be any good at troubleshooting this -- I've set configured to true in the main system-config.json, removed /.fascinator from my home directory, executed the following command to sniff out any other troubling instances of localhost being hardcoded, and I still can't fix it.

find . -type f -print0 | xargs -0 sed -i 's/localhost\:9997\/portal/lib-hf1.lib.sfu.ca\:9997\/portal/g'

Any ideas? I know it's partially my fault as the code I'm using isn't meant for prod, but it's working beautifully on a local machine...
To view this discussion on the web, visit https://groups.google.com/d/msg/the-fascinator-dev/-/xAnNv2lF6QEJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Peter Sefton +61410326955 p...@ptsefton.com http://ptsefton.com
Gmail, Twitter & Skype name: ptsefton


--
You received this message because you are subscribed to the Google Groups "The Fascinator Developer's List" group.
To post to this group, send an email to the-fasci...@googlegroups.com.
To unsubscribe from this group, send email to the-fascinator-dev+unsub...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/the-fascinator-dev/-/G6mJORc3MY0J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "The Fascinator Developer's List" group.
To post to this group, send an email to the-fasci...@googlegroups.com.
To unsubscribe from this group, send email to the-fascinator-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "The Fascinator Developer's List" group.
To post to this group, send an email to the-fasci...@googlegroups.com.
To unsubscribe from this group, send email to the-fascinator-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/the-fascinator-dev/-/J6FHEoZtj4YJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages