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

Isso isn't showing up on my blog anymore #667

Closed
CranberryPie1 opened this issue Aug 20, 2020 · 20 comments
Closed

Isso isn't showing up on my blog anymore #667

CranberryPie1 opened this issue Aug 20, 2020 · 20 comments
Labels
question Something needs clarification.

Comments

@CranberryPie1
Copy link

The service appears to be running, but it appears Isso decided to quit.

$ sudo systemctl status isso

sudo systemctl status isso
● isso.service - Isso Commenting Server
   Loaded: loaded (/etc/systemd/system/isso.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-08-20 04:02:55 UTC; 3ms ago
 Main PID: 1801 (systemd)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/iss

My config:

[general]
dbpath = /var/lib/isso/comments.db
host = https://domain/
max-age = 15m
notify = smtp
log-file = /var/log/isso.log

[moderation]
enabled = false

[server]
listen = http://localhost:1943
reload = off
profile = off

[guard]
enabled = true
ratelimit = 2
direct-reply = 3
reply-to-self = false
require-author = false
require-email = false
Aug 20 04:11:49 cbtree isso[2010]: Traceback (most recent call last):
Aug 20 04:11:49 cbtree isso[2010]:   File "/home/isso/.local/bin/isso", line 7, in <module>
Aug 20 04:11:49 cbtree isso[2010]:     from isso import main
Aug 20 04:11:49 cbtree isso[2010]:   File "/home/isso/.local/lib/python3.6/site-packages/isso/__init__.py", line 60
Aug 20 04:11:49 cbtree isso[2010]:     from werkzeug.wsgi import SharedDataMiddleware
Aug 20 04:11:49 cbtree isso[2010]: ImportError: cannot import name 'SharedDataMiddleware'
Aug 20 04:11:49 cbtree systemd[1]: isso.service: Main process exited, code=exited, status=1/FAILURE
Aug 20 04:11:49 cbtree systemd[1]: isso.service: Failed with result 'exit-code'.
Aug 20 04:11:49 cbtree sudo[2012]: cranberrypie : TTY=pts/0 ; PWD=/home/cranberrypie ; USER=root ; COMMAND=/bin/journalct
Aug 20 04:11:49 cbtree sudo[2012]: pam_unix(sudo:session): session opened for user root by cranberrypie(uid=0)
@Fryboyter
Copy link
Contributor

I would say you are using too current a version of werkzeug (#617). Have you made an appropriate update lately?

@CranberryPie1
Copy link
Author

CranberryPie1 commented Aug 22, 2020

Hello,

Thank you. I used pip3 to install not pip: pip3 install git+https://github.com/posativ/isso.git. Isso does not show up on my blog :(

Aug 22 08:16:06 cbtree sudo[8955]: pam_unix(sudo:session): session closed for user root
Aug 22 08:16:06 cbtree isso[8958]: 2020-08-22 08:16:06,758 WARNING: no such option: [general] admin_password
Aug 22 08:16:06 cbtree node[153]: [2020-08-22 08:16:06] WARN Cookie ghost-members-ssr not found
Aug 22 08:16:07 cbtree node[153]: [2020-08-22 08:16:07] INFO "HEAD /" 200 344ms
Aug 22 08:16:19 cbtree node[153]: [2020-08-22 08:16:19] WARN Cookie ghost-members-ssr not found
Aug 22 08:16:19 cbtree node[153]: [2020-08-22 08:16:19] INFO "GET /cloudflare-quad9-dns-resolvers/" 304 220ms
Aug 22 08:16:20 cbtree node[153]: [2020-08-22 08:16:20] INFO "GET /favicon.ico" 200 3ms
Aug 22 08:16:26 cbtree node[153]: [2020-08-22 08:16:26] WARN Cookie ghost-members-ssr not found
Aug 22 08:16:26 cbtree node[153]: [2020-08-22 08:16:26] WARN {{#get}} helper took 266ms to complete
Aug 22 08:16:26 cbtree node[153]:
Aug 22 08:16:26 cbtree node[153]: {{#get}} helper took 266ms to complete
Aug 22 08:16:26 cbtree node[153]: Error ID:
Aug 22 08:16:26 cbtree node[153]:     c6501db0-e44f-11ea-a901-b36cadc1d55c
Aug 22 08:16:26 cbtree node[153]: Error Code:
Aug 22 08:16:26 cbtree node[153]:     SLOW_GET_HELPER
Aug 22 08:16:26 cbtree node[153]: Details:
Aug 22 08:16:26 cbtree node[153]:     api:          v3.postsPublic.browse
Aug 22 08:16:26 cbtree node[153]:     apiOptions:
Aug 22 08:16:26 cbtree node[153]:       limit:  3
Aug 22 08:16:26 cbtree node[153]:       filter: tags:information+id:-5f3cd82784b1ea01bf46a619
Aug 22 08:16:26 cbtree node[153]:     returnedRows: 3
Aug 22 08:16:26 cbtree node[153]:
Aug 22 08:16:26 cbtree node[153]: [2020-08-22 08:16:26] INFO "GET /cloudflare-quad9-dns-resolvers/" 304 315ms
Aug 22 08:16:27 cbtree node[153]: [2020-08-22 08:16:27] INFO "GET /favicon.ico" 200 2ms
Aug 22 08:16:31 cbtree node[153]: [2020-08-22 08:16:31] WARN Cookie ghost-members-ssr not found
Aug 22 08:16:32 cbtree node[153]: [2020-08-22 08:16:32] INFO "GET /cloudflare-quad9-dns-resolvers/" 304 182ms
Aug 22 08:16:32 cbtree node[153]: [2020-08-22 08:16:32] INFO "GET /favicon.ico" 200 2ms
Aug 22 08:16:35 cbtree node[153]: [2020-08-22 08:16:35] WARN Cookie ghost-members-ssr not found
Aug 22 08:16:35 cbtree node[153]: [2020-08-22 08:16:35] INFO "GET /cloudflare-quad9-dns-resolvers/" 304 153ms
Aug 22 08:16:36 cbtree node[153]: [2020-08-22 08:16:36] INFO "GET /favicon.ico" 200 7ms
Aug 22 08:16:55 cbtree sudo[8962]: cranberrypie : TTY=pts/0 ; PWD=/home/cranberrypie ; USER=root ; COMMAND=/bin/journalctl -xe
Aug 22 08:16:55 cbtree sudo[8962]: pam_unix(sudo:session): session opened for user root by cranberrypie(uid=0)

@jefft
Copy link
Contributor

jefft commented Aug 22, 2020

Try checking your browser console for Javascript errors. If you find it's missing 'embed.min.js', see #656 (comment)

@CranberryPie1
Copy link
Author

Yeah I got a 404 error. Trying your version: pip3 install git+https://github.com/redradishtech/isso.git still shows

isso.domain.tld/js/embed.min.js/:1 Failed to load resource: the server responded with a status of 404 (). Not sure if it overwrote/removed the previous install, all I did was pip3 uninstall isso. Not sure if that's the right command.

@jefft
Copy link
Contributor

jefft commented Aug 22, 2020

If I run:

cd /tmp
mkdir isso2
cd isso2
python3 -m venv venv
. venv/bin/activate
. venv/bin/activate
pip3 install wheel
pip3 install --upgrade git+https://github.com/redradishtech/isso.git

I see embed.min.js in ./venv/lib/python3.8/site-packages/isso/js/embed.min.js. If you don't, there must be a build error - probably npm or bower missing, as discussed in the earlier linked comment.

@jelmer jelmer added the question Something needs clarification. label Aug 22, 2020
@CranberryPie1
Copy link
Author

CranberryPie1 commented Aug 22, 2020

I see it, /venv/lib/python3.6/site-packages/isso/js/embed.min.js -rw-rw-r-- 1 cranberrypie cranberrypie 69897 Aug 22 20:24 embed.min.js

Bower (1.8.8) and NPM (6.14.6) are installed I saw no errors while building again. Where can I find the logs?

I have embed.min.js in my /home/isso/.local/lib/python3.6/site-packages/isso/js folder.

@jefft
Copy link
Contributor

jefft commented Aug 23, 2020

I see it, /venv/lib/python3.6/site-packages/isso/js/embed.min.js
...
I have embed.min.js in my /home/isso/.local/lib/python3.6/site-packages/isso/js folder.

I suggest starting from scratch in a new venv:

sudo su - isso
mkdir venv
cd venv
pip3 install git+https://github.com/redradishtech/isso.git

So not pip3 install isso (you'll hit #617), and not pip3 install git+https://github.com/posativ/isso.git (you'll hit #656).
If that installs correctly, you should have a file /home/isso/venv/lib/python3.6/site-packages/isso/js/embed.min.js, and you should be able to run:

$ sudo -u isso /home/isso/venv/bin/isso --version
isso 0.12.3.dev0

Then in your systemd service script, make sure you use the absolute path to the correct isso binary:

ExecStart=/home/isso/venv/bin/isso -c /wherever/isso.conf

(systemctl daemon-reload to pick up service file changes)

When a new isso release is made fixing #617, you can move off redradishtech/isso by running pip3 install isso in a fresh venv and use that instead.

An example: for my own site, I have isso installed in a venv just as in my last comment. I then have a systemd unit starting isso after the website (redradish_website.service) starts:

[Unit]
Description=Isso Comment Server for redradish_website
After=redradish_website.service
# Hard dependency on Confluence; this causes the database to start before redradish_confluence usually, and (unlike Wants=) shuts down isso if Confluence is shut down.
Requires=redradish_website.service
 
[Service]
Type=simple
User=isso-redradish_website
WorkingDirectory=/var/atlassian/application-data/redradish_website/current/isso-public-comments
ExecStart=/opt/atl_manage/venv/bin/isso -c /opt/atlassian/redradish_website/current/isso-public-comments/isso.conf
Restart=on-failure
RestartSec=5
 
[Install]
# When redradish_confluence.service starts up, also start the comment service. https://unix.stackexchange.com/questions/219940/getting-a-service-started-automatically-when-another-gets-started/219989
WantedBy=multi-user.target redradish_confluence.service

@CranberryPie1
Copy link
Author

CranberryPie1 commented Aug 23, 2020

I really thought this solution might work, but it did not :/

Due to the steps above not working. Isso wasn't building in the directory.

sudo su - isso
mkdir venv
cd venv
pip3 install git+https://github.com/redradishtech/isso.git

My steps in /home/isso. I have the /home/isso/venv/lib/python3.6/site-packages/isso/js/embed.min.js file. Running $ sudo -u isso /home/isso/venv/bin/isso --version gives me output isso 0.12.3.dev0 yet still not working.

python3 -m venv venv
. venv/bin/activate
. venv/bin/activate
pip3 install git+https://github.com/redradishtech/isso.git

/home/isso/venv/lib/python3.6/site-packages/isso/js/embed.min.js

My systemd service

[Unit]
Description=Isso Commenting Server
After=network.target

[Service]
Type=simple
User=isso
WorkingDirectory=/home/isso
ExecStart=/home/isso/venv/bin/isso -c /home/isso/isso.conf run
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

@jefft
Copy link
Contributor

jefft commented Aug 23, 2020

Due to the steps above not working. Isso wasn't building in the directory.

What do you mean by not building? Is it throwing errors when you pip3 install it?

If pip3 install worked (being able to run isso --version suggests it did), try running isso from the command-line:

$ sudo systemctl stop isso  # shut down systemd isso
$ sudo -u isso /home/isso/venv/bin/isso -c /home/isso/isso.conf run

If that works (doesn't immediately exit with an error), then open another terminal and check if the web interface works by visiting the URL given in the listen parameter in isso.conf:

$ links -dump http://localhost:1234/admin
   Wynaut by @veekun

                                      Isso

Administration

   Administration secured by password:
   _____________________

If isso appears to start but you can't access its admin port (via links -dump, telnet localhost 1234, a browser or whatever), check your isso log file (log-file in isso.conf) for errors.

If isso's admin UI works, ctrl-c your command-line isso, systemctl start isso to restart it via systemd, and check again via http.

If all that works, then isso is mostly working. Check your isso log-file file for errors, and ensure your Ghost config is using the right Javascript paths.

@CranberryPie1
Copy link
Author

CranberryPie1 commented Aug 24, 2020

What do you mean by not building? Is it throwing errors when you pip3 install it?

If pip3 install worked (being able to run isso --version suggests it did), try running isso from the command-line:

My apologies, I was referring to something else. I should have made it more clear.

isso@cbtree:~$ telnet localhost 4590

Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

$ links -dump http://localhost:4590

                                  Bad Request

   missing uri query

$ links -dump http://localhost:4590/admin

   Wynaut by @veekun

                                      Isso

Administration

   Administration is disabled on this instance of isso. Set enabled=true in
   the admin section of your isso configuration to enable it.

It's enabled true, under moderation.

cranberrypie@cbtree:~$ sudo -u isso /home/isso/venv/bin/isso -c /home/isso/isso.conf run

It basically doesn't output anything else, it freezes. I do have an admin password as seen in my config in the OP.

2020-08-24 04:22:34,831 WARNING: no such option: [general] admin_password

log file = isso.log

Traceback (most recent call last):
  File "/home/isso/venv/lib/python3.6/site-packages/isso/ext/notifications.py", line 85, in __init__
    with SMTPConnection(self.conf):
  File "/home/isso/venv/lib/python3.6/site-packages/isso/ext/notifications.py", line 54, in __enter__
    self.client.starttls(context=ssl.create_default_context())
  File "/usr/lib/python3.6/smtplib.py", line 749, in starttls
    self.ehlo_or_helo_if_needed()
  File "/usr/lib/python3.6/smtplib.py", line 600, in ehlo_or_helo_if_needed
    if not (200 <= self.ehlo()[0] <= 299):
  File "/usr/lib/python3.6/smtplib.py", line 440, in ehlo
    self.putcmd(self.ehlo_msg, name or self.local_hostname)
  File "/usr/lib/python3.6/smtplib.py", line 367, in putcmd
    self.send(str)
  File "/usr/lib/python3.6/smtplib.py", line 359, in send
    raise SMTPServerDisconnected('please run connect() first')
smtplib.SMTPServerDisconnected: please run connect() first
connected to https://domain.com/
unable to connect to SMTP server
Traceback (most recent call last):
  File "/home/isso/venv/lib/python3.6/site-packages/isso/__init__.py", line 277, in main
    from gevent.pywsgi import WSGIServer
ModuleNotFoundError: No module named 'gevent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/isso/venv/lib/python3.6/site-packages/isso/ext/notifications.py", line 85, in __init__
    with SMTPConnection(self.conf):
  File "/home/isso/venv/lib/python3.6/site-packages/isso/ext/notifications.py", line 54, in __enter__
    self.client.starttls(context=ssl.create_default_context())
  File "/usr/lib/python3.6/smtplib.py", line 749, in starttls
    self.ehlo_or_helo_if_needed()
  File "/usr/lib/python3.6/smtplib.py", line 600, in ehlo_or_helo_if_needed
    if not (200 <= self.ehlo()[0] <= 299):
  File "/usr/lib/python3.6/smtplib.py", line 440, in ehlo
    self.putcmd(self.ehlo_msg, name or self.local_hostname)
  File "/usr/lib/python3.6/smtplib.py", line 367, in putcmd
    self.send(str)
  File "/usr/lib/python3.6/smtplib.py", line 359, in send
    raise SMTPServerDisconnected('please run connect() first')
smtplib.SMTPServerDisconnected: please run connect() first
connected to https://domain.com/

@jefft
Copy link
Contributor

jefft commented Aug 24, 2020

The relevant line there is:

OSError: [Errno 98] Address already in use

Do a ps axwu | grep isso and I bet you'll see isso already running. Make sure isso is absolutely dead (links -dump http://localhost:4590/admin gives 'Connection refused') before starting it again.

(That from gevent.pywsgi import WSGIServer error is highly misleading. Isso is opportunistically trying to use gevent ( see __init__.py), and if not available, tries the 'normal' wsgi server. But if the wsgi server fails for any reason, the gevent error is shown as first (deepest) part of the stacktrace. In reality it is completely irrelevant).

@CranberryPie1
Copy link
Author

CranberryPie1 commented Aug 24, 2020

The relevant line there is:

OSError: [Errno 98] Address already in use

I tried to use the sudo -u isso /home/isso/venv/bin/isso -c /home/isso/isso.conf run when Isso was running, that was a mistake, and why I removed it from my post.

Just showing you the output below.

$ ps axwu | grep isso --- running

isso     13253  1.6  3.5 255620 37028 ?        Ssl  06:18   0:00 /home/isso/venv/bin/python3 /home/isso/venv/bin/isso -c /home/isso/isso.conf run
cranber+ 13265  0.0  0.0  11452  1040 pts/0    S+   06:19   0:00 grep --color=auto isso

Stopped.

cranber+ 13234 0.0 0.0 11452 1016 pts/0 S+ 06:16 0:00 grep --color=auto isso

Had to adjust the config:

$ links -dump http://localhost:4590/admin

   Wynaut by @veekun

                                      Isso

Administration

   Administration secured by password:

When going to http://localhost:4590 without /admin it gives;


                                  Bad Request

   missing uri query

I still don't see it on my blog.

EDIT

I don't think it's my Nginx? Was working before. -- /etc/nginx/sites-available/domain.com.conf

server {
    listen 80;
    listen [::]:80;

    server_name domain.com;
    root /var/www/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://127.0.0.1:2368;

    }
    location /comments {
        proxy_pass http://127.0.0.1:4590/comments;
        proxy_http_version 1.1;
        proxy_redirect default;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 50m;
}

@jefft
Copy link
Contributor

jefft commented Aug 24, 2020

Since links -dump http://localhost:4590/admin works, then you would expect the same results through nginx:

links -dump https://domain.com/comments/admin
If that fails, check your error.log in /var/log/nginx. If that works, then this should too:
links -dump https://domain.com/comments/js/embed.min.js
..and if that works, then either ghost isn't calling it (check your browser F12 console for evidence) or it is and isso is misconfigured (check your isso.log).

@CranberryPie1
Copy link
Author

CranberryPie1 commented Aug 24, 2020

Well I want to say, thanks for your help thus far. I truly do appreciate it. What I don't understand is Isso was working and then just stopped. From all the information below, nothing seems to be a related error.

Running both: links -dump https://domain.com/comments/admin and links -dump https://domain.com/comments/js/embed.min.js

   Blog
     * Home
     * Contact

                                      404

   Page not found


   Ghost (c) 2020 Latest Posts Ghost

The snippet in my blog

<script data-isso="https://isso.DOMAIN.com/" data-isso-css="false" data-isso-require-author="true" src="https://isso.DOMAIN.com/js/embed.min.js"></script>
<section id="isso-thread"></section>

Nginx error.log / error.log.1

error.log

2020/08/24 19:40:33 [notice] 13860#13860: signal process started

error.log.1

2020/08/23 08:53:54 [error] 10022#10022: *1920 open() "/var/www/ghost/system/nginx-root/.well-known/security.txt" failed (2: No such file or directory), client: 71.6.167.142, server: isso.domain.com, request: "GET /.well-known/security.txt HTTP/1.1", host: "host IP"
2020/08/23 19:36:30 [crit] 10022#10022: *2142 SSL_do_handshake() failed (SSL: error:1420918C:SSL routines:tls_early_post_process_client_hello:version too low) while SSL handshaking, client: 208.93.152.17, server: 0.0.0.0:443
2020/08/23 19:36:31 [crit] 10022#10022: *2146 SSL_do_handshake() failed (SSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol) while SSL handshaking, client: 208.93.152.17, server: 0.0.0.0:443
2020/08/24 04:07:49 [crit] 10022#10022: *2229 SSL_do_handshake() failed (SSL: error:1420918C:SSL routines:tls_early_post_process_client_hello:version too low) while SSL handshaking, client: 216.218.206.69, server: 0.0.0.0:443

Nginx access.log

[24/Aug/2020:20:08:04 +0000] "GET /js/embed.min.js/ HTTP/2.0" 404 2896 "https://domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:04 +0000] "GET /favicon.ico HTTP/2.0" 200 1131 "https://domain.com/how-do-i-protect-myself-against-malware/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:11 +0000] "GET /ghost/ HTTP/2.0" 200 1388 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36[24/Aug/2020:20:08:12 +0000] "GET /ghost/assets/img/favicon.ico HTTP/2.0" 200 1004 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:12 +0000] "GET /ghost/api/v3/admin/users/me/?include=roles HTTP/2.0" 200 718 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:12 +0000] "GET /ghost/api/v3/admin/site/ HTTP/2.0" 200 164 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:12 +0000] "GET /ghost/api/v3/admin/config/ HTTP/2.0" 200 215 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:12 +0000] "GET /ghost/api/v3/admin/notifications/ HTTP/2.0" 200 378 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:12 +0000] "GET /ghost/api/v3/admin/settings/?group=site%2Ctheme%2Cprivate%2Cmembers%2Cportal%2Cemail%2Camp%2Clabs%2Cslack%2Cunsplash%2Cviews HTTP/2.0" 200 1538 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:12 +0000] "GET /ghost/api/v3/admin/themes/ HTTP/2.0" 200 892 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:12 +0000] "GET /ghost/api/v3/admin/settings/?group=site%2Ctheme%2Cprivate%2Cmembers%2Cportal%2Cemail%2Camp%2Clabs%2Cslack%2Cunsplash%2Cviews HTTP/2.0" 200 1538 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:12 +0000] "GET /favicon.ico?t=1598299690281 HTTP/2.0" 200 1131 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:22 +0000] "GET / HTTP/2.0" 304 0 "https://domain.com/ghost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:27 +0000] "GET /open-vs-closed-source/ HTTP/2.0" 200 6293 "https://domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:27 +0000] "GET /content/images/size/w2000/2019/03/serveimage-xl.png HTTP/2.0" 200 6279 "https://domain.com/open-vs-closed-source/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"
[24/Aug/2020:20:08:27 +0000] "GET /js/embed.min.js/ HTTP/2.0" 404 2896 "https://domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"

Isso.log (same error as above which you told me was a false error)

Traceback (most recent call last):
  File "/home/isso/venv/lib/python3.6/site-packages/isso/ext/notifications.py",                                                                                                                                                              line 85, in __init__
    with SMTPConnection(self.conf):
  File "/home/isso/venv/lib/python3.6/site-packages/isso/ext/notifications.py",                                                                                                                                                              line 54, in __enter__
    self.client.starttls(context=ssl.create_default_context())
  File "/usr/lib/python3.6/smtplib.py", line 749, in starttls
    self.ehlo_or_helo_if_needed()
  File "/usr/lib/python3.6/smtplib.py", line 600, in ehlo_or_helo_if_needed
    if not (200 <= self.ehlo()[0] <= 299):
  File "/usr/lib/python3.6/smtplib.py", line 440, in ehlo
    self.putcmd(self.ehlo_msg, name or self.local_hostname)
  File "/usr/lib/python3.6/smtplib.py", line 367, in putcmd
    self.send(str)
  File "/usr/lib/python3.6/smtplib.py", line 359, in send
    raise SMTPServerDisconnected('please run connect() first')
smtplib.SMTPServerDisconnected: please run connect() first
connected to https://domain.com/
unable to connect to SMTP server
Traceback (most recent call last):
  File "/home/isso/venv/lib/python3.6/site-packages/isso/__init__.py", line 277,                                                                                                                                                              in main
    from gevent.pywsgi import WSGIServer
ModuleNotFoundError: No module named 'gevent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/isso/venv/lib/python3.6/site-packages/isso/ext/notifications.py",                                                                                                                                                              line 85, in __init__
    with SMTPConnection(self.conf):
  File "/home/isso/venv/lib/python3.6/site-packages/isso/ext/notifications.py",                                                                                                                                                              line 54, in __enter__
    self.client.starttls(context=ssl.create_default_context())
  File "/usr/lib/python3.6/smtplib.py", line 749, in starttls
    self.ehlo_or_helo_if_needed()
  File "/usr/lib/python3.6/smtplib.py", line 600, in ehlo_or_helo_if_needed
    if not (200 <= self.ehlo()[0] <= 299):
  File "/usr/lib/python3.6/smtplib.py", line 440, in ehlo
    self.putcmd(self.ehlo_msg, name or self.local_hostname)
  File "/usr/lib/python3.6/smtplib.py", line 367, in putcmd
    self.send(str)
  File "/usr/lib/python3.6/smtplib.py", line 359, in send
    raise SMTPServerDisconnected('please run connect() first')
smtplib.SMTPServerDisconnected: please run connect() first
connected to https://domain.com/

Only console error on firefox browser is Loading failed for the <script> with source “https://isso.domain.com/js/embed.min.js”.

@jefft
Copy link
Contributor

jefft commented Aug 24, 2020

To to clarify, links -dump http://localhost:4590/admin works?

Your Ghost snippet indicates isso should be listening on https://isso.DOMAIN.com/js/embed.min.js. Is there perhaps a /etc/nginx/sites-available/isso.domain.com.conf file that needs configuring, instead of /etc/nginx/sites-available/domain.com.conf? If isso is working on its internal URL (http://localhost:4590/admin), then you just need to beat nginx into submission.

@CranberryPie1
Copy link
Author

CranberryPie1 commented Aug 25, 2020

Both my .conf and ssl.conf for my isso subdomain worked before. Otherwise the localhost url seems to work.

$ links -dump http://localhost:4590/admin

   Wynaut by @veekun

                                      Isso

Administration

   Administration secured by password:

My isso.domain.com.conf

server {
    listen 80;
    listen [::]:80;

    server_name isso.domain.com;
    root /var/www/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)

    location /comments {
        proxy_pass http://127.0.0.1:4590/comments;
        proxy_http_version 1.1;
        proxy_redirect default;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 50m;
}

My isso.domain.com-ssl.conf

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name isso.domain.com;
    root /var/www/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)

    ssl_certificate /etc/letsencrypt/isso.domain.com/fullchain.cer;
    ssl_certificate_key /etc/letsencrypt/isso.domain.com/isso.domain.com.key;
    include /etc/nginx/snippets/ssl-params.conf;

    location /comments {
        proxy_pass http://127.0.0.1:4590/comments;
        proxy_http_version 1.1;
        proxy_redirect default;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }    
    location ~ /.well-known {
        allow all;
    }

   client_max_body_size 50m;
}

@jefft
Copy link
Contributor

jefft commented Aug 25, 2020

Well, you've got a working http://localhost:4590/admin, so nginx must be the problem.

Why do you have only /comments proxied? That isn't going to let through requests to /admin, /js or anything else. Perhaps try just location /, and proxy_pass http://127.0.0.1:4590/;.

@CranberryPie1
Copy link
Author

CranberryPie1 commented Aug 25, 2020

That worked, I removed /comments. The weird thing is this wasn't an issue before, it worked before. I never touched anything after I setup Isso the first time, so genuinely curious how it came to stop working altogether. Thanks for your help. Comments work now.

Although I do get a URL not found error when going to isso.mydomain.com/comments/admin or just /comments and /admin.

Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

@jefft
Copy link
Contributor

jefft commented Aug 25, 2020

Glad it's working!

I wouldn't expect isso.mydomain.com/comments/* to work at all, given your configuration. isso.mydomain.com/admin should work.

As for nginx, it looks like at one point you might have wanted isso on mydomain.com/comments rather than isso.mydomain.com/. I have my isso on https://www.redradishtech.com/isso/, and the prefix needs to be explicitly passed in a header:

        ProxyPass        /isso/    http://redradish-website.localhost:1234/        max=200
...
        <Location /isso>
                RequestHeader set "X-Script-Name" "/isso"
                RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
        </Location>

If it's all happy (should check the comment approval process) please mark this issue as resolved.

@CranberryPie1
Copy link
Author

CranberryPie1 commented Aug 26, 2020

For users having issues accessing the admin panel due to Nginx configuration. Try this:

    location / {
        proxy_pass http://127.0.0.1:4590/;
        proxy_http_version 1.1;
        proxy_set_header X-Script-Name /isso;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Something needs clarification.
Projects
None yet
Development

No branches or pull requests

4 participants