jhuckaby/Cronicle

Cronicle showing blank page after machine restart

aflabhay opened this issue · 5 comments

Hi,
I tried to restart the Ubuntu 20.04 GCP VM and then restart the chronicle, it is showing blank screen as you can see below. Looks css/htmls are not getting rendered. What could be the issue? Can you plz help here

Screenshot 2024-06-06 at 8 01 20 PM

It's really difficult to help you when you don't use the GitHub New Issue Template. We provide that for a reason, namely to collect key information to help us troubleshoot your problem.

<!-- Please provide the following information for your Cronicle issue. -->
<!-- The more details I have, the more likely I can solve the problem. -->
<!-- These HTML comments will not be visible in your bug report, so you can leave them in. -->

## Summary

<!-- A quick summary of the issue -->

## Steps to reproduce the problem

<!-- Please tell me exactly how, so I can reproduce it on my end -->

## Your Setup

<!-- Tell me more about your Cronicle setup... -->

### Operating system and version?

<!-- e.g. CentOS 7.2, Ubuntu 16, OS X 10.12.4, etc. -->

### Node.js version?

<!-- e.g. 6.9.1, etc. -->

### Cronicle software version?

<!-- See bottom-right corner of web interface. -->

### Are you using a multi-server setup, or just a single server?

### Are you using the filesystem as back-end storage, or S3/Couchbase?

### Can you reproduce the crash consistently?

## Log Excerpts

<!-- Please provide a crash log, and/or any other log excerpts you consider relevant. -->

<!-- Thank you for helping to make Cronicle better! -->

I see this too... however, I believe it is related to the message after install that states:

Please allow for up to 60 seconds for the server to become master.

The page does come up after approx 60 seconds.

@aflabhay I believe that blank screen is typically seen when you have some kind of reverse proxy, which is not configured for websockets, and you client fails to receive bootstrap configuration. To get more details, open dev tool , and check errors in console

Happened to me, after a clean restart as well.

Webconsole says: Uncaught SyntaxError: unexpected token: ':'
And clicking on the link says: {"code":"master","description":"No master server found"}

So I need to figure out how to make this server the master server again (which it always was).

EDIT: This fixed my problem: #560 (comment)

In my deployment setup the server hostname changes on every deployment. That's due to the nature of how Digital Ocean Apps work. Other deployment platforms work similar. Since I only use a single instance, I've applied all comments in https://github.com/jhuckaby/Cronicle/wiki/Troubleshooting#server-hostnames and created the following commands which are executed right before the Cronicle start command is issued. They basically take the current hostname and write them into the servers and server_groups settings, retrieving the hostname from /etc/hostname since it's all running in a Debian based Docker image:

HOSTNAME=$(head -n 1 /etc/hostname | tr -d '\n')
./bin/storage-cli.js put global/servers/0 <<EOF
{
  "type": "list_page",
  "items": [
     {
       "hostname": "${HOSTNAME}",
       "ip": "127.0.0.1"
     }
  ]
}
EOF
./bin/storage-cli.js put global/server_groups/0 <<EOF
{
  "type": "list_page",
  "items": [
    {
      "id": "maingrp",
      "title": "Primary Group",
      "regexp": "^(${HOSTNAME})\$",
      "master": 1
    },
    {
      "id": "allgrp",
      "title": "All Servers",
      "regexp": ".+",
      "master": 0
    }
  ]
}
EOF

These commands are part of a docker-entrypoint.sh file because I have the entire Cronicle dockerized for easy deployment.

In case you have a more sophisticated setup one can use tools like jq to just replace the master hostname and otherwise keeo the files as they are.