taroved / pol

RSS generator website
MIT License
381 stars 88 forks source link

setup_create_feed(_ext) can't be loaded #21

Closed rguhr closed 6 years ago

rguhr commented 6 years ago

I setup the POL project on my VServer but if I try to create a new feed, I only see the loading circle.

In the nginx access-log I see that the page "setup_create_feed" can't be loaded.

root@VSERVER:~# tailf /var/log/nginx/access.log
11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/js/google-code-prettify/prettify.js HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/js/setup-tool.js HTTP/1.1" 200 15395 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/js/setup-tool-ext.js HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/js/help.js HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/images/apple-touch-icon-precomposed.png HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/images/target48.png HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/images/wrench48.png HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/images/glyphicons-halflings-white.png HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/static/frontend/stylesheets/bootstrap_and_overrides.css.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /downloader?url=https%3A%2F%2Fnetzpolitik.org%2Fcategory%2Fdatenschutz%2F HTTP/1.1" 200 23314 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/images/favicon.ico HTTP/1.1" 200 1150 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:21 +0200] "POST /setup_get_selected_ids HTTP/1.1" 200 212 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:23 +0200] "POST /setup_get_selected_ids HTTP/1.1" 200 298 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"
11.11.11.11 - - [06/Jul/2018:03:19:25 +0200] "POST /setup_create_feed HTTP/1.1" 500 11899 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"

Installed all components exactly as described in the readme file. Only differences:

System is a Ubuntu:16.04. Same happend in a docker container.

taroved commented 6 years ago

Could you give me IP address or domain name of you installation? I need to check out python exception for /setup_create_feed action.

On Fri, Jul 6, 2018 at 4:55 AM, Robért S. Guhr notifications@github.com wrote:

I setup the POL project on my VServer but if I try to create a new feed, I only see the loading circle.

In the nginx access-log I see that the page "setup_create_feed" can't be loaded.

root@VSERVER:~# tailf /var/log/nginx/access.log 11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/js/google-code-prettify/prettify.js HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/js/setup-tool.js HTTP/1.1" 200 15395 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/js/setup-tool-ext.js HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/js/help.js HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/images/apple-touch-icon-precomposed.png HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/images/target48.png HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/images/wrench48.png HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/en/setup?url=https://netzpolitik.org/category/datenschutz/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/images/glyphicons-halflings-white.png HTTP/1.1" 304 0 "http://DOMAIN.TLD:8080/static/frontend/stylesheets/bootstrap_and_overrides.css.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /downloader?url=https%3A%2F%2Fnetzpolitik.org%2Fcategory%2Fdatenschutz%2F HTTP/1.1" 200 23314 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:13 +0200] "GET /static/frontend/images/favicon.ico HTTP/1.1" 200 1150 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:21 +0200] "POST /setup_get_selected_ids HTTP/1.1" 200 212 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:23 +0200] "POST /setup_get_selected_ids HTTP/1.1" 200 298 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52" 11.11.11.11 - - [06/Jul/2018:03:19:25 +0200] "POST /setup_create_feed HTTP/1.1" 500 11899 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.183 Safari/537.36 Vivaldi/1.96.1147.52"

Installed all components exactly as described in the readme file. Only differences:

  • Installed sqlparse in additional (needed for python manage.py migrate )
  • The downloader and frontend server are running as systemd service
  • Nginx is running on port 8080

System is a Ubuntu:16.04. Same happend in a docker container.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/taroved/pol/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/AFASWhRsgUjbuJKsOQNV5exEPmjV6Qz5ks5uDsOBgaJpZM4VExF0 .

rguhr commented 6 years ago

Hi @taroved,

send you the domain and ip via email. Thanks for for taking a look at this :)

rguhr commented 6 years ago

Together with @taroved we were able to find the problem.

It seems that some default values weren't correct interpreted or set by MySQL.

mysql> DESCRIBE frontend_feed;
+----------+---------------+------+-----+---------+----------------+
| Field    | Type          | Null | Key | Default | Extra          |
+----------+---------------+------+-----+---------+----------------+
| id       | int(11)       | NO   | PRI | NULL    | auto_increment |
| uri      | varchar(2000) | NO   |     | NULL    |                |
| xpath    | varchar(2000) | NO   |     | NULL    |                |
| created  | datetime(6)   | NO   |     | NULL    |                |
| edited   | tinyint(1)    | NO   |     | NULL    |                |
| owner_id | int(11)       | YES  | MUL | NULL    |                |
| js       | enum('Y','N') | NO   |     | NULL    |                |
| name     | varchar(255)  | YES  |     | NULL    |                |
+----------+---------------+------+-----+---------+----------------+

owner_id and name should have NULL as default value. This was also the case but if your try to insert something, MySQL complains about not set default values.

mysql> INSERT INTO `frontend_feed` (`uri`, `xpath`, `edited`, `created`) VALUES ('https://www.haskell.org/', '/html/body/div/nav/div/div/ul/li/a', 0, '2018-07-06 18:40:37.537938');
ERROR 1364 (HY000): Field 'name' doesn't have a default value

I had re-set the default values with

ALTER TABLE frontend_feed ALTER name SET DEFAULT NULL;
ALTER TABLE frontend_feed ALTER owner_id SET DEFAULT NULL;

Then it worked to insert something and also to create new feeds via Browser-GUI