Closed trajakovic closed 6 years ago
Me too @calh I get "invalid credentials" and I checked the apache config and it's Ok. I'll let you know if I have any news.
If anyone cares to mess around with mine, here are some rough steps to recreate the issue:
$ docker run -ti --name 411 -p 8080:80 --hostname try_something \
-v ~/411_data:/data calh/etsy_411
# on first run it'll run the data migration tools to construct the
# sqlite db in your home dir
$ sqlite3 ~/411_data/data.db
sqlite> update sites set host='try_something_else' where site_id=1;
In the docker container's /var/log/apache2/error.log I get:
[:error] [pid 8] [client 192.168.74.14:25700] except [NONE]
FOO\\UnauthorizedException: "Invalid nonce specified"
at [/var/www/411/phplib/REST.php:101] 0:[FOO\\REST->route()
called at [/var/www/411/htdocs/api/login.php:6]]
Most of the time, the 'Invalid nonce specified' error means the 411sess
cookie isn't being set correctly. Can you check whether the header is being sent? Another thing you can check is whether HOST/api/data
shows the expected hostname value in the JSON it returns.
I've uploaded a release of 411. Hopefully that helps efforts here (there are less setup steps).
Hey @calh, I had the same problem and it ended up being because the domain of the cookie in the response header was the Docker machine's hostname, which didn't match the domain I was hitting with my browser (localhost). I worked around it by adding the line 127.0.0.1 try_something
to my /etc/hosts
file (where try_something
is the hostname of the Docker machine).
Hey @calh i have got a working version for you if you need it. Can send it to you. I use docker-compose for creating the image and running it.
@ChristiaanDouma, sure! I've been side tracked on a ton of other stuff and haven't had a chance to get back to working on 411.
@ChristiaanDouma would you share it please?
Just a fast version. Quick overview:
@ChristiaanDouma I am trying the steps you listed above. When I try to run step # 6 (run bin/create_sites.php (with port)), I get the following error: `PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1 no such table: users in /var/www/411/phplib/DB.php:81 Stack trace:
thrown in /var/www/411/phplib/DB.php on line 81 PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1 no such table: config in /var/www/411/phplib/DB.php:81 Stack trace:
value
...')value
...', Array, 1)thrown in /var/www/411/phplib/DB.php on line 81`
Looks like the tables do not exist. Could you let me know how to set them up?
Thanks
Looks like the data.db is missing. This could be one of three things
Thanks @ChristiaanDouma for the quick response. Up to step #5, everything ran fine. I have /tmp directory in the container and the contents are: root@44592e990782:/tmp# ls -all total 36 drwxr-xr-x 1 nxtgen staff 306 Feb 15 17:22 . drwxr-xr-x 81 root root 4096 Feb 15 17:19 .. -rw-r--r-- 1 nxtgen staff 6148 Feb 15 17:22 .DS_Store -rwxr-xr-x 1 nxtgen staff 482 Nov 16 04:32 411.conf -rwxr-xr-x 1 nxtgen staff 982 Nov 15 18:49 411_crontab -rwxr-xr-x 1 nxtgen staff 481 Nov 16 04:31 411_ssl.conf -rwxr-xr-x 1 nxtgen staff 3282 Oct 4 15:08 Graphite.php -rwxr-xr-x 1 nxtgen staff 687 Nov 16 04:17 docker-entrypoint.sh -rwxr-xr-x 1 nxtgen staff 335 Nov 15 15:26 ports.conf
As you can see, it doesn't have data.db file. I don't see it in the /var/www/411 either. Where do I need to copy it from?
Step 4 set a mount ((/tmp) from the docker container to your host vm ($PWD/centos7-nxtgen-411/artifacts/)
Step 5 to 7 create the data.db file. Step 8 copies the file to /tmp so makes it available to the host VM at $PWD/centos7-nxtgen-411/artifacts/
When running docker-compose on step 11 it will use your created data.db file from the host (check the docker-compose.yml under volumes)
It worked. I was missing sqlite3 data.db < db.sql
I get the following error now when I run step#11 (docker-compose up)
Starting dockeretsy411_elasticsearch-central_1
ERROR: for elasticsearch-central rpc error: code = 2 desc = "oci runtime error: could not synchronise with container process: not a directory" Attaching to
Any ideas?
Hmm, it uses also elasticsearch in a docker container. It's missing the config file of elasticsearch. So either you create one of connect to a elastic search cluster you already have.
@calh I'm going to take a stab at finishing up Docker support for 411. Have you hit any new problems during set up that I should keep in mind when working on this?
@kiwiz that'd be awesome. I've been so busy with other stuff I haven't had a chance to get back to trying 411 in Docker again. I needed an ELK paging system that I could fire up and get working right away, so I've been using Bosun. But I'm excited to try out the features in 411!
A docker image has been set up here: https://hub.docker.com/r/kaiz/411 (Docs coming later)
Please provide docker image for testing 411 locally.
Also, docker-compose would be nice.