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

Allow fixed stream label to be used in all sources #943

Closed
wants to merge 2 commits into from

Conversation

paddatrapper
Copy link
Contributor

Fixes: #162

Needs testing, my vagrant setup isn't playing nicely today

@stale
Copy link

stale bot commented Jun 6, 2020

This issue has been automatically marked as stale because it has not had activity in the last 5 months. It will be closed if no activity occurs in the next month.
Please chat to us on discourse or ask for help on our chat if you have any questions or need further support with getting this issue resolved.
You may also label an issue as pinned if you would like to make sure that it does not get closed by this bot.

@stale stale bot added the status: stalled This issue or pull request is stalled label Jun 6, 2020
@stale
Copy link

stale bot commented Jul 6, 2020

This issue has been autmatically closed after is was marked as stale and did not receive any further inputs.
Feel free to let us know on discourse or ask for help on our chat if you feel this issue should not have been closed.
Thank you for your contributions.

@stale stale bot closed this Jul 6, 2020
@paddatrapper paddatrapper reopened this Nov 17, 2020
@stale stale bot removed the status: stalled This issue or pull request is stalled label Nov 17, 2020
@paddatrapper
Copy link
Contributor Author

Does someone have a moment to review this?

@zklosko
Copy link
Member

zklosko commented Nov 22, 2020

My vagrant setup still doesn't want to work, but I can load this up in Multipass and take a look.

@zklosko
Copy link
Member

zklosko commented Nov 22, 2020

Ubuntu Bionic isn't a fan for the install process. You may need to fast-forward or rebase your branch in order to bring the unchanged code up to the most recent version of Libretime.

Unable to correct missing packages.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gstreamer1.0/libgstreamer1.0-0_1.14.5-0ubuntu1~18.04.1_amd64.deb  Undetermined Error [IP: 91.189.88.142 80]
E: Aborting install.
install: line 731: php: command not found

Update: Same goes for Xenial.

-----------------------------------------------------
          * Installing Airtime Services *            
-----------------------------------------------------
The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/a7/e0/30642b9c2df516506d40b563b0cbd080c49c6b3f11a70b4c7a670f13a78b/setuptools-50.3.2.zip (2.1MB)
    100% |████████████████████████████████| 2.1MB 277kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "setuptools/__init__.py", line 16, in <module>
        import setuptools.version
      File "setuptools/version.py", line 1, in <module>
        import pkg_resources
      File "pkg_resources/__init__.py", line 1365
        raise SyntaxError(e) from e
                                ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-zMqtwB/setuptools/
You are using pip version 8.1.1, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

@zklosko
Copy link
Member

zklosko commented Nov 23, 2020

Can not connect to the streaming server
Problem with Liquidsoap...

@paddatrapper
Copy link
Contributor Author

Do you have any logs I can work with?

@zklosko
Copy link
Member

zklosko commented Nov 23, 2020

From /var/logs/airtime/pypo:

2020-11-23 14:01:25,118 [__main__] [INFO ]  Timezone: ('EST', 'EDT')
2020-11-23 14:01:25,120 [__main__] [INFO ]  UTC time: 2020-11-23 19:01:25.120685
2020-11-23 14:01:25,593 [api_client] [INFO ]  Airtime API version found: 1.1
2020-11-23 14:01:25,593 [api_client] [INFO ]  pypo is only compatible with API version: 1.1
2020-11-23 14:01:26,083 [__main__] [ERROR]  [Errno 111] Connection refused
2020-11-23 14:01:26,089 [__main__] [WARNI]  Liquidsoap doesn't appear to be running!, Sleeping and trying again

Etc.

I did manually restart a few services who claimed to not be running but this did not fix the error. Config is standard.

[pypo]
api_client = 'airtime'
cache_dir = '/var/tmp/airtime/pypo/cache/'
file_dir = '/var/tmp/airtime/pypo/files/' 
tmp_dir = '/var/tmp/airtime/pypo/tmp/'
cache_base_dir = '/var/tmp/airtime/pypo'
log_base_dir = '/var/log/airtime'
pypo_log_dir = '/var/log/airtime/pypo'
liquidsoap_log_dir = '/var/log/airtime/pypo-liquidsoap'
ls_host = '127.0.0.1'
ls_port = '1234'
poll_interval = 3600
push_interval = 1
cue_style = 'pre'
record_bitrate = 256
record_samplerate = 44100
record_channels = 2
record_sample_size = 16
record_file_type = 'ogg'
base_recorded_files = '/var/tmp/airtime/show-recorder/'

@paddatrapper
Copy link
Contributor Author

I can't replicate the issue with a clean vagrant instance. Can you describe the steps that you followed to get to the error?

@zklosko
Copy link
Member

zklosko commented Nov 29, 2020

I wasn't using Vagrant. I still have yet to get it to work.

Manually create a new VM, git clone libretime, sudo bash install -fiap.

@paddatrapper
Copy link
Contributor Author

And then? Do you do anything before viewing the logs? Do you run through the config setup?

@zklosko
Copy link
Member

zklosko commented Nov 29, 2020

I did run through the config setup and was even able to upload and schedule tracks.

@paddatrapper
Copy link
Contributor Author

Can you please give me a step-by-step account up to the error?

e.g.

  1. Create VM
  2. git clone https://github.com/paddatrapper/libretime
  3. git checkout liquidsoap-title
  4. sudo ./install -fap
  5. Complete setup without changing defaults
  6. cat /var/log/airtime/pypy/pypo.log

@zklosko
Copy link
Member

zklosko commented Nov 30, 2020

I did it exactly the way you mentioned, except using -fiap to install Icecast as well. Logs follow:

2020-11-29 20:06:36,522 [__main__] [INFO ]  ###########################################
2020-11-29 20:06:36,537 [__main__] [INFO ]  #             *** pypo  ***               #
2020-11-29 20:06:36,538 [__main__] [INFO ]  #   Liquidsoap Scheduled Playout System   #
2020-11-29 20:06:36,538 [__main__] [INFO ]  ###########################################
2020-11-29 20:06:36,539 [__main__] [INFO ]  Timezone: ('EST', 'EDT')
2020-11-29 20:06:36,539 [__main__] [INFO ]  UTC time: 2020-11-30 01:06:36.539428
2020-11-29 20:06:39,025 [api_client] [INFO ]  Unable to get Airtime API version number.

2020-11-29 20:06:44,207 [api_client] [INFO ]  Airtime API version found: 1.1
2020-11-29 20:06:44,207 [api_client] [INFO ]  pypo is only compatible with API version: 1.1
2020-11-29 20:06:44,526 [__main__] [ERROR]  [Errno 111] Connection refused
2020-11-29 20:06:44,530 [__main__] [WARNI]  Liquidsoap doesn't appear to be running!, Sleeping and trying again
2020-11-29 20:06:45,549 [__main__] [ERROR]  [Errno 111] Connection refused
2020-11-29 20:06:45,550 [__main__] [WARNI]  Liquidsoap doesn't appear to be running!, Sleeping and trying again
2020-11-29 20:06:46,552 [__main__] [ERROR]  [Errno 111] Connection refused
2020-11-29 20:06:46,552 [__main__] [WARNI]  Liquidsoap doesn't appear to be running!, Sleeping and trying again

Maybe it has to do with Pypo's inability to find the API version number?

@paddatrapper
Copy link
Contributor Author

2020-11-29 20:06:44,207 [api_client] [INFO ]  Airtime API version found: 1.1
2020-11-29 20:06:44,207 [api_client] [INFO ]  pypo is only compatible with API version: 1.1

Seems to be matching correctly

@zklosko
Copy link
Member

zklosko commented Nov 30, 2020

I'm just as stumped. Liquidsoap wasn't running initially, so I had to manually restart it. The issue persisted.

@hairmare
Copy link
Member

hairmare commented Nov 30, 2020

There is two of them :(

https://github.com/LibreTime/libretime/blob/b73adda6377e21ec5d3ba5cbf81427ae5f0348d1/python_apps/api_clients/api_clients/api_client.py#L224-L233

Smells like a unicode issue or (rather unrealistic) something related to having alphas and betas. Maybe introduced with py3 being more unicode. It might also be liquidsoap version related but I'm assuming you're on .deb packages so that is probably not the issue.

Is this a beta-3 blocker btw?

side note: whe should get rid of the [0:3] code that has it's limits and replace it with native semver parsing of sorts.

@paddatrapper
Copy link
Contributor Author

There is a semver comp method in there somewhere that I can probably use here. And will definitely update those logging messages..

@paddatrapper
Copy link
Contributor Author

Is this a beta-3 blocker btw?

No. This is just a nice to have.

I have updated the logging messages, so hopefully we can get a better idea if that is where this is failing for @zklosko. The semver matching I won't include in this PR, but will update as part of #958 as that re-works much of the api_client

@zklosko
Copy link
Member

zklosko commented Jan 16, 2021

The Pypo and Libretime Analyzer keep crashing.

time-liquidsoap.service: Main process exited, code=exited, status=1/FAILURE
time-liquidsoap.service: Failed with result 'exit-code'.
time-liquidsoap.service: Service hold-off time over, scheduling restart.
time-liquidsoap.service: Scheduled restart job, restart counter is at 5.
ed Libretime Liquidsoap Service.

@paddatrapper
Copy link
Contributor Author

Is there more above those lines in the logs? You may need to use jounalctl -xe

@stale
Copy link

stale bot commented Jun 18, 2021

This issue has been automatically marked as stale because it has not had activity in the last 5 months. It will be closed if no activity occurs in the next month.
Please chat to us on discourse or ask for help on our chat if you have any questions or need further support with getting this issue resolved.
You may also label an issue as pinned if you would like to make sure that it does not get closed by this bot.

@stale stale bot added the status: stalled This issue or pull request is stalled label Jun 18, 2021
@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically closed after is was marked as stale and did not receive any further inputs.
Feel free to let us know on discourse or ask for help on our chat if you feel this issue should not have been closed.
Thank you for your contributions.

@stale stale bot closed this Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: stalled This issue or pull request is stalled
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stream label formatting only works for scheduled tracks, not for master or show sources
4 participants