[ckan-dev] ...not allowed by Access-Control-Allow-Origin, even though resource_proxy is enabled.
Dominik Moritz
dominik.moritz at okfn.org
Tue Aug 13 09:26:56 UTC 2013
I think there is a difference between the ports that can be accessed from the outside (incoming) and ports that you want to access (outgoing). I was wrong when I said you need to open port 80 because that's the port for incoming connections. According to https://en.wikipedia.org/wiki/Port_(computer_networking)#Common_port_numbers and if I understand it correctly, random ports are used for outgoing connections which means you need to open more than one port.
On 13 Aug 2013, at 08:09, Henrik Aagaard Sørensen <BU1G at tmf.kk.dk> wrote:
> Port 80 is open, however, port 8080 is not. Apache is running on port 8080 and nginx on 80.
>
>
> -----Oprindelig meddelelse-----
> Fra: ckan-dev-bounces at lists.okfn.org [mailto:ckan-dev-bounces at lists.okfn.org] På vegne af Dominik Moritz
> Sendt: 9. august 2013 18:31
> Til: CKAN Development Discussions
> Emne: Re: [ckan-dev] ...not allowed by Access-Control-Allow-Origin, even though resource_proxy is enabled.
>
> Hey,
>
> On 9 Aug 2013, at 12:50, Henrik Aagaard Sørensen <BU1G at tmf.kk.dk> wrote:
>
>> I do seem to have trouble downloading the file.
>>
>> Do you have some sort of list of which ports (etc.) should be open, which I can forward to the department who takes care of this?
>
> I guess it's mostly port 80.
>
>> Perhaps that could solve the issue I also have with the DataStorer not being able to retrieve URLs for storing.
>
> Probably, yes.
>
>> Regards,
>> Henrik
>>
>>
>> -----Oprindelig meddelelse-----
>> Fra: ckan-dev-bounces at lists.okfn.org
>> [mailto:ckan-dev-bounces at lists.okfn.org] På vegne af Dominik Moritz
>> Sendt: 9. august 2013 12:39
>> Til: CKAN Development Discussions
>> Emne: Re: [ckan-dev] ...not allowed by Access-Control-Allow-Origin, even though resource_proxy is enabled.
>>
>> Hey,
>>
>> On 9 Aug 2013, at 12:23, Henrik Aagaard Sørensen <BU1G at tmf.kk.dk> wrote:
>>
>>> Hey,
>>>
>>> Thanks for all your research in the problem we're having.
>>>
>>> Could it be a simple matter of closed ports on a firewall?
>>
>> Yes. Can you try to access the file from the server (i.e. with curl)?
>>
>>>
>>> I'm running the server, however, I'm not in control of the firewall and other "public" internet setup of the server.
>>>
>>> Thank you for your comment on a great site :) We are working a lot on getting it ready for the public to use.
>>
>> Great :-)
>>
>> In case your instance is not on http://ckan.org/instances/ yet, we'd love to add it. Just make a pull request to https://github.com/okfn/ckan-instances/ with the data about your instance.
>>
>>>
>>> Cheers,
>>> Henrik
>>>
>>> -----Oprindelig meddelelse-----
>>> Fra: ckan-dev-bounces at lists.okfn.org
>>> [mailto:ckan-dev-bounces at lists.okfn.org] På vegne af Dominik Moritz
>>> Sendt: 9. august 2013 12:07
>>> Til: CKAN Development Discussions
>>> Emne: Re: [ckan-dev] ...not allowed by Access-Control-Allow-Origin, even though resource_proxy is enabled.
>>>
>>> Hey,
>>>
>>> In case you are interested in the source code, you can find the interesting part at [1].
>>>
>>> What surprises me is that I get a `504 Gateway Time-out` error from nginx. However, the file is not very large (just 351k) and works perfectly fine in my local CKAN and on demo [2]. I don't think that an increased timeout will help since the file is small. Hopefully the 2.0.2/2.1 release will the issue.
>>>
>>> Cheers,
>>> Dominik
>>>
>>> [1]
>>> https://github.com/okfn/ckanext-spatial/blob/master/ckanext/spatial/p
>>> u
>>> blic/js/geojson_preview.js#L32 [2]
>>> http://demo.ckan.org/dataset/geojson-dk/resource/12916ca8-27f0-4e8b-b
>>> 3
>>> 66-8c1f50a9bd12
>>>
>>> On 9 Aug 2013, at 11:44, Adrià Mercader <adria.mercader at okfn.org> wrote:
>>>
>>>> Hi Henrik,
>>>>
>>>> Ignore the Access-Control-Allow-Origin error, this is caused because
>>>> the way the GeoJSON preview is implemented it tries to do a CORS
>>>> request first before trying the resource proxy. See eg
>>>> http://demo.ckan.org/dataset/test-ntest/resource/bccc8d4e-e8bc-4248-
>>>> 9
>>>> 1
>>>> ff-63ba1528d1d4 where you also get the error but the file is loaded
>>>> fine.
>>>>
>>>> I suspect there is a problem on the proxying itself. Does this
>>>> happen on large GeoJSON files or on all of them?
>>>>
>>>> Next versions of CKAN due on Tuesday (2.0.2 and 2.1) add support for
>>>> streaming on the resource proxy [1], perhaps that will help although
>>>> I'm not entirely familiar with this part of the code, Dominik may
>>>> know more about it.
>>>>
>>>> You could also try to increase the timeout limit on nginx.
>>>>
>>>> Hope this helps,
>>>>
>>>> Adrià
>>>>
>>>> p.d. Great site btw!
>>>>
>>>> [1] https://github.com/okfn/ckan/pull/989
>>>>
>>>> On 8 August 2013 07:45, Henrik Aagaard Sørensen <BU1G at tmf.kk.dk> wrote:
>>>>> I get the following error:
>>>>>
>>>>>
>>>>>
>>>>> XMLHttpRequest cannot load
>>>>> http://wfs-kbhkort.kk.dk/k101/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=k101:groenne_cykelruter&outputFormat=json&SRSNAME=EPSG:4326.
>>>>> Origin http://data.kk.dk is not allowed by Access-Control-Allow-Origin.
>>>>>
>>>>>
>>>>>
>>>>> Even though resource_proxy is enabled, which results in gateway
>>>>> timeout (hopefully).
>>>>>
>>>>>
>>>>>
>>>>> The site is on
>>>>> http://data.kk.dk/dataset/gronne-cykelruter/resource/8d64d2e0-00d1-
>>>>> 4
>>>>> f
>>>>> f4-a36d-4f0a34949576
>>>>>
>>>>>
>>>>>
>>>>> Can anyone help me out on how to solve the issue?
>>>>>
>>>>>
>>>>>
>>>>> This is the error-log:
>>>>>
>>>>> [Thu Aug 08 08:44:38 2013] [error] [client 127.0.0.1] mod_wsgi (pid=1669):
>>>>> Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
>>>>>
>>>>> [Thu Aug 08 08:44:38 2013] [error] [client 127.0.0.1] IOError:
>>>>> failed to write data
>>>>>
>>>>> [Thu Aug 08 08:44:38 2013] [error] 2013-08-08 08:44:38,254 INFO
>>>>> [ckan.lib.base] /api/i18n/da render time 0.027 seconds
>>>>>
>>>>> [Thu Aug 08 08:44:38 2013] [error] 2013-08-08 08:44:38,401 INFO
>>>>> [ckanext.resourceproxy.controller] Proxify resource
>>>>> 8d64d2e0-00d1-4ff4-a36d-4f0a34949576
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> ckan-dev mailing list
>>>>> ckan-dev at lists.okfn.org
>>>>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>>>>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>>>>>
>>>
>>> Dominik Moritz
>>> CKAN developer | skype: d.moritz | @doobly_doo The Open Knowledge
>>> Foundation Empowering through Open Knowledge http://okfn.org/ |
>>> @okfn | http://ckan.org | @CKANproject
>>>
>>>
>>> _______________________________________________
>>> ckan-dev mailing list
>>> ckan-dev at lists.okfn.org
>>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>>
>> Dominik Moritz
>> CKAN developer | skype: d.moritz | @doobly_doo The Open Knowledge
>> Foundation Empowering through Open Knowledge http://okfn.org/ |
>> @okfn | http://ckan.org | @CKANproject
>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
> Dominik Moritz
> CKAN developer | skype: d.moritz | @doobly_doo The Open Knowledge Foundation Empowering through Open Knowledge http://okfn.org/ | @okfn | http://ckan.org | @CKANproject
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
Dominik Moritz
CKAN developer | skype: d.moritz | @doobly_doo
The Open Knowledge Foundation
Empowering through Open Knowledge
http://okfn.org/ | @okfn | http://ckan.org | @CKANproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130813/05dab635/attachment-0001.sig>
More information about the ckan-dev
mailing list