Notifications
Clear all

500 Internal Server Error  

Page 1 / 2
  RSS
Ant
 Ant
(@ant)
Membre
500 Internal Server Error

Hi,

Just added 0.6.0 on a MK3S, when I enter the machines serial number on the first page I just get 500 Internal Server Error, nothing of any help in the Daemon.log, anybody got any ideas??  Reflashed the SD car and updated the firmware to the latest version

Publié : 27/12/2021 4:58 pm
DanielAttia
(@danielattia)
Membre
RE: 500 Internal Server Error

Are you currently using a RasPi Zero W via the RPi port or a regular RasPi 3/4 via USB? Which firmware do you currently have installed on your MK3S?

Publié : 27/12/2021 8:02 pm
Ant
 Ant
(@ant)
Membre
Topic starter answered:
RE: 500 Internal Server Error

RPI Zero W on the RPI port

and 3.10.1 firmware

Publié : 27/12/2021 11:17 pm
DanielAttia
(@danielattia)
Membre
RE:

Have you tried using a different web browser to do the PrusaLink Setup Wizard? Did you previously use PrusaLink with the previous 0.5.2 image?

Publié : 27/12/2021 11:31 pm
Ant
 Ant
(@ant)
Membre
Topic starter answered:
RE: 500 Internal Server Error

Tried using Chrome but same error, only used 0.6.0 but will try the 0.5.2 see what happens 

Publié : 28/12/2021 5:19 am
agryson
(@agryson)
Membre
RE: 500 Internal Server Error

I have also encountered this issue.

RPI Zero W, RPI Port, 3.10 firmware, 0.6.0 image

(I've never used the previous 0.5.2 image as I'm new to the beta program).

The issue presents itself in both chrome and edge.

 

Wizard loads successfully, can enter serial number but when I click 'set up authorization' I get the 500 error.

Publié : 28/12/2021 3:08 pm
Ant
 Ant
(@ant)
Membre
Topic starter answered:
RE: 500 Internal Server Error

Right.. so refreshed the software to 0.5.2 and it worked first time, looks like an issue with 0.6.0 and new registrations

 

Publié : 28/12/2021 4:24 pm
DanielAttia
(@danielattia)
Membre
RE: 500 Internal Server Error

I would recommend trying a non-chromium-based browser such as Firefox, as the issue might be that the browser is flagging the page as it doesn't have an SSL Certificate. Also, try clearing your browser cookies to see if the issue is still apparent.

Posted by: @agryson

I have also encountered this issue.

RPI Zero W, RPI Port, 3.10 firmware, 0.6.0 image

(I've never used the previous 0.5.2 image as I'm new to the beta program).

The issue presents itself in both chrome and edge.

 

Wizard loads successfully, can enter serial number but when I click 'set up authorization' I get the 500 error.

 

Publié : 28/12/2021 6:38 pm
Jasper
(@jasper)
Membre
RE: 500 Internal Server Error

I have got exact the same issue... Tried both Chrome & Safari, but neither works. Also when using the 0.6.0 image, RPI Zero W 2 and 3.10 firmware. So have to use the 0.5.2 image first?

Publié : 28/12/2021 7:11 pm
DanielAttia
(@danielattia)
Membre
RE: 500 Internal Server Error

While it shouldn’t be an issue, are all of the packages in the RasPi Up-to-date? I know that even with the 0.6.0 image, there were quite a few packages that were out-of-date when I initially installed the image.

Publié : 28/12/2021 7:30 pm
JessenJonas
(@jessenjonas)
Membre
RE: 500 Internal Server Error

Encountering same issue.

Not even able to connect to SSH (missing password for default user "pi") or by USB to printer to set it up that way.

RPI Zero 2 W.

Publié : 28/12/2021 8:01 pm
DanielAttia
(@danielattia)
Membre
RE: 500 Internal Server Error

It is advised to set up the image using the Raspberry Pi Imager, as it would allow you to change the password for the pi user and enable ssh before loading the image to the sd card.

Posted by: @jessenjonas

Encountering same issue.

Not even able to connect to SSH (missing password for default user "pi") or by USB to printer to set it up that way.

RPI Zero 2 W.

 

Publié : 28/12/2021 8:21 pm
JessenJonas
(@jessenjonas)
Membre
RE: 500 Internal Server Error

 

Posted by: @danielattia

It is advised to set up the image using the Raspberry Pi Imager, as it would allow you to change the password for the pi user and enable ssh before loading the image to the sd card.

Posted by: @jessenjonas

Encountering same issue.

Not even able to connect to SSH (missing password for default user "pi") or by USB to printer to set it up that way.

RPI Zero 2 W.

 

Well at least i forgot that i had setup the password in the imager... However, I am experiencing the same issue as the poster.

Publié : 28/12/2021 8:25 pm
Timo
 Timo
(@timo-2)
Membre
RE: 500 Internal Server Error

 

Posted by: @ant

Right.. so refreshed the software to 0.5.2 and it worked first time, looks like an issue with 0.6.0 and new registrations

 

I can concur. Had the same issue today when adding a second printer. Error 500 on S/N setup.

What fixed it for me was the following:

  • Downgraded to a fresh install of 0.5.2 and set up the S/N and completed the rest of the install.
  • Upgraded to a fresh install of 0.6.0

Looking at /var/log/messages I suspect that in 0.6.0 there is an issue with writing the S/N to EEPROM when it has never been done before.

If the S/N is in EEPROM 0.6.0 can read it and works as expected.

I have no special talent. I am only passionately curious

Publié : 28/12/2021 10:56 pm
Matthew
(@matthew)
Membre
RE: 500 Internal Server Error

Having the same problem here.  Pi Zero W, 0.6.0, firmware 3.10.1.  Browser is chrome on Linux.  This is my first time trying to set up PrusaLink/PrusaConnect.

Publié : 29/12/2021 5:29 am
JessenJonas
(@jessenjonas)
Membre
RE: 500 Internal Server Error

Tried to dig into the different logs and in "/var/log/syslog" it says the following:

PrusaLink interesting_logger[520]: WARNING: Was[DEBUG]: Instruction 'PRUSA SN' refused confirmation. Hopefully it has a reason for that {_confirmed():399}

and in "pi/.local/lib/python3.9/site-packages/prusa/link/printer_adapter/input_output/serial/serialqueue.py" if found the following code, which is reporting that error:

def _confirmed(self, force=False): """ Printer confirmed an instruction. Tears down the instruction and prepares the module for processing of a new one """ if self.current_instruction is None or \ not self.current_instruction.is_sent(): log.error("Unexpected message confirmation. Ignoring") elif self.current_instruction.confirm(force=force): if not force: # If a message was successfully confirmed, the rpi port # had to be ok imo errors.RPI_ENABLED.ok = True self.instruction_confirmed_signal.send(self) with self.write_lock: instruction = self.current_instruction

# If the instruction did not refuse to be confirmed # Yes, that needs to happen log.debug("%s confirmed", instruction)

self._teardown_output_capture()

if instruction.to_checksum: # Only check those times for check-summed instructions self.is_planner_fed.process_value( instruction.time_to_confirm)

self.current_instruction = None else: InterestingLogRotator.trigger("instruction refusing confirmation.") log.debug( "%s refused confirmation. Hopefully it has a reason " "for that", self.current_instruction)

self._try_writing()

Trying to see if I can make any sense of this error.

I believe installing 0.5.2 is a workaround, but if this is not being investigated then installing 0.6.0 is not going to work, so I am not installing 0.5.2.

Publié : 29/12/2021 11:39 am
JessenJonas
(@jessenjonas)
Membre
RE: 500 Internal Server Error

Actually just found this in"var/log/syslog"

Dec 29 13:30:21 PrusaLink prusa.link.web.errors[505]: ERROR: #012  File "/home/pi/.local/lib/python3.9/site-packages/poorwsgi/wsgi.py", line 1084, in __request__#012    args = self.handler_from_table(request)#012  File "/home/pi/.local/lib/python3.9/site-packages/poorwsgi/wsgi.py", line 1004, in handler_from_table#012    return handler(req)       # call right handler now#012  File "/home/pi/.local/lib/python3.9/site-packages/prusa/link/web/wizard.py", line 157, in wizard_serial_set#012    sn_reader = app.daemon.prusa_link.sn_reader#012AttributeError("'PrusaLink' object has no attribute 'sn_reader'") {internal_server_error():38}
Dec 29 13:30:21 PrusaLink prusa.link.web.lib.classes[505]: INFO: 192.168.210.174 - "POST /wizard/serial HTTP/1.1" 500 1545 {log_message():45}

Which as far as i know and understand, is returning an error 500 (Internal_server_error)

Publié : 29/12/2021 12:31 pm
JessenJonas
(@jessenjonas)
Membre
RE: 500 Internal Server Error

From my research, it seems like that the attribute "sn_reader" for "app.daemon.prusa_link" doesn't exist anywhere else than in this wizard python document and in the settings python document

pi@PrusaLink:~/.local/lib/python3.9/site-packages/prusa/link/web $ grep -rn -e 'sn_reader'
wizard.py:161:    sn_reader = app.daemon.prusa_link.serial_queue
wizard.py:162:    sn_reader.try_getting_sn()
wizard.py:164:        if not sn_reader.interested_in_sn:
grep: __pycache__/wizard.cpython-39.pyc: binary file matches
grep: __pycache__/wizard.cpython-39.opt-2.pyc: binary file matches
grep: __pycache__/settings.cpython-39.opt-2.pyc: binary file matches
grep: __pycache__/settings.cpython-39.pyc: binary file matches
settings.py:157:            sn_reader = app.daemon.prusa_link.sn_reader
settings.py:158:            sn_reader.try_getting_sn()
settings.py:160:                if not sn_reader.interested_in_sn:  # sn was read

Perhaps the reason that it works on 0.5.2 is that it can actually take the serial number we write in the wizard and save it on the printer, whereas 0.6.0 don't can.

and since in 0.5.2 can write it to the printer, the sn_reader attribute exist afterwards, where if we start witht he 0.6.0, since it can't write to the printer, then the attribute don't exist?

I added a bit of code that writes in the syslog, where I can see that the attribute don't exist when i'm trying to install 0.6.0

Dec 29 16:01:42 PrusaLink poorwsgi[510]: WARNING: {'cfg': <prusa.link.config.Config object at 0x758a8490>, 'settings': <prusa.link.config.Settings object at 0x767314d8>, 'running': True, 'stopped_event': <threading.Event object at 0x758a8d30>, 'model': <prusa.link.printer_adapter.model.Model object at 0x75a6dc10>, 'serial_parser': <prusa.link.printer_adapter.input_output.serial.serial_parser.SerialParser object at 0x75f4ad00>, 'serial': <prusa.link.printer_adapter.input_output.serial.serial_adapter.SerialAdapter object at 0x757f10a0>, 'serial_queue': <prusa.link.printer_adapter.input_output.serial.serial_queue.MonitoredSerialQueue object at 0x758a8ce8>, 'printer': <prusa.link.sdk_augmentation.printer.MyPrinter object at 0x756e0280>, 'lcd_printer': <prusa.link.printer_adapter.input_output.lcd_printer.LCDPrinter object at 0x7581c418>, 'job': <prusa.link.printer_adapter.informers.job.Job object at 0x7581c5c8>, 'state_manager': <prusa.link.printer_adapter.informers.state_manager.StateManager object at 0x7581c5e0>, 'telemetry_gatherer': <prusa.link.printer_adapter.informers.telemetry_gatherer.TelemetryGatherer object at 0x7581c5b0>, 'print_stats': <prusa.link.printer_adapter.print_stats.PrintStats object at 0x7581e4f0>, 'file_printer': <prusa.link.printer_adapter.file_printer.FilePrinter object at 0x7581e538>, 'storage': <prusa.link.printer_adapter.informers.filesystem.storage_controller.StorageController object at 0x75f4a9d0>, 'ip_updater': <prusa.link.printer_adapter.informers.ip_updater.IPUpdater object at 0x7581e550>, 'mk3_polling': <prusa.link.printer_adapter.mk3_polling.MK3Polling object at 0x7581efa0>, 'command_queue': <prusa.link.printer_adapter.command_queue.CommandQueue object at 0x757604c0>, 'reporting_ensurer': <prusa.link.printer_adapter.reporting_ensurer.ReportingEnsurer object at 0x7575ad18>, 'last_sent_telemetry': 1640789993.464815, 'telemetry_thread': <Thread(telemetry_passer, started 1832875072)>} {wizard_serial_set():159}
Dec 29 16:01:42 PrusaLink poorwsgi[510]: WARNING: ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'byte_position_changed', 'cfg', 'check_printer', 'command_queue', 'debug_shell', 'dir_mount', 'dir_unmount', 'download_finished_cb', 'execute_gcode', 'file_path_observed', 'file_printer', 'file_printer_finished_printing', 'file_printer_started_printing', 'file_printer_stopped_printing', 'fw_pause_print', 'fw_resume_print', 'get_telemetry_interval', 'instruction_confirmed', 'ip_updated', 'ip_updater', 'job', 'job_id_updated', 'job_info', 'job_info_updated', 'keep_sending_telemetry', 'last_sent_telemetry', 'lcd_printer', 'load_filament', 'mk3_polling', 'model', 'pause_print', 'post_state_change', 'pre_state_change', 'print_stats', 'printed_file_cb', 'printer', 'printer_registered', 'printer_reset', 'progress_broken', 'reporting_ensurer', 'reset_printer', 'resume_print', 'running', 'sd_mount', 'sd_print_start_observed', 'sd_ready', 'sd_unmount', 'send_telemetry', 'serial', 'serial_failed', 'serial_parser', 'serial_queue', 'serial_queue_failed', 'serial_renewed', 'set_sn', 'settings', 'start_print', 'state_changed', 'state_manager', 'stop', 'stop_print', 'stopped_event', 'storage', 'stuck_serial', 'telemetry_gathered', 'telemetry_gatherer', 'telemetry_observed_no_print', 'telemetry_observed_print', 'telemetry_observed_sd_pause', 'telemetry_observed_serial_pause', 'telemetry_thread', 'time_printing_updated', 'unload_filament', 'unstuck_serial'] {wizard_serial_set():160}

I can see that the serial number is being encoded to GCODE and is being sent to the printer:

Dec 29 16:01:42 PrusaLink interesting_logger[510]: WARNING: Was[DEBUG]: Instruction 'D3 Ax0d15 C16 X435a50583336323058303034584b3133' enqueued.  to the front {enqueue_one():290}
Dec 29 16:01:42 PrusaLink interesting_logger[510]: WARNING: Was[DEBUG]: Instruction 'D3 Ax0d25 C4 X35383800' enqueued.  to the front {enqueue_one():290}

But seems like that it is refusing the "confirmation" and therefore drops everything?

Dec 29 16:22:00 PrusaLink interesting_logger[510]: WARNING: Was[DEBUG]: Instruction 'PRUSA SN' refused confirmation. Hopefully it has a reason for that {_confirmed():399}

Currently I don't have a 0.5.2 on me, which i can try to hook up, and try to match the python codes to see if something is set wrong.
But perhaps the PrusaLink developers should have a look at this, if not already.

Publié : 29/12/2021 3:22 pm
DanielAttia a aimé
Matthew
(@matthew)
Membre
RE: 500 Internal Server Error

Jumping back to 0.52.0 and running the wizard seems to work.  I could then switch back to 0.60.0 and the setup proceeds as it's supposed to.

Still not able to register with Connect, but that's another issue.

Publié : 30/12/2021 1:03 am
Jasper
(@jasper)
Membre
RE: 500 Internal Server Error

Just like Matthew, I was able to get the wizard further by using 0.5.2 image first (which registers the s/n without problems). From there on the 0.6 image works, but I cannot do the final step to register at Prusa connect. This results in a 500 🙁

Publié : 30/12/2021 2:55 pm
Page 1 / 2
Partager :