ipfspics / ipfspics-server

Content-addressable, peer-to-peer method of storing and sharing images on the internet.
https://ipfs.pics
GNU Affero General Public License v3.0
1.12k stars 110 forks source link

HTTP Error 500 when trying to upload #55

Open michaeldeborst opened 6 years ago

michaeldeborst commented 6 years ago

I wanted to play around with this project so I tried deploying it in a separate VM running docker & docker-compose. When I go to the page it loads the ipfspics homepage(without any of the logos). Later when I try to upload a picture it gives me HTTP Error 500. I also tried deploying to heroku which gives me the same result.

This is the Log on startup: WARNING: The IPFSPICS_DB variable is not set. Defaulting to a blank string. Starting mongo ... done Starting ipfs ... done Starting web ... done Attaching to ipfs, mongo, web ipfs | Changing user to ipfs ipfs | ipfs version 0.4.17 ipfs | Found IPFS fs-repo at /data/ipfs ipfs | Initializing daemon... ipfs | Swarm listening on /ip4/127.0.0.1/tcp/4001 ipfs | Swarm listening on /ip4/172.18.0.2/tcp/4001 ipfs | Swarm listening on /p2p-circuit/ipfs/QmeJpcfafqn4CqFu5pu7SrFT9ggD1VvAFzvHBGh9XVufc4 ipfs | Swarm announcing /ip4/127.0.0.1/tcp/4001 ipfs | Swarm announcing /ip4/172.18.0.2/tcp/4001 ipfs | API server listening on /ip4/0.0.0.0/tcp/5001 ipfs | Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080 ipfs | Daemon is ready mongo | 2018-10-18T11:56:54.210+0000 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none' mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=81f455b0391f mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] db version v4.0.3 mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] git version: 7ea530946fa7880364d88c8d8b6026bbc9ffa48c mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016 mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] allocator: tcmalloc mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] modules: none mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] build environment: mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] distmod: ubuntu1604 mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] distarch: x86_64 mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] target_arch: x86_64 mongo | 2018-10-18T11:56:54.238+0000 I CONTROL [initandlisten] options: { net: { bindIpAll: true } } mongo | 2018-10-18T11:56:54.267+0000 I STORAGE [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'. mongo | 2018-10-18T11:56:54.267+0000 I STORAGE [initandlisten] mongo | 2018-10-18T11:56:54.267+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine mongo | 2018-10-18T11:56:54.267+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem mongo | 2018-10-18T11:56:54.267+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=256M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress), web | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message web | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message mongo | 2018-10-18T11:56:56.361+0000 I STORAGE [initandlisten] WiredTiger message [1539863816:361874][1:0x7f3a35db4a00], txn-recover: Main recovery loop: starting at 4/7168 web | [Thu Oct 18 14:56:56.387319 2018] [core:warn] [pid 7] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run? web | [Thu Oct 18 14:56:56.445193 2018] [mpm_prefork:notice] [pid 7] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations web | [Thu Oct 18 14:56:56.453101 2018] [core:notice] [pid 7] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND' mongo | 2018-10-18T11:56:56.653+0000 I STORAGE [initandlisten] WiredTiger message [1539863816:653330][1:0x7f3a35db4a00], txn-recover: Recovering log 4 through 5 mongo | 2018-10-18T11:56:57.465+0000 I STORAGE [initandlisten] WiredTiger message [1539863817:465623][1:0x7f3a35db4a00], txn-recover: Recovering log 5 through 5 mongo | 2018-10-18T11:56:57.589+0000 I STORAGE [initandlisten] WiredTiger message [1539863817:589187][1:0x7f3a35db4a00], txn-recover: Set global recovery timestamp: 0 mongo | 2018-10-18T11:56:58.370+0000 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0) mongo | 2018-10-18T11:56:58.473+0000 I CONTROL [initandlisten] mongo | 2018-10-18T11:56:58.474+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. mongo | 2018-10-18T11:56:58.476+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted. mongo | 2018-10-18T11:56:58.477+0000 I CONTROL [initandlisten] mongo | 2018-10-18T11:56:58.478+0000 W CONTROL [initandlisten] mongo | 2018-10-18T11:56:58.479+0000 W CONTROL [initandlisten] mongo | 2018-10-18T11:56:58.479+0000 I CONTROL [initandlisten] mongo | 2018-10-18T11:56:58.579+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data' mongo | 2018-10-18T11:56:58.643+0000 I NETWORK [initandlisten] waiting for connections on port 27017

This gets added to that when I access the page and try to upload a photo:

web | 192.168.2.119 - - [18/Oct/2018:14:58:24 +0300] "GET / HTTP/1.1" 200 2485 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" web | 192.168.2.119 - - [18/Oct/2018:14:58:24 +0300] "GET /cover.css HTTP/1.1" 404 504 "http://192.168.2.128:5000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" web | 192.168.2.119 - - [18/Oct/2018:14:58:25 +0300] "GET /static/common.js HTTP/1.1" 200 1483 "http://192.168.2.128:5000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" web | 192.168.2.119 - - [18/Oct/2018:14:58:25 +0300] "GET /static/cover.css HTTP/1.1" 200 2913 "http://192.168.2.128:5000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" web | [Thu Oct 18 14:58:25.133493 2018] [php7:error] [pid 12] [client 192.168.2.119:63926] PHP Fatal error: Uncaught MongoDB\\Driver\\Exception\\ConnectionTimeoutException: No suitable servers found (serverSelectionTryOnceset): [connection refused calling ismaster on 'localhost:27017'] in /var/www/html/vendor/mongodb/mongodb/src/Collection.php:645\nStack trace:\n#0 /var/www/html/vendor/mongodb/mongodb/src/Collection.php(645): MongoDB\\Driver\\Manager->selectServer(Object(MongoDB\\Driver\\ReadPreference))\n#1 /var/www/html/app/picture.php(48): MongoDB\\Collection->findOne(Array)\n#2 {main}\n thrown in /var/www/html/vendor/mongodb/mongodb/src/Collection.php on line 645, referer: http://192.168.2.128:5000/ web | [Thu Oct 18 14:58:25.134864 2018] [php7:error] [pid 10] [client 192.168.2.119:63925] PHP Fatal error: Uncaught MongoDB\\Driver\\Exception\\ConnectionTimeoutException: No suitable servers found (serverSelectionTryOnceset): [connection refused calling ismaster on 'localhost:27017'] in /var/www/html/vendor/mongodb/mongodb/src/Collection.php:645\nStack trace:\n#0 /var/www/html/vendor/mongodb/mongodb/src/Collection.php(645): MongoDB\\Driver\\Manager->selectServer(Object(MongoDB\\Driver\\ReadPreference))\n#1 /var/www/html/app/picture.php(48): MongoDB\\Collection->findOne(Array)\n#2 {main}\n thrown in /var/www/html/vendor/mongodb/mongodb/src/Collection.php on line 645, referer: http://192.168.2.128:5000/ web | 192.168.2.119 - - [18/Oct/2018:14:58:25 +0300] "GET /ipfs/QmdixSJTJWUFuxctcRtHfrxqUqVKcrpyrWjFoojFSZkTZL HTTP/1.1" 500 185 "http://192.168.2.128:5000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" web | 192.168.2.119 - - [18/Oct/2018:14:58:25 +0300] "GET /ipfs/QmNvuHJbTHafrABhitFcQ5srv7FeCfHr6jFiyoHhuRh8wK HTTP/1.1" 500 185 "http://192.168.2.128:5000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" web | [Thu Oct 18 14:58:26.034115 2018] [php7:error] [pid 9] [client 192.168.2.119:63923] PHP Fatal error: Uncaught MongoDB\\Driver\\Exception\\ConnectionTimeoutException: No suitable servers found (serverSelectionTryOnceset): [connection refused calling ismaster on 'localhost:27017'] in /var/www/html/vendor/mongodb/mongodb/src/Collection.php:645\nStack trace:\n#0 /var/www/html/vendor/mongodb/mongodb/src/Collection.php(645): MongoDB\\Driver\\Manager->selectServer(Object(MongoDB\\Driver\\ReadPreference))\n#1 /var/www/html/app/picture.php(48): MongoDB\\Collection->findOne(Array)\n#2 {main}\n thrown in /var/www/html/vendor/mongodb/mongodb/src/Collection.php on line 645, referer: http://192.168.2.128:5000/ web | 192.168.2.119 - - [18/Oct/2018:14:58:26 +0300] "GET /ipfs/Qmduj4VjKMMWRLwxcrHugxCTWD1cZ66iiKTeW2JGRZtY9u HTTP/1.1" 500 185 "http://192.168.2.128:5000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" web | 192.168.2.119 - - [18/Oct/2018:14:58:26 +0300] "GET /cover.css HTTP/1.1" 404 504 "http://192.168.2.128:5000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" web | [Thu Oct 18 14:58:38.620063 2018] [php7:error] [pid 11] [client 192.168.2.119:63936] PHP Fatal error: Uncaught MongoDB\\Driver\\Exception\\ConnectionTimeoutException: No suitable servers found (serverSelectionTryOnce` set): [connection refused calling ismaster on 'localhost:27017'] in /var/www/html/vendor/mongodb/mongodb/src/Collection.php:645\nStack trace:\n#0 /var/www/html/vendor/mongodb/mongodb/src/Collection.php(645): MongoDB\Driver\Manager->selectServer(Object(MongoDB\Driver\ReadPreference))\n#1 /var/www/html/app/picture.php(48): MongoDB\Collection->findOne(Array)\n#2 {main}\n thrown in /var/www/html/vendor/mongodb/mongodb/src/Collection.php on line 645, referer: http://192.168.2.128:5000/ web | 192.168.2.119 - - [18/Oct/2018:14:58:38 +0300] "GET /ipfs/QmPYVGMVjPSkz6bQaAFChBtigMb4WPGC922tLsZcAe3wvN HTTP/1.1" 500 185 "http://192.168.2.128:5000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" web | 192.168.2.119 - - [18/Oct/2018:14:58:38 +0300] "POST /upload.php HTTP/1.1" 302 294 "http://192.168.2.128:5000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" web | 192.168.2.119 - - [18/Oct/2018:14:58:38 +0300] "GET /QmW3FgNGeD46kHEryFUw1ftEUqRw254WkKxYeKaouz7DJA HTTP/1.1" 500 185 "http://192.168.2.128:5000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"

`

Does anyone know of a way to get this project running for me? I think it's pretty cool and would love to explore it further.

bitxx commented 6 years ago

Me to. Does anyone know of a way to get this project running for me?