Group Details Private

Community Representatives

Users helping the NodeBB team spread the word!

  • RE: Heroku setup error "NodeBB could not connect to your PostgreSQL database"

    @nodebber said in Heroku setup error "NodeBB could not connect to your PostgreSQL database":

    Now configuring postgres database:
    2021-03-08T13:43:36.739Z [23379] - error: NodeBB could not connect to your PostgreSQL database. PostgreSQL returned the following error: no pg_hba.conf entry for host "XXX", user "XXX", database "XXX", SSL off
    2021-03-08T13:43:36.741Z [23379] - warn: NodeBB Setup Aborted.
    error: no pg_hba.conf entry for host "XXX", user "XXX", database "XXX", SSL off

    Is there an entry in pg_hba.conf for the box NodeBB itself is connecting from? Is that SAME box you are able to connect up using pgadmin?

    I do not use heroku so no clue there and since you have obfuscated the IP addresses I am guessing that you may be using externally routable IP, i.e. the one associated w/the dns hostname. If this is all on same vm then maybe you need to add one for localhost and/or 127.0.0.1

    Sorry not to be more helpful. Been a few too many years and I don't have postgres on the tip of my fingers nowadays. Bottom line is to ensure you have an entry in pg_hba.conf for the host NodeBB is connecting FROM. And if that is all on single box/vm, you will likely need one for localhost/127.0.0.1 PostgreSQL is pretty strict about connection security. And rightly so.

    Best of my recollection, anyways. Good luck and have fun. o/

    P.S.; You could also be connecting from a pg socket if on same vm. depending on how pg is configured.

    posted in Technical Support
  • RE: have problem with install on vm

    @nhl-pl said in have problem with install on vm:

    You can also try to replace localhost with 127.0.0.1:4567.
    proxy_pass http://localhost:4567;

    Good catch. 🎖 👍

    Should work with localhost but I also prefer to be explicit and specify localhost via IP address. Of course those nginx log tails would have pointed us thusly a long ways back. Checking log files for errors and warnings are step one in troubleshooting 101. 😈

    posted in Technical Support
  • RE: have problem with install on vm

    Are sure you want it here?
    index index.php index.html index.htm;

    Again.
    root /var/www/html;

    You can also try to replace localhost with 127.0.0.1:4567.
    proxy_pass http://localhost:4567;

    posted in Technical Support
  • RE: have problem with install on vm

    @pitaj said in have problem with install on vm:

    @dark-shy the fix is to update those plugins so they use require.main.require('./src/user') instead of
    Since you cannot access NodeBB on http://your.ip:80, this means that there's something blocking requests into your server. It may be a firewall on your server, or it may be something upstream from that. Do you mind sharing more information about your setup?

    Ah, wait, have we established this? Nginx tail I missed?

    Freakin' snap! Eyes missed this bit from the opening post. Sigh...

    there is no response - 93.95.167.101.

    And I was even looking for it too, earlier when I did those other telnet test. Ho, man!!! 🤦

    telnet 93.95.167.101 80
    Trying 93.95.167.101...
    ^C
    

    Above confirms that your external IP address is not accessible, at least not by general public. Perchance do you have a firewall rule restricting access to only Cloudflare servers?? If not and all incoming requests to port 80 are blocked then we have just pinpointed the problem because if I nor Cloudflare cannot get there... then the proof is pretty much in the pudding that you have a fw rule issue.

    Mind you, you could still additionally have a Cloudflare issue on top of that, but you got to work your way back upstream one link at a time.

    Pitaj very efficiently cut to the chase. I was trying to also teach you how to fish. Hope that helps somebody on down the line.

    Good luck and have fun. Methinks you are almost there. o/

    posted in Technical Support
  • RE: have problem with install on vm

    @dark-shy said in have problem with install on vm:

    Nginx part of log:
    root@darkshy:/etc/nginx# root@darkshy:/etc/nginx# nginx
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
    nginx: [emerg] still could not bind()

    You are trying to start nginx when it is already running. Hence port 80 is already in use. Please drive the following commands:

    systemctl restart nginx
    
    systemctl status nginx
    
    nginx -t
    

    Those should confirm that nginx is running fine.

    nginx -t
    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful
    

    From your paste below, seems like maybe NodeBB is not configured 100% correctly? I did not notice anything amiss in your nginx conf posted above. Is that your entire conf file? And/or something amiss with your nodebb config/installation? Warnings are survivable. Errors may not be. You have a couple where modules are not found:

    2021-03-06T11:24:03.851Z [4567/1511] - error: Error: Cannot find module '/var/www/html/node_modules/nodebb-plugin-soundpack-default'
    
    ........
    
    2021-03-06T11:24:03.929Z [4567/1511] - error: Error: Cannot find module './categories'
    
    ............
    
    2021-03-06T11:24:03.936Z [4567/1511] - error: Error: Cannot find module './user'
    
    .............
    
    2021-03-06T11:24:03.997Z [4567/1511] - error: [plugins/spam-be-gone] Honeypot API Key not set!
    
    ............
    
    2021-03-06T11:24:04.151Z [4567/1511] - error: [plugins/spam-be-gone] Unable to verify Akismet API key.
    

    If you don't have those API keys then those bits should be disabled. In ACP/plugins/spam-be-gone:

    0c70c5cd-c022-4244-9fa6-12f025058b05-image.png

    Uncheck Akismet and Project Honeypot boxes.

    I'll leave pitaj to comment on the modules errors.

    Howesomever: That you receive a response to a curl on the localhost indicates your server is indeed serving up some html - at least locally. So the issue is something amiss with access from your external IP address. Your lsof output indicates your server is listening on port 80 on all network interfaces. So maybe a firewall issue - or maybe cloudflare. We still do not have any nginx log files.

    If you tail your nginx access log and then attempt to access your site from an external source (i.e. not local LAN) then you should see that in your nginx logs. If not, then you have an issue upstream from somewhere.

    If so, then mayhaps you have something wrong with your DNS records:

     drill cp.slainscraft.com
    ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 23888
    ;; flags: qr rd ra ; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 
    ;; QUESTION SECTION:
    ;; cp.slainscraft.com.	IN	A
    
    ;; ANSWER SECTION:
    cp.slainscraft.com.	300	IN	A	104.21.4.78
    cp.slainscraft.com.	300	IN	A	172.67.131.203
    
    ;; AUTHORITY SECTION:
    
    ;; ADDITIONAL SECTION:
    
    ;; Query time: 67 msec
    ;; SERVER: 192.168.27.1
    ;; WHEN: Sat Mar  6 07:18:54 2021
    ;; MSG SIZE  rcvd: 68
    
    

    Are you/cloudflare really serving up your stuff on both of those A record addresses above? I don't use Cloudflare but IF nginx logs indicate you are able to access your box from non local lan addresses, then there is something wrong w/your fw, upstream Cloudflare, and/or DNS configuration.

    Hope this helps you get it sorted. Good luck! o/

    posted in Technical Support
  • RE: have problem with install on vm

    @dark-shy We are not mind readers. And my crystal ball is in need of repairs. Please report the logs and/or info back from my and @PitaJ requests. Else otherwise we are groping about in the dark, spinning our wheels, throwing darts blindfolded, etc., in the hopes of getting lucky.

    Shooting from the hip, my guess based on above is that your issue is cloudflare related. Else why would I be hitting cloudflare but not your server? Or maybe I am? Need logs.

    Have fun!

    posted in Technical Support
  • RE: [nodebb-plugin-makesmart-gallery] - Image Slider for topics

    awesome! managed to grab the first star on your GH repo as well ;D

    posted in NodeBB Plugins