PiSCSI / piscsi

PiSCSI allows a Raspberry Pi to function as emulated SCSI devices (hard disk, CD-ROM, and others) for vintage SCSI-based computers and devices. This is a fork of the RaSCSI project by GIMONS.
https://piscsi.org
BSD 3-Clause "New" or "Revised" License
545 stars 82 forks source link

PISCSI fails with "Can't connect to piscsi on host 'localhost', port 6868: Connection refused" #1470

Open mkegruber opened 5 months ago

mkegruber commented 5 months ago

Info

Describe the issue

I completed

After formatting, I shutdown the PI and Amiga.

Then... 1 - rebooted PI 2 - edited piscsi.service, change to

**[Unit] Description=PISCSI device After=network.target

[Service] Type=simple Restart=always ExecStart=/usr/local/bin/piscsi -ID1 /home/rascsi/images/WB500MB.hda -ID2 /home/rascsi/images/WORK500MB.hda ExecStop=/usr/local/bin/scsictl -X SyslogIdentifier=PISCSI

[Install] WantedBy=multi-user.target**

3 - rebooted the PI 4 - display during reboot

[FAILED] Failed to start PISCSI service

5 - sudo systemctl status piscsi.service

piscsi.service: Start request repeated too quickly (is this becaue I tried to attach 2x devices on the same command line?)

6 - when I tried scsictl -l after the reboot I get "Error: Can't connect to piscsi on host 'localhost', port 6868: Connection refused", so I created boot/ssh blank file and rebooted, but that did not seem to work.

See screen shot attached.

IMG_1316


Rebooted again, logged in via SSH...(so I could cut/paste)

Linux RASCSI 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon Jun 24 21:28:36 2024 rascsi@RASCSI:~ $ sudo systemctl status piscsi.service ● piscsi.service - PiSCSI service Loaded: loaded (/etc/systemd/system/piscsi.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2024-06-24 21:28:34 AEST; 1min 6s ago Process: 493 ExecStart=/usr/local/bin/piscsi -ID1 /home/rascsi/images/WB500MB.hda -ID2 /home/rasci/images/WORK500MB.hda (code=exited, status=1/FAILURE) Main PID: 493 (code=exited, status=1/FAILURE) CPU: 100ms

Jun 24 21:28:34 RASCSI systemd[1]: piscsi.service: Scheduled restart job, restart counter is at 5. Jun 24 21:28:34 RASCSI systemd[1]: Stopped PiSCSI service. Jun 24 21:28:34 RASCSI systemd[1]: piscsi.service: Start request repeated too quickly. Jun 24 21:28:34 RASCSI systemd[1]: piscsi.service: Failed with result 'exit-code'. Jun 24 21:28:34 RASCSI systemd[1]: Failed to start PiSCSI service.

Then I tried...

rascsi@RASCSI:~ $ sudo systemctl daemon-reload rascsi@RASCSI:~ $ sudo systemctl restart piscsi.service rascsi@RASCSI:~ $ sudo scsictl -l Error: Can't connect to piscsi on host 'localhost', port 6868: Connection refused (Note: this is via my SSH Putty terminal) rascsi@RASCSI:~ $

stinkerton18 commented 5 months ago

According to the error in the service start logs in your screenshot, the piscsi service failed to start with "Error: Can't attach devices". This is usually an indicator that either the path you specified to the HDA files is wrong (misspelling/capitalization/etc.) or the permissions are set incorrectly. The images folder should be set as 775.

To confirm it's an access issue with the image files you specified, I did take the changes you did to the piscsi.service file and applied them myself to my PiSCSI (modified slightly to use the local user account and image files I have), it worked as expected with the service being able to start both manually and on reboot. Screenshot attached. PiSCSI Service Test

As a second validation, I did edit/alter the starting command line to make both image file paths/names point to something that's not valid, and confirmed the service cannot start. At least 1 of the referenced command line images must be valid: PiSCSI Failure

stinkerton18 commented 5 months ago

Also, the "Error: Can't connect to piscsi on host 'localhost', port 6868: Connection refused" is normal/expected when the piscsi service itself is fully stopped.

stinkerton18 commented 4 months ago

Hello @mkegruber, just checking in to see if you had read/seen my previous messages and if you still cannot get the PiSCSI service to start after checking/validating access to the image files.