Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mkegruber opened this issue Jun 24, 2024 · 3 comments

Comments

@mkegruber
Copy link

mkegruber commented Jun 24, 2024

Info

  • Which version of Pi are you using: Raspberry Pi 2 Model B Rev 1.1
  • Which github revision of software: 24.04.01
  • Which board version: 2.7
  • Which computer is the PiSCSI connected to: Amiga 2000
  • Which OS you are using (output of 'lsb_release -a'): Raspbian Release 11

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
Copy link

stinkerton18 commented Jun 25, 2024

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
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants