No connection to octoPi server


#1

I used for 2 years the ocotpi server to print. The last time I had some connection problems to reach the server via browser. But if the connection was established than it kept it. Today I updated 1.3.8 to 1.3.10. I printed an all was good. But after a reboot I cannot connect to the server.

I rebooted a few times.
I checked the points that are recommended on the browser page:

  • Verify that the process is running: ps -ef | grep -i octoprint | grep -i python
    -> I don't get any information

  • Take a look into ~/.octoprint/logs/octoprint.log:
    -> there are lot of information but I cannot see the key problem, I attached the log file, in this file you can also see the successful update process...
    OctoPiServer_noConnection_putty.log (54.2 KB)

  • restart the server doesn't help

I hope someone can help solve the problem.
Thanks


#2

When the instructions say this, they mean something more like:

cat ~/.octoprint/logs/octoprint.log

or

nano ~/.octoprint/logs/octoprint.log

Also, you could try to restart in safe mode to see if it's one of your plugins which isn't happy.


#3

Hi OutsourcedGuru,

I tried to start in safe in two ways but it's not possible:

  1. config.yaml -> server block -> startOnceInSafeMode: true
    -> error writing config.yaml: Read-only file system
  2. pi@octopi:~$ octoprint serve --safe
    -bash: octoprint: command not found

Maybe this is only a simple mistake...


#4

But wait, the pi user already has write access to this file. I wonder why that partition has been mounted as read-only...?

ls -l ~/.octoprint

...should indicate that the pi user has rights. Please let use know what that returns.

Also, do a dh -h df -h. It's possible that your microSD is full.


#5
pi@octopi:~ $ dh -h
-bash: dh: command not found
pi@octopi:~ $ sudo dh -h
sudo: unable to open /var/lib/sudo/ts/pi: Read-only file system

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for pi:
sudo: dh: command not found

pi@octopi:~ $ ls -l ~/.octoprint
total 52
-rw-r--r-- 1 pi pi 1269 Mar  1 10:20 config.yaml
drwxr-xr-x 7 pi pi 4096 Mar  1 10:22 data
drwxr-xr-x 4 pi pi 4096 Mar  1 10:15 generated
drwxr-xr-x 2 pi pi 4096 Mar  1 10:15 logs
drwxr-xr-x 2 pi pi 4096 Mar  1 10:15 plugins
drwxr-xr-x 2 pi pi 4096 Mar  1 10:15 printerProfiles
drwxr-xr-x 2 pi pi 4096 Mar  1 10:15 scripts
drwxr-xr-x 3 pi pi 4096 Mar  1 10:15 slicingProfiles
drwxr-xr-x 3 pi pi 4096 Mar  1 10:15 timelapse
drwxr-xr-x 2 pi pi 4096 Mar  1 10:15 translations
drwxr-xr-x 2 pi pi 4096 Mar  1 10:15 uploads
-rw------- 1 pi pi  218 Aug 12  2018 users.yaml
drwxr-xr-x 2 pi pi   60 Mar  1 10:15 virtualSd
drwxr-xr-x 2 pi pi 4096 Mar  1 10:15 watched


#6

I found another command to read out disk space:

pi@octopi:~ $ df -Bm
Filesystem     1M-blocks  Used Available Use% Mounted on
/dev/root         14776M 1511M    12629M  11% /
devtmpfs            434M    0M      434M   0% /dev
tmpfs               438M    0M      438M   0% /dev/shm
tmpfs               438M   12M      427M   3% /run
tmpfs                 5M    1M        5M   1% /run/lock
tmpfs               438M    0M      438M   0% /sys/fs/cgroup
tmpfs                88M    0M       88M   0% /run/user/1000

That is not the problem.


#7

My bad, that was a typo on my part (I meant to put df there).

pi@octopi:~ $ ls -l ~/.octoprint
total 52
-rw-r--r-- 1 pi pi 1269 Mar  1 10:20 config.yaml
drwxr-xr-x 7 pi pi 4096 Mar  1 10:22 data

That's probably correct for users.yaml since you don't want others reading it (only the owner who is pi in this case). And your config.yaml has its rights set correctly as well. About the only thing left, then, would be who you are.

whoami
 # mine responds with "pi"

So if yours also responds with pi then again, try simply nano ~/.octoprint/config.yaml and attempt to make the edits.


#8

Usually an indication of file system errors e.g. due to corruption caused by just yanking out power instead of a proper shutdown.


#9

whoami returns an error:

pi@octopi:~ $ whoami
Segmentation fault


#10

Oh man, foosel just called it. Your microSD card's second partition is corrupt. That segmentation fault is a dead giveaway.

At this point, it's easiest just to start over with a new microSD, a new OctoPi image and in fact a new Raspberry Pi 3B since they're cheap enough.


#11

Thank you all for your help. I installed a new OctoPi image on another microSD.
It works.


#12

Dear OutsourcedGuru... :thinking: sometimes it needs some time...
Nevertheless, thanks a lot to you too.