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

Socket issue still not connecting #9174

Closed
JoshWho opened this issue Jul 1, 2024 · 14 comments
Closed

Socket issue still not connecting #9174

JoshWho opened this issue Jul 1, 2024 · 14 comments
Labels

Comments

@JoshWho
Copy link
Contributor

JoshWho commented Jul 1, 2024

image

@DanielnetoDotCom
Copy link
Member

you need to make a git pull and try the test again for more clues.

@DanielnetoDotCom
Copy link
Member

BTW, I guess your server is resolving IPv6, you should disable it and force IPv4

Certainly! Here’s a short guide on how to disable IPv6 on network interfaces only on Ubuntu:

Step-by-Step Guide to Disable IPv6 on Network Interfaces

  1. Open the sysctl configuration file:

    Open the /etc/sysctl.conf file using a text editor. You need superuser privileges to edit this file.

    sudo nano /etc/sysctl.conf
  2. Add the following lines to disable IPv6:

    Append the following lines at the end of the /etc/sysctl.conf file to disable IPv6 on all network interfaces:

    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
  3. Apply the changes:

    Save the changes and apply the new settings using the following command:

    sudo sysctl -p
  4. Verify the changes:

    To verify that IPv6 has been disabled on all interfaces, you can check the status of IPv6 for your network interfaces:

    sysctl net.ipv6.conf.all.disable_ipv6
    sysctl net.ipv6.conf.default.disable_ipv6
    sysctl net.ipv6.conf.lo.disable_ipv6

    Each of these commands should return net.ipv6.conf.*.disable_ipv6 = 1, indicating that IPv6 is disabled.

Optional: Make the Changes Persistent Across Reboots

The above steps should persist across reboots. However, if you want to ensure that IPv6 remains disabled, you can create or modify a configuration file in the /etc/sysctl.d/ directory.

  1. Create a custom sysctl configuration file:

    sudo nano /etc/sysctl.d/99-disable-ipv6.conf
  2. Add the same lines to the new file:

    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
  3. Apply the changes:

    sudo sysctl -p /etc/sysctl.d/99-disable-ipv6.conf

By following these steps, you will successfully disable IPv6 on network interfaces only on your Ubuntu system.

@JoshWho
Copy link
Contributor Author

JoshWho commented Jul 2, 2024

BTW, I guess your server is resolving IPv6, you should disable it and force IPv4

Certainly! Here’s a short guide on how to disable IPv6 on network interfaces only on Ubuntu:

Step-by-Step Guide to Disable IPv6 on Network Interfaces

  1. Open the sysctl configuration file:
    Open the /etc/sysctl.conf file using a text editor. You need superuser privileges to edit this file.

    sudo nano /etc/sysctl.conf
  2. Add the following lines to disable IPv6:
    Append the following lines at the end of the /etc/sysctl.conf file to disable IPv6 on all network interfaces:

    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
  3. Apply the changes:
    Save the changes and apply the new settings using the following command:

    sudo sysctl -p
  4. Verify the changes:
    To verify that IPv6 has been disabled on all interfaces, you can check the status of IPv6 for your network interfaces:

    sysctl net.ipv6.conf.all.disable_ipv6
    sysctl net.ipv6.conf.default.disable_ipv6
    sysctl net.ipv6.conf.lo.disable_ipv6

    Each of these commands should return net.ipv6.conf.*.disable_ipv6 = 1, indicating that IPv6 is disabled.

Optional: Make the Changes Persistent Across Reboots

The above steps should persist across reboots. However, if you want to ensure that IPv6 remains disabled, you can create or modify a configuration file in the /etc/sysctl.d/ directory.

  1. Create a custom sysctl configuration file:
    sudo nano /etc/sysctl.d/99-disable-ipv6.conf
  2. Add the same lines to the new file:
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
  3. Apply the changes:
    sudo sysctl -p /etc/sysctl.d/99-disable-ipv6.conf

By following these steps, you will successfully disable IPv6 on network interfaces only on your Ubuntu system.

I was thinking the IPv6 might have been the issue. Will give that a try soon.

@JoshWho
Copy link
Contributor Author

JoshWho commented Jul 3, 2024

image

IPV6 disabled

@DanielnetoDotCom
Copy link
Member

I did asked you to update a while ago and you still did not do it.

Is hard to help you if you don't follow the instructions

@JoshWho
Copy link
Contributor Author

JoshWho commented Jul 3, 2024

Sorry, I thought I did. Let me git pull real quick

@JoshWho
Copy link
Contributor Author

JoshWho commented Jul 3, 2024

root@server:/var/www/html/AVideo# php /var/www/html/AVideo/plugin/YPTSocket/test.php
[2024-07-02 21:12:08] ** Starting socket test **
[2024-07-02 21:12:08] nc: connect to 127.0.0.1 port 2053 (tcp) failed: Connection refused
[2024-07-02 21:12:08] Port 2053 is not open on localhost
root@server:/var/www/html/AVideo#

@JoshWho
Copy link
Contributor Author

JoshWho commented Jul 3, 2024

This makes no sense the firewall says it is open

@DanielnetoDotCom
Copy link
Member

That means your socket is not running

Follow this https://github.com/WWBN/AVideo/wiki/Socket-Plugin#step-5-test-the-socket-connection

@DanielnetoDotCom
Copy link
Member

Share the output of this command

sudo php /var/www/html/AVideo/plugin/YPTSocket/server.php

@JoshWho
Copy link
Contributor Author

JoshWho commented Jul 3, 2024

root@server:~# sudo php /var/www/html/AVideo/plugin/YPTSocket/server.php
sudo apt-get install php-sqlite3
after that in your php.ini (/etc/php/8.3/cli/php.ini) file to uncomment this line:
;extension=pdo_sqlite.so
Starting AVideo Socket server version 5.3 on port 2053
Your socket server uses a secure connection
Parameter [local_cert]: /etc/letsencrypt/live/ftjmedia.com/fullchain.pem
Parameter [local_pk]: /etc/letsencrypt/live/ftjmedia.com/privkey.pem
Parameter [allow_self_signed]:
Parameter [verify_peer]:
Parameter [verify_peer_name]:
Parameter [security_level]: 0
DO NOT CLOSE THIS TERMINAL

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Socket\Message::__construct(), 0 passed in /var/www/html/AVideo/plugin/YPTSocket/server.php on line 176 and exactly 1 expected in /var/www/html/AVideo/plugin/YPTSocket/Message.php:23
Stack trace:
#0 /var/www/html/AVideo/plugin/YPTSocket/server.php(176): Socket\Message->__construct()
#1 {main}
thrown in /var/www/html/AVideo/plugin/YPTSocket/Message.php on line 23

@DanielnetoDotCom
Copy link
Member

Please read the output

You are missing the php-sqlite3

@JoshWho
Copy link
Contributor Author

JoshWho commented Jul 3, 2024

I just facepalmed myself and did that. Thank you it is working now

@JoshWho JoshWho closed this as completed Jul 3, 2024
@JoshWho
Copy link
Contributor Author

JoshWho commented Jul 3, 2024

Screenshot - 2024-07-02T212229 971

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

No branches or pull requests

2 participants