Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP code 500 with new (and also existing) installation #67

Closed
njordr opened this issue May 12, 2017 · 21 comments
Closed

HTTP code 500 with new (and also existing) installation #67

njordr opened this issue May 12, 2017 · 21 comments

Comments

@njordr
Copy link

njordr commented May 12, 2017

Hi.

I run the last docker image available attached to an existing database, but it gave me error 500 with redirection to /login

So I tried to run it with a new database, with the same result.

Here is the logs from the new instance:

12/5/2017 12:39:45[12-May-2017 11:39:45] NOTICE: ready to handle connections
12/5/2017 12:44:2510.42.13.198 - - [12/May/2017:11:44:25 +0000] "GET / HTTP/1.1" 302 212 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0"
12/5/2017 12:44:262017/05/12 11:44:26 [error] 225#225: *3 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000]: General error: 1 no such table: wallabag_craue_config_setting in /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:77
12/5/2017 12:44:26Stack trace:
12/5/2017 12:44:26#0 /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(77): PDO->prepare('SELECT t0.name ...', Array)
12/5/2017 12:44:26#1 /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(844): Doctrine\DBAL\Driver\PDOConnection->prepare('SELECT t0.name ...')
12/5/2017 12:44:26#2 /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(712): Doctrine\DBAL\Connection->executeQuery('SELECT t0.name ...', Array, Array)
12/5/2017 12:44:26#3 /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php(196): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load(Array, NULL, NULL, Array, NULL, 1, NULL)
12/5/2017 12:44:26#4 /var/www/wallabag/vendor/craue/config-bundle/Util/Config.php(38): Doctrine\ORM\EntityRepository->findOneBy(Array)
12/5/2017 12:44:26#5 /var/www/wallabag/ven" while reading response header from upstream, client: 10.42.13.198, server: _, request: "GET /login HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "wallabag.syshell.net"
12/5/2017 12:44:2610.42.13.198 - - [12/May/2017:11:44:26 +0000] "GET /login HTTP/1.1" 500 31 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0"
12/5/2017 12:44:262017/05/12 11:44:26 [error] 225#225: *5 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000]: General error: 1 no such table: wallabag_craue_config_setting in /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:77
12/5/2017 12:44:26Stack trace:
12/5/2017 12:44:26#0 /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(77): PDO->prepare('SELECT t0.name ...', Array)
12/5/2017 12:44:26#1 /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(844): Doctrine\DBAL\Driver\PDOConnection->prepare('SELECT t0.name ...')
12/5/2017 12:44:26#2 /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php(712): Doctrine\DBAL\Connection->executeQuery('SELECT t0.name ...', Array, Array)
12/5/2017 12:44:26#3 /var/www/wallabag/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php(196): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load(Array, NULL, NULL, Array, NULL, 1, NULL)
12/5/2017 12:44:26#4 /var/www/wallabag/vendor/craue/config-bundle/Util/Config.php(38): Doctrine\ORM\EntityRepository->findOneBy(Array)
12/5/2017 12:44:26#5 /var/www/wallabag/ven" while reading response header from upstream, client: 10.42.13.198, server: _, request: "GET /login HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "wallabag.syshell.net"
12/5/2017 12:44:2610.42.13.198 - - [12/May/2017:11:44:26 +0000] "GET /login HTTP/1.1" 500 31 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0"
@nicosomb
Copy link
Member

Hello @njordr !

an existing database

What was your previous wallabag version please?

@njordr
Copy link
Author

njordr commented May 12, 2017

Well, I don't remember, but the issue happens also with a fresh installation on an empty database

@xsteadfastx
Copy link
Contributor

We test it with a fresh db on every commit.

So we need more informations. Config and env variables.

@njordr
Copy link
Author

njordr commented May 12, 2017

Attached all the parameters used to start it
screenshot-2017-5-12 rancher

Let me know if you need anything else

@xsteadfastx
Copy link
Contributor

Did you completely removed and recreated the container?

@njordr
Copy link
Author

njordr commented May 13, 2017

Yep, also the database

@nmarjanovic
Copy link

nmarjanovic commented May 15, 2017

Hi @njordr,

Pls check my answer for docker users, maybe will help in your case https://gist.github.com/nicosomb/7c537995f2b845a30b4d6cdf23c1e22c

@njordr
Copy link
Author

njordr commented May 15, 2017

@nmarjanovic I tried the first command, this is the result:
/var/www/wallabag # php bin/console doctrine:migration:execute 20161024212538 -e
=prod
WARNING! You are about to execute a database migration that could result in sche
ma changes and data lost. Are you sure you wish to continue? (y/n)y

++ migrating 20161024212538

Migration 20161024212538 failed during Execution. Error There is no table with n
ame '/var/www/wallabag/app/..wallabag_oauth2_clients' in the schema.

[Doctrine\DBAL\Schema\SchemaException]
There is no table with name '/var/www/wallabag/app/..wallabag_oauth2_client
s' in the schema.

I can confirm the database is empty. Is there a way to create it from command line?

@tcitworld
Copy link
Member

There's a path issue here.

@nmarjanovic
Copy link

@njordr If you are using mysql and not sqlite my solution is not going to help you much, but you can check wallabag/wallabag#2795 how to do same with mysql, and to create db is easy, check https://github.com/wallabag/docker for all information, you can create mysql db and then connect container to it or you can run mysql container and link with wallabag, but think to make data volume on your server if you don't want to lose data etc.. And yep, like @tcitworld said you need to check all path[s].

@xsteadfastx
Copy link
Contributor

I have no idea. I can't reproduce it at all.

@njordr
Copy link
Author

njordr commented Jun 5, 2017

@nmarjanovic I cannot find how to create the db from scratch. The env varibale POPULATE_DATABASE seems not working because the db is still empty.
Any other things to try?

@nmarjanovic
Copy link

@njordr Just check https://github.com/wallabag/docker#mariadb--mysql, that is all

@njordr
Copy link
Author

njordr commented Jun 5, 2017

already done, no luck

@xsteadfastx
Copy link
Contributor

did you have any volumes for the db set?

@njordr
Copy link
Author

njordr commented Jun 6, 2017

yep, /var/lib/mysql

@njordr
Copy link
Author

njordr commented Jun 16, 2017

I found the issue, it doesn't resolve db address

I made a test:

docker run -ti --link r-Databases-mysql-1-1d2b4df6:wallabag-db --network baf17c84fa3d wallabag/wallabag

And in another console:

12:44 [root@arkham:docker] # docker exec -ti admiring_bell sh
/ # telnet wallabag-db 3306
telnet: bad address 'wallabag-db'
/ #

Any bell ringing?

@njordr
Copy link
Author

njordr commented Jun 16, 2017

DNS is not the issue, the container doesn't have an ip:

12:52 [root@arkham:~] # docker inspect admiring_bell | grep IPAddress
            "SecondaryIPAddresses": null,
            "IPAddress": "",
                    "IPAddress": "",
                    "IPAddress": "",

@nsteinmetz
Copy link
Contributor

Is your network correctly defined ? How did you create it ?

docker network inspect baf17c84fa3d

@njordr
Copy link
Author

njordr commented Jun 16, 2017

Seems fine to me, also because it's used by other containers without problems

[
    {
        "Name": "none",
        "Id": "baf17c84fa3da1ac3e1942110458935a6cb5a56aa73b5aec37dc0b2740f88ce8",
        "Created": "2017-05-02T18:38:11.762364274Z",
        "Scope": "local",
        "Driver": "null",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": []
        },
        "Internal": false,
        "Attachable": false,
        "Containers": {
            "00f73d4f1d01e514dd875bd9d17a7253c6f5fda1d433b0041a82c3248ef03e4c": {
                "Name": "r-WebServers-project-1-dc311c7b",
                "EndpointID": "9f5a65ec2f49aa79376ab2ea6bcb81cc0a2766b7cb99036d46ff7805864a291b",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "04280efc5312d008b28a7aae696e631ba14e8df884887e2d2b968fd120f17d67": {
                "Name": "r-healthcheck-healthcheck-1-51c13c97",
                "EndpointID": "76eeeb0af043288ffb077edece718be86e2b4f89180097d9c1ea62aa5fbd26f4",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "054fd2765b5a8949d6a37683acbc171322117b551763440813091890739f3e72": {
                "Name": "r-Databases-postgres-1-eed49799",
                "EndpointID": "8bf3cef3722a4d2ef4bd377c061068353cde037e1c64da49148d82d8c0dfef11",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "224b3d443228913297e116d12a3284263a8561257d52155c40b9dabcdd35d23b": {
                "Name": "r-Databases-mysql-1-1d2b4df6",
                "EndpointID": "41f2f5e6160393d155c2121ab40558d7db18a684a5bdbeca3ca389d73eeea6be",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "245415537eb20c030755c9921e59b64d30534071be1698176c56b66ff5246675": {
                "Name": "r-scheduler-scheduler-1-5b306f47",
                "EndpointID": "ed0b34af4df7d75f4de713f28b490f1f6250b6261de759d3d15f784a404e8fbf",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "36a6a8a9eab13d021d836b681cb95b087057e042189b2c79af6394163c3bce07": {
                "Name": "r-WebServers-lb-websites-1-ad88315d",
                "EndpointID": "486e550e186c52c2238196b9e4b1db4b90c24b17018f5846e4da7b0f1d5a939a",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "42818257b7d31006efa85a493663952988ba53a9909b111fbde073bb815a5c78": {
                "Name": "r-Letsencrypt-letsencrypt-1-c92c2d39",
                "EndpointID": "c7a0a634731e8bfda362a7eff04419720d37c5e93eb07a2a5150463384c2fd8c",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "79435bf7299f6c0774ecf2270a1b0a08c3384606070f2b0ab962f2d73df15f5b": {
                "Name": "r-Utilities-registry-1-8cecae4f",
                "EndpointID": "45ef7dd70b5d00e6711b144aa018ba6538581353d013a0994bc708cdd47cc063",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "8f9622c540b8a60ca4e70ff4b6f4e73293e5b6e6fbb34832200365f170694d49": {
                "Name": "r-WebServers-apache-1-64e9f38c",
                "EndpointID": "9e3862fdb960264c88dd005152acf890909d458c7419917eccf333822676fe47",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "ae8f183eb0afe808cdd328c59150bf5faad22c153a038a667467c1417fb94457": {
                "Name": "r-WebServers-wallabag-1-2eb5ad8d",
                "EndpointID": "6c63e51d377d3e8ac665ffdbe5dd0dc70af994a6a0aadbeb2bc220de9a68cdc2",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "b3ba4842be0cb644fca04971d429fd75d0010fb5897e2c6837a16df9d89b46f9": {
                "Name": "r-Databases-redis-1-37432146",
                "EndpointID": "71bdd6f7ead5629caa17ef5ae409193812082148390f62ed5094eb764333eb3f",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "caeec02b7bf58740ee0df33c6b291370f4eadf88145b757635a60d0b3cb3f25c": {
                "Name": "r-Utilities-postfix-1-ef17ce59",
                "EndpointID": "b9b3504ce15ce9fe17b076684974e12122364d722c5b85cc7d38cf35861a86ee",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "da558e0be4643c09c06ca71a8a32d97cef25eca142cce355defeab2afed8306e": {
                "Name": "admiring_bell",
                "EndpointID": "438568f26a4ed2c5be606838f962a46bea55f855c625f9cd0d4a2b59fdb6d76f",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "dcda0b2e1ec5a9674c26bae688c7b1568efd2535e2cee177a812ec71896bc863": {
                "Name": "r-WebServers-php7-fpm-1-5900a429",
                "EndpointID": "40edad591664b63114752722972e9fdd4c1cfe750cbe0336d2cd92979458b575",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "e3f1acb0e76962216c4e907a35fd4c64d9f1ff0443d5f3470864507355357411": {
                "Name": "r-Utilities-iredmail-1-1c4251d4",
                "EndpointID": "5ec34efe316c83689cdaac862265b691ecb9a9047c732072cccc9772d777ab59",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "ed8a65293484bb483e81f1039c07da3aff637c58121a034ea388911a87ba6f5e": {
                "Name": "r-Utilities-gogs-1-beeabfc7",
                "EndpointID": "876d7ea62bc3bab6ac94a8951ab803ef5cea71fa9eaff581d295f39b697a503c",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "fa0dbed1a0037d3155e4db3e0f50de628cd361d00fde6a151d04d19269f38932": {
                "Name": "r-WebServers-paperwork-1-cf394e8e",
                "EndpointID": "e83d2e8765d82e1f4a69b428e51704f9ed193a4c275e328d4d9f093047386464",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "fe76f404d785155fc0854e0aa76e1150483603e7b9197752ec95b114a28e6c2e": {
                "Name": "r-ipsec-ipsec-1-456514d3",
                "EndpointID": "88ce3d4fab37f2b40aba7c6b0daddf0d6f6b95adb5606583d95a09256b37bdff",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

It was created by rancher

@njordr
Copy link
Author

njordr commented Jun 16, 2017

Seems to happens also with other docker images, so i can close this issue, is not related to wallabag

Thanks anyway

@njordr njordr closed this as completed Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants