Azure VM (linux centos 8) cannot mount disks

mmac 71 Reputation points
2024-11-14T20:18:17.8066667+00:00

Getting this message when trying to mount restore points. Turned off firewall, selinux - nothing seems to be using the port.

We are unable to communicate via the port 3260 on this machine since it is being used by ISCSI target server or any other application. Please unblock the port or use another machine where the port is open for communicatoin

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,134 questions
{count} votes

Accepted answer
  1. Nikhil Duserla 3,465 Reputation points Microsoft Vendor
    2024-11-25T18:18:28.7566667+00:00

    Hi @mmac,

    Thank you for reaching out to us again and confirming that the issue has been resolved.

    As an original poster cannot accept their own answer, I am reposting it so that you can accept it an answer. Accepted answer will help other community members navigate to the appropriate solutions.

    Issue: We are unable to communicate via the port 3260 on this machine since it is being used by ISCSI target server or any other application. Please unblock the port or use another machine where the port is open for communication.

    Solution: Go into system delete all of the targetcli/iscsi entries i had made, save config.

    targetcli /iscsi delete targetname targetcli save

    targetcli ls

    located some of the old python scripts- ran them with the 'clean' option. rebooted. explicitly stopped and started the the service 'systemctl stop target.service' & 'systemctl start target.service'. Confirmed the deletion was still there 'targetcli ls'

    Ran a download script and it magically worked.

    Random guess - the server was holding on to an older recovery and the steps above cleared something.

    User's image

    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Mounika Reddy Anumandla 1,145 Reputation points Microsoft Vendor
    2024-11-15T05:30:26.6+00:00

    Hi mmac,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    The error message you're encountering indicates that there is an issue with the iSCSI connection, specifically related to port 3260, which is the default port used for iSCSI communication.

    I would recommend the following troubleshooting steps:

    • Since the error message suggests that port 3260 may already be in use, you can check for any processes that might be using this port:
       *sudo netstat -tuln | grep 3260*
      
    • Even though you've turned off the firewall and SELinux, it's worth double-checking that there are no lingering rules that could be affecting the connection.
    • Use the following command to check for any active firewall rules: sudo iptables -L -n
    • Ensure that SELinux is indeed disabled by running: sestatus
    • You can test connectivity to the iSCSI target using telnet or nc (netcat) to see if you can reach the target on port 3260:
       *telnet <IP_ADDRESS_OF_ISCSI_TARGET> 3260*
      
    • If everything seems fine, try using the iscsiadm command to reconnect to the target.
    • Sometimes, restarting the iSCSI service can help resolve port conflicts. If you have any further queries, do let us know. If the answer is helpful, please click "Accept Answer" and "Upvote it."
    1 person found this answer helpful.

  2. mmac 71 Reputation points
    2024-11-18T14:43:18.9633333+00:00

    Still no joy.

    User's image


  3. Nikhil Duserla 3,465 Reputation points Microsoft Vendor
    2024-11-21T23:30:31.2666667+00:00

    Hi @mmac,

    Thank you for your patience. In addition to @Mounika Reddy Anumandla , I reproduced the same scenario in my tenant, and I was able to confirm that my connection was successful. I will clearly guide you through the steps that you can follow to resolve the issue

    Create backing storage device:

    Before we start working on our iSCSI target, we need a backend storage and create partition.

    Physical Volume: sudo pvcreate /dev/sdb1

    Volume group: vgcreate vg_iscsi /dev/sdb1

    Logical Volume: sudo lvcreate -l 100%FREE -n lv_iscsi vg_iscsi

    Install targetcli rpm: sudo yum install targetcli -y

    User's image

    User's image

    Managing iSCSI targets with targetcli: sudo targetcli

    User's image

    Now use an existing logical volume (/dev/vg_iscsi/lv_iscsi) as a block-type backing store for storage object scsi_disk1_server. 

    /backstores/block> create scsi_disk1_server /dev/vg_iscsi/lv_iscsiUser's image Creating iSCSI targets: cd /iscsi

    User's image we will now create an iSCSI target: create wwn=iqn.2018-12.com.example:servers.

    I am taking on my actions: create iqn.2016-02.local.itzgeek.server:disk1

    User's image

    Adding ACLs:

    User's image

    Adding LUNs to the iSCSI target:

    User's image

    Verify the target server configuration and saveconfig and exit.

    User's image

    User's image

    Update Firewall: User's image

    Start and enable target service:

    User's image

    Setting Up the iSCSI Initiator in target server: sudo yum -y install iscsi-initiator-utils

    User's image

    Setting the iSCSI Initiatorname: vi /etc/iscsi/initiatorname.iscsi -update the file with the ACL name we used on the iSCSI target

    User's image

    Discover the LUNs: sudo iscsiadm --mode discovery --type sendtargets --portal 10.0.0.6 --discover 10.0.0.6:3260,1 iqn.2016-02.local.itzgeek.server:disk1

    User's image

    After the discovery below database is updated:

    sudo ls -l /var/lib/iscsi/nodes

    sudo ls -l /var/lib/iscsi/send_targets/10.0.0.6,3260/

    User's image

    User's image

    Making the connection: sudo iscsiadm --mode node --targetname iqn.2016 02.local.itzgeek.server:disk1 --loginUser's image

    If you have any further queries, do let us know.


  4. mmac 71 Reputation points
    2024-11-22T18:17:15.3133333+00:00

    I think this topic is getting off course. What i am trying to do is mount the backup volumes on a CentOS 8 server. I am getting the error message after i download and run the python script from the backup restore:

    "We are unable to communicate via the port 3260 on this machine since it is being used by ISCSI target server or any other application. Please unblock the port or use another machine where the port is open for communication"

    I started to configure iscsi and make sure port 3260 is available as this seemed like a logical path. Now it seems that people are getting me to create luns, logical volumes, etc. Which i dont think is needed. The script just wants to mount the retore point volumes. Which should not require any of the advanced configuration that is mentioned.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.