[Wikidata-bugs] [Maniphest] [Commented On] T184274: Using the API in the wikibase container with or without https.

2018-01-13 Thread Andrawaag
Andrawaag added a comment.
I have two instances running. One locally on my macbook, the other at http://185.54.115.189:8181/. The varnish message came from the localhost instance. In both cases, the docker images worked "out of the box". However, I can't  I can't find a log file :(

The varnish message came from a localhost instance on my macbook.

I dived in the bot code and was able to disable the https feature. By doing so the bot was able to write to the http://185.54.115.189:8181. So it indeed seemed to be an issue with the bot.

Here is the code used: https://gist.github.com/andrawaag/737ece3f4f7d3e63715a0ecd7f9fb725

http://185.54.115.189:8181 is a sandbox, so feel free to test drive.TASK DETAILhttps://phabricator.wikimedia.org/T184274EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: AndrawaagCc: Addshore, Aklapper, Andrawaag, Wikidata-bugs___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T184274: Using the API in the wikibase container with or without https.

2018-01-08 Thread Addshore
Addshore added a comment.
So, I'm still getting a bit confused by why "varnish" comes up in your first error output and trying to work out how that fits into the equation?
Was that exact log message on AWS? Do you have a varnish instance setup somewhere? Is this AWS instance publicly accessible so that I can make a request to it?

When the image is running on a computer connected to a LAN that supports ipv6 or when the docker image is running on a cloud image (e.g. Amazon's ec2) I am not able to run a bot against it.

How are you setting up the container? Are you using docker compose? Could you paste the snippet of the docker compose file you are using for the container?

By default the base php-apache image only exposes port 80

$ docker inspect fa58d7d387a3 |grep -A 5 ExposedPorts
"ExposedPorts": {
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,

Perhaps the mediawiki image beneath the wikibase image should also expose port 443? I'm not really sure what other images do, but looking at wordpress, they also only expose port 80 here.

If the image / wikibase needs to behind https then either you need to setup a proxy which i think is half described in https://stackoverflow.com/questions/42901014/wordpress-inside-docker-container-behind-nginx-proxy-with-ssl for wordpress.
Or you can alter the apache setup in the wikibase container to also listen on port 443, and have ssl and https setup and expose the new port.

I am not able to run a bot against it

What bot code are you trying to run? Perhaps it is actually an issue with the bot?TASK DETAILhttps://phabricator.wikimedia.org/T184274EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: AddshoreCc: Addshore, Aklapper, Andrawaag, Wikidata-bugs___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T184274: Using the API in the wikibase container with or without https.

2018-01-06 Thread Andrawaag
Andrawaag added a comment.
When the docker image is running on a machine without an ipv6 address I am able to populate that instance with data through its API; (http://127.0.0.1:8181/w/api.php). When the image is running on a computer connected to a LAN that supports ipv6 or when the docker image is running on a cloud image (e.g. Amazon's ec2) I am not able to run a bot against it. I then get the error message that HTTPS is required:

"Error: 403, Insecure Request Forbidden - use HTTPS -"TASK DETAILhttps://phabricator.wikimedia.org/T184274EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: AndrawaagCc: Addshore, Aklapper, Andrawaag, Wikidata-bugs___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T184274: Using the API in the wikibase container with or without https.

2018-01-06 Thread Addshore
Addshore added a comment.
It looks like the base image (php with apache) only exposes port 80 https://github.com/docker-library/php/blob/32313ea407379d70259e14414ec8aa0311c0a4c4/7.1/jessie/apache/Dockerfile#L245

So it looks like https & port 443 are not supported using just the wikibase image.

https://stackoverflow.com/a/46648967/4746236 seems to contain the steps that would need to be added to the image in order to support https.

Do you have this container setup behind some varnish caches? I'm not quite sure what I am looking at.

Is it possible to disable this HTTPS requirement

What requirement?TASK DETAILhttps://phabricator.wikimedia.org/T184274EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: AddshoreCc: Addshore, Aklapper, Andrawaag, Wikidata-bugs___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs