#Converted to CAN BUS, now mainsail needs to be reinstalled after every boot.

45 messages · Page 1 of 1 (latest)

odd bone
#

I just converted my Octopus V1.1 to CAN BUS and added a SHT36V3 toolhead, both are connected and functional, but now after every host reboot I need to reinstall Mainsail via KIAUH to be able to connect to the web frontend. I'm not sure where to start diagnosing this.

solid iceBOT
#

Ahoi @odd bone!
Welcome to the Mainsail support-forum!
There is a problem with the tags you selected for this post. Please fix them to fit your question.
For further information on tags please check the readme: https://discord.com/channels/758059413700345988/1320321898009071616

To change the tags of this post:

  1. Open the ... menu on the top right corner of this post.
  2. Find Edit tags
  3. Select the checkbox of the correct tags.

Usually you just need to select one tag!
If you still have no idea which one to choose, feel free to ask here.

Note: This is an automated message

Thanks for your cooperation!

#

Ahoi @odd bone!
It looks like you did not provide all the necessary information we need to help you.
Please upload your logfiles and a detailed description of your problem.
For further information see: https://docs.mainsail.xyz/faq/getting-help/discord#provide-information
Note: We only accept .log and .txt files as log files.
This is an automated message

We are glad to help and chat with you on our Community Discord, but if you need help and want the best support possible you should, follow a few simple rules:

odd bone
abstract grove
#

You are using a reverse proxy on the same device and only locally? If so the first step would be to just use http with the ip instead of https with your domain

#

Reinstalling Mainsail is doing nothing besides setting up nginx with a reverse proxy. So if you have a second reverse proxy setup it's most likely just blocking the port

#

In any way, as you are using a domain, you should tell us the exact setup as everything else is just a guessing game, if we don't know your setup

odd bone
#

I'm using Traefik to reverse proxy from another host to allow access outside my home network. Using the IP from the home network has the same result.

#

This was a working configuration until I set up the CAN network on the pi.

#

This is the rule Traefik follows to route to the printer.

http:
  routers:
    print-rtr-bypass:
      rule: 'Host(`print.{{env "DOMAINNAME"}}`) && (Header(`X-Api-Key`, `{{env "MAINSAIL_API_KEY"}}`) || Query(`apikey`, `{{env "MAINSAIL_API_KEY"}}`))'
      priority: 100
      entryPoints:
        - https
      middlewares:
        - chain-no-auth
      service: print-svc
      tls:
        certResolver: dns-cloudflare
    print-rtr:
      rule: 'Host(`print.{{env "DOMAINNAME"}}`)'
      priority: 99
      entryPoints:
        - https
      middlewares:
        - chain-authelia
      service: print-svc
      tls:
        certResolver: dns-cloudflare
  services:
    print-svc:
      loadBalancer:
        servers:
          - url: 'http://phmsos01.home'
abstract grove
#

How did you setup the CAN network?

odd bone
abstract grove
#

Send the output of systemctl status nginx

odd bone
#
user@phmsos01:~ $ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: active (running) since Fri 2025-09-19 11:19:07 CDT; 4h 30min ago
       Docs: man:nginx(8)
    Process: 548 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, >
    Process: 557 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/>
   Main PID: 558 (nginx)
      Tasks: 5 (limit: 760)
        CPU: 122ms
     CGroup: /system.slice/nginx.service
             ├─558 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
             ├─559 "nginx: worker process"
             ├─560 "nginx: worker process"
             ├─561 "nginx: worker process"
             └─562 "nginx: worker process"

Notice: journal has been rotated since unit was started, output may be incomplete.
abstract grove
#

So nginx is running and at the ip, you don't have Mainsail right now?
Then send a screenshot of http://<ip.of.device>:7125

odd bone
abstract grove
#

Use the ip and not any domain please, just to first get basic troubleshooting done

odd bone
abstract grove
#

systemctl status moonraker

odd bone
#
user@phmsos01:~ $ systemctl status moonraker
● moonraker.service - API Server for Klipper SV1
     Loaded: loaded (/etc/systemd/system/moonraker.service; enabled; preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Fri 2025-09-19 15:57:56 CDT; 6s ago
       Docs: https://moonraker.readthedocs.io/
    Process: 27978 ExecStart=/home/user/moonraker-env/bin/python $MOONRAKER_ARGS (code=exited, status=2)
   Main PID: 27978 (code=exited, status=2)
        CPU: 115ms
#

still can't connect after restarting the service though

abstract grove
#

Is the service actually running?

#

Just restarting doesn't mean it works, if it errored out earlier

odd bone
#

Nope, it exited immediately

abstract grove
#

Ok, then send a log

#

Or have a look at journalctl

odd bone
abstract grove
#

Is it 11 am at your place?

odd bone
#

no, 4pm

abstract grove
#

Oh, I thought you just redacted the path in the log

#

{data_path} is not valid

#

Your moonraker env is also fail

#

Something is completely messed up

odd bone
#

I'm going to try starting with a fresh install and pull in a config backup.

abstract grove
#

If you use latest MainsailOS the CAN network is already setup ^^

odd bone
#

okay, I'll start there and report back

#

I appreciate the help so far

abstract grove
#

I'm wondering what you did, as your user is also wrong there

#

As if some env var of your pi got messed up

#

Some system env var

odd bone
#

I'm sure I screwed that up by not paying close enough attention to something.

abstract grove
#

Ok, so it seems like the user and so on come from the system service file. So your services are most likely messed up somehow