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

Unifi network application #374

Merged

Conversation

GiuseppeGalilei
Copy link
Contributor

@GiuseppeGalilei GiuseppeGalilei commented Dec 26, 2023

Closes #371

As said in issue #371, casaos currently offers unifi-controller, which is being deprecated starting January 1st.
Linuxserver has replaced it with unifi-network-application. However deployment is a bit more complicated.
You can read more here.

I wrote a compose file that deploys both unifi-network-application and mongodb.

For mongoDB the chosen version is 3.6 and I believe it should not be changed, because:

  • it is officially supported by unifi-network-application
  • it is the latest mongodb version supported by ARMv8A devices (aka Raspberry Pis), newer versions require ARMv8.2

For unifi-network-application I tested the latest version (as of today 8.0.24) and it seems to work well, however I'm asking for more testing and opinions, reason why in the compose I left the "latest" tag.

The compose also creates a bridge network, needed for hostname resolution between the two services, needed at least until this issue is resolved.

The only caveats, from a user perspective, are described in the app "tips", I paste them here:

    To properly initialize the database, before installing, create a file named `init-mongo.js` in the `/DATA/AppData` folder, with 
    the following content:
    ```
    db.getSiblingDB("unifi-db").createUser({user: "unifi", pwd: "pass", roles: [{role: "dbOwner", db: "unifi-db"}]}); 
    db.getSiblingDB("unifi-db_stat").createUser({user: "unifi", pwd: "pass", roles: [{role: "dbOwner", db: "unifi-db_stat"}]});
    ```
    This file is used only upon the first container start, to perform initial configuration.
    If you want, you can change the password `pass` modifying this file and then the container's environment variables.

    Because the network application runs inside Docker by default it uses an IP address not accessible by other devices.
    So, for it to adopt other devices, it is required to use port `8080` and change the inform IP address. To do so, go in settings 
    and search for the `Inform Host` option, there select override and set the address to that of the host.
    Often, it is also needed to ssh into the devices you want to adopt and manually set the inform IP address, the command 
    needed for doing so is `set-inform http://HOST-ADDRESS:8080/inform`.

    For more [information](https://docs.linuxserver.io/images/docker-unifi-network-application/)

I'm currently using an almost identical compose, deployed through portainer on a Raspberry Pi 3 not using CasaOS, and it is working flawlessly. (be careful on low memory devices because this application can use about 500MB of memory)
I tested this PR on an x86 device and I can confirm deployment is succesful and the network-application launches and configures correctly. However I didn't test the adoption of unifi devices and everyday usage.
I believe there should be no issue, but any other test is warmly welcomed.
Other useful info: https://github.com/GiuseppeGalilei/Ubiquiti-Tips-and-Tricks/blob/main/Unifi%20network%20application%20-%20CasaOS/instructions.md

Happy holidays!

@GiuseppeGalilei GiuseppeGalilei marked this pull request as ready for review December 26, 2023 16:27
@CorrectRoadH
Copy link
Member

CleanShot 2023-12-28 at 17 20 24@2x
Is It work in your computer? I can't open it

@GiuseppeGalilei
Copy link
Contributor Author

Is It work in your computer? I can't open it

The dashboard is on port 8443.
After deployent the network application takes about a minute to initialize.

@CorrectRoadH
Copy link
Member

Is It work in your computer? I can't open it

The dashboard is on port 8443. After deployent the network application takes about a minute to initialize.

image same🥲 I already wait a long time

@GiuseppeGalilei
Copy link
Contributor Author

GiuseppeGalilei commented Dec 28, 2023

Is It work in your computer? I can't open it

The dashboard is on port 8443. After deployent the network application takes about a minute to initialize.

image same🥲 I already wait a long time

have you followed the instructions about the init-mongo.js file?
If yes, would you mind checking the containers log through portainer and sharing it?
Thanks for the interest!

@GiuseppeGalilei
Copy link
Contributor Author

Other useful information can be found here:
https://github.com/GiuseppeGalilei/Ubiquiti-Tips-and-Tricks/blob/main/Unifi%20network%20application%20-%20CasaOS/instructions.md

@CorrectRoadH
Copy link
Member

First of all, thank you very much for your contribution. We truly appreciate it!

Due to the fact that many CasaOS users lack the necessary software coding and configuration skills, we are unable to recommend this app for inclusion in the Apptore. If you believe that there is a subset of users who would benefit from it, we invite you to reach out to ETWang in IceWhale Server on Discord. We can provide a simple manual configuration tutorial on our forum to assist those who are interested.

We highly value user feedback and strive to meet the needs of our community. If you have any other suggestions or questions, please feel free to contact us.🥺

@GiuseppeGalilei
Copy link
Contributor Author

GiuseppeGalilei commented Dec 29, 2023

First of all, thank you very much for your contribution. We truly appreciate it!

Due to the fact that many CasaOS users lack the necessary software coding and configuration skills, we are unable to recommend this app for inclusion in the Apptore. If you believe that there is a subset of users who would benefit from it, we invite you to reach out to ETWang in IceWhale Server on Discord. We can provide a simple manual configuration tutorial on our forum to assist those who are interested.

We highly value user feedback and strive to meet the needs of our community. If you have any other suggestions or questions, please feel free to contact us.🥺

Thanks for the review.
I thought about non technical users too, so I tried to streamline the installation process as much as possible. The only extra step required being to create a little new file (which is easily done using the includded file explorer).
Setting the "Inform host" is unfortnately something that needs to be done whenever this application is deployed throgh docker (asked also for unifi-controller, currently offered in the appstore), however, given the target audience (people who have an interest in professional networking) it should be no issue.

In thinking about this process I took inspiration from the NginxProxyManager app, which has some clear instructions about install process, requiring to free some ports.

A nice way would be to automatically create the init file on deployment, to make it a truly one click experience, however I don't know how to do that.

Did you find any particular issue in the deployment process? I'll be happy to help.
Unfortunatey, for Ubiquti users, I see this path as the only option moving forward.

@CorrectRoadH
Copy link
Member

First of all, thank you very much for your contribution. We truly appreciate it!
Due to the fact that many CasaOS users lack the necessary software coding and configuration skills, we are unable to recommend this app for inclusion in the Apptore. If you believe that there is a subset of users who would benefit from it, we invite you to reach out to ETWang in IceWhale Server on Discord. We can provide a simple manual configuration tutorial on our forum to assist those who are interested.
We highly value user feedback and strive to meet the needs of our community. If you have any other suggestions or questions, please feel free to contact us.🥺

Thanks for the review. I thought about non technical users too, so I tried to streamline the installation process as much as possible. The only extra step required being to create a little new file (which is easily done using the includded file explorer). Setting the "Inform host" is unfortnately something that needs to be done whenever this application is deployed throgh docker (asked also for unifi-controller, currently offered in the appstore), however, given the target audience (people who have an interest in professional networking) it should be no issue.

In thinking about this process I took inspiration from the NginxProxyManager app, which has some clear instructions about install process, requiring to free some ports.

A nice way would be to automatically create the init file on deployment, to make it a truly one click experience, however I don't know how to do that.

Did you find any particular issue in the deployment process? I'll be happy to help. Unfortunatey, for Ubiquti users, I see this path as the only option moving forward.

We are evaluating upgrading the Docker Compose engine to the latest version, which provides support for inline files. However this would require some time, because such change would involve some change in UI. If it is convenient for u, would u be able to help with testing the latest Docker Compose engine for this feature?

define inline file in docker-compose

@GiuseppeGalilei
Copy link
Contributor Author

We are evaluating upgrading the Docker Compose engine to the latest version, which provides support for inline files. However this would require some time, because such change would involve some change in UI. If it is convenient for u, would u be able to help with testing the latest Docker Compose engine for this feature?

define inline file in docker-compose

Cool! This would be perfect!
Yeah, I guess when the upgrade will be made I can test it over this application.

So, to better understand your point of view, the only issue you encountered was the creation of the init file?

@CorrectRoadH
Copy link
Member

We are evaluating upgrading the Docker Compose engine to the latest version, which provides support for inline files. However this would require some time, because such change would involve some change in UI. If it is convenient for u, would u be able to help with testing the latest Docker Compose engine for this feature?
define inline file in docker-compose

Cool! This would be perfect! Yeah, I guess when the upgrade will be made I can test it over this application.

So, to better understand your point of view, the only issue you encountered was the creation of the init file?

Not the only problem. I tried creating the file and installing Unifi again. I still can't get into the app with the same issue (404). I think this is caused by my wrong operation. So I think users only need to click once to use it. Otherwise, it's a hassle for most CasaOS users like me who don't like reading long tutorials. 🤣

@GiuseppeGalilei
Copy link
Contributor Author

GiuseppeGalilei commented Dec 29, 2023

Not the only problem. I tried creating the file and installing Unifi again. I still can't get into the app with the same issue (404). I think this is caused by my wrong operation. So I think users only need to click once to use it. Otherwise, it's a hassle for most CasaOS users like me who don't like reading long tutorials. 🤣

I get it, but the tutorial is not that long 🤣
Can I ask you to try one more time and send me the container logs?
I believe it should be just a simple issue, or maybe a typo by my side, who knows, that's the point of collaborating.
Also, I'm not a professional in Docker, so I'm eager to learn from the feedback of more experienced people.

Quick idea: The problems you are encountering might be related to this issue, in my case I "solved" it by downgrading to CasaOS 0.4.4-2, sorry for not mentioning it before.
Anyway, the container logs would really help in identifyng the problem.

@CorrectRoadH
Copy link
Member

I get it, but the tutorial is not that long 🤣 Can I ask you to try one more time and send me the container logs? I believe it should be just a simple issue, or maybe a typo by my side, who knows, that's the point of collaborating. Also, I'm not a professional in Docker, so I'm eager to learn from the feedback of more experienced people.

Quick idea: The problems you are encountering might be related to this issue, in my case I "solved" it by downgrading to CasaOS 0.4.4-2, sorry for not mentioning it before. Anyway, the container logs would really help in identifyng the problem.

docker logs 4cc7e1410065
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
2023-12-28T22:23:50.042+0800 I NETWORK  [conn68875] end connection 172.20.0.3:34918 (2 connections now open)
2023-12-28T22:23:50.042+0800 I NETWORK  [conn68874] end connection 172.20.0.3:34908 (1 connection now open)
2023-12-28T22:23:50.542+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34920 #68876 (2 connections now open)
2023-12-28T22:23:50.542+0800 I NETWORK  [conn68876] received client metadata from 172.20.0.3:34920 conn68876: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:50.543+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34932 #68877 (3 connections now open)
2023-12-28T22:23:50.543+0800 I NETWORK  [conn68877] received client metadata from 172.20.0.3:34932 conn68877: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:50.543+0800 I ACCESS   [conn68877] SCRAM-SHA-1 authentication failed for unifi on unifi-db from client 172.20.0.3:34932 ; UserNotFound: Could not find user unifi@unifi-db
2023-12-28T22:23:50.543+0800 I NETWORK  [conn68877] end connection 172.20.0.3:34932 (2 connections now open)
2023-12-28T22:23:50.543+0800 I NETWORK  [conn68876] end connection 172.20.0.3:34920 (1 connection now open)
2023-12-28T22:23:51.044+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34948 #68878 (2 connections now open)
2023-12-28T22:23:51.044+0800 I NETWORK  [conn68878] received client metadata from 172.20.0.3:34948 conn68878: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:51.045+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34964 #68879 (3 connections now open)
2023-12-28T22:23:51.045+0800 I NETWORK  [conn68879] received client metadata from 172.20.0.3:34964 conn68879: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:51.045+0800 I ACCESS   [conn68879] SCRAM-SHA-1 authentication failed for unifi on unifi-db from client 172.20.0.3:34964 ; UserNotFound: Could not find user unifi@unifi-db
2023-12-28T22:23:51.046+0800 I NETWORK  [conn68879] end connection 172.20.0.3:34964 (2 connections now open)
2023-12-28T22:23:51.046+0800 I NETWORK  [conn68878] end connection 172.20.0.3:34948 (1 connection now open)
2023-12-28T22:23:51.544+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34974 #68880 (2 connections now open)
2023-12-28T22:23:51.545+0800 I NETWORK  [conn68880] received client metadata from 172.20.0.3:34974 conn68880: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:51.545+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34990 #68881 (3 connections now open)
2023-12-28T22:23:51.545+0800 I NETWORK  [conn68881] received client metadata from 172.20.0.3:34990 conn68881: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }

@GiuseppeGalilei
Copy link
Contributor Author

GiuseppeGalilei commented Dec 29, 2023

I get it, but the tutorial is not that long 🤣 Can I ask you to try one more time and send me the container logs? I believe it should be just a simple issue, or maybe a typo by my side, who knows, that's the point of collaborating. Also, I'm not a professional in Docker, so I'm eager to learn from the feedback of more experienced people.
Quick idea: The problems you are encountering might be related to this issue, in my case I "solved" it by downgrading to CasaOS 0.4.4-2, sorry for not mentioning it before. Anyway, the container logs would really help in identifyng the problem.

docker logs 4cc7e1410065
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
2023-12-28T22:23:50.042+0800 I NETWORK  [conn68875] end connection 172.20.0.3:34918 (2 connections now open)
2023-12-28T22:23:50.042+0800 I NETWORK  [conn68874] end connection 172.20.0.3:34908 (1 connection now open)
2023-12-28T22:23:50.542+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34920 #68876 (2 connections now open)
2023-12-28T22:23:50.542+0800 I NETWORK  [conn68876] received client metadata from 172.20.0.3:34920 conn68876: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:50.543+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34932 #68877 (3 connections now open)
2023-12-28T22:23:50.543+0800 I NETWORK  [conn68877] received client metadata from 172.20.0.3:34932 conn68877: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:50.543+0800 I ACCESS   [conn68877] SCRAM-SHA-1 authentication failed for unifi on unifi-db from client 172.20.0.3:34932 ; UserNotFound: Could not find user unifi@unifi-db
2023-12-28T22:23:50.543+0800 I NETWORK  [conn68877] end connection 172.20.0.3:34932 (2 connections now open)
2023-12-28T22:23:50.543+0800 I NETWORK  [conn68876] end connection 172.20.0.3:34920 (1 connection now open)
2023-12-28T22:23:51.044+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34948 #68878 (2 connections now open)
2023-12-28T22:23:51.044+0800 I NETWORK  [conn68878] received client metadata from 172.20.0.3:34948 conn68878: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:51.045+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34964 #68879 (3 connections now open)
2023-12-28T22:23:51.045+0800 I NETWORK  [conn68879] received client metadata from 172.20.0.3:34964 conn68879: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:51.045+0800 I ACCESS   [conn68879] SCRAM-SHA-1 authentication failed for unifi on unifi-db from client 172.20.0.3:34964 ; UserNotFound: Could not find user unifi@unifi-db
2023-12-28T22:23:51.046+0800 I NETWORK  [conn68879] end connection 172.20.0.3:34964 (2 connections now open)
2023-12-28T22:23:51.046+0800 I NETWORK  [conn68878] end connection 172.20.0.3:34948 (1 connection now open)
2023-12-28T22:23:51.544+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34974 #68880 (2 connections now open)
2023-12-28T22:23:51.545+0800 I NETWORK  [conn68880] received client metadata from 172.20.0.3:34974 conn68880: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:51.545+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34990 #68881 (3 connections now open)
2023-12-28T22:23:51.545+0800 I NETWORK  [conn68881] received client metadata from 172.20.0.3:34990 conn68881: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }

Thanks! Seems like mongo is not using the init file, the rest is working fine.

Keep in mind that such file is used only on the very first deployment of the container.
So, in case you previously started the container without it, I suggest you delete both the containers and relative folders (unifi-db and unifi-network-application) and start from scratch.

then, you should follow this instructions in the correct order:

  • if you want, change the default password for mongodb both in the compose and init-mongo.js files
  • place the init-mongo.js file in the /DATA/AppData folder
  • Deploy as a custom install (press + on the top right corner, then “install a customized app” and then import, at the top of the window).
  • Wait a few minutes for the unifi-network-application to initialize, dashboard will be available on port 8443.

Keep me posted 😉

@CorrectRoadH
Copy link
Member

I get it, but the tutorial is not that long 🤣 Can I ask you to try one more time and send me the container logs? I believe it should be just a simple issue, or maybe a typo by my side, who knows, that's the point of collaborating. Also, I'm not a professional in Docker, so I'm eager to learn from the feedback of more experienced people.我明白了,但教程不是那么长 🤣 我可以请你再试一次并将容器日志发送给我吗?我相信这应该只是一个简单的问题,或者可能是我身边的一个错别字,谁知道呢,这就是合作的意义所在。另外,我不是 Docker 方面的专业人士,所以我渴望从更有经验的人的反馈中学习。
Quick idea: The problems you are encountering might be related to this issue, in my case I "solved" it by downgrading to CasaOS 0.4.4-2, sorry for not mentioning it before. Anyway, the container logs would really help in identifyng the problem.快速了解:您遇到的问题可能与此问题有关,就我而言,我通过降级到 CasaOS 0.4.4-2 来“解决”它,很抱歉之前没有提到它。无论如何,容器日志确实有助于识别问题。

docker logs 4cc7e1410065
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
2023-12-28T22:23:50.042+0800 I NETWORK  [conn68875] end connection 172.20.0.3:34918 (2 connections now open)
2023-12-28T22:23:50.042+0800 I NETWORK  [conn68874] end connection 172.20.0.3:34908 (1 connection now open)
2023-12-28T22:23:50.542+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34920 #68876 (2 connections now open)
2023-12-28T22:23:50.542+0800 I NETWORK  [conn68876] received client metadata from 172.20.0.3:34920 conn68876: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:50.543+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34932 #68877 (3 connections now open)
2023-12-28T22:23:50.543+0800 I NETWORK  [conn68877] received client metadata from 172.20.0.3:34932 conn68877: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:50.543+0800 I ACCESS   [conn68877] SCRAM-SHA-1 authentication failed for unifi on unifi-db from client 172.20.0.3:34932 ; UserNotFound: Could not find user unifi@unifi-db
2023-12-28T22:23:50.543+0800 I NETWORK  [conn68877] end connection 172.20.0.3:34932 (2 connections now open)
2023-12-28T22:23:50.543+0800 I NETWORK  [conn68876] end connection 172.20.0.3:34920 (1 connection now open)
2023-12-28T22:23:51.044+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34948 #68878 (2 connections now open)
2023-12-28T22:23:51.044+0800 I NETWORK  [conn68878] received client metadata from 172.20.0.3:34948 conn68878: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:51.045+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34964 #68879 (3 connections now open)
2023-12-28T22:23:51.045+0800 I NETWORK  [conn68879] received client metadata from 172.20.0.3:34964 conn68879: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:51.045+0800 I ACCESS   [conn68879] SCRAM-SHA-1 authentication failed for unifi on unifi-db from client 172.20.0.3:34964 ; UserNotFound: Could not find user unifi@unifi-db
2023-12-28T22:23:51.046+0800 I NETWORK  [conn68879] end connection 172.20.0.3:34964 (2 connections now open)
2023-12-28T22:23:51.046+0800 I NETWORK  [conn68878] end connection 172.20.0.3:34948 (1 connection now open)
2023-12-28T22:23:51.544+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34974 #68880 (2 connections now open)
2023-12-28T22:23:51.545+0800 I NETWORK  [conn68880] received client metadata from 172.20.0.3:34974 conn68880: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }
2023-12-28T22:23:51.545+0800 I NETWORK  [listener] connection accepted from 172.20.0.3:34990 #68881 (3 connections now open)
2023-12-28T22:23:51.545+0800 I NETWORK  [conn68881] received client metadata from 172.20.0.3:34990 conn68881: { driver: { name: "mongo-java-driver|sync", version: "4.6.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "6.2.0-39-generic" }, platform: "Java/Private Build/17.0.9+9-Ubuntu-122.04" }

Thanks! Seems like mongo is not using the init file, the rest is working fine.谢谢!似乎mongo没有使用init文件,其余的都工作正常。

Keep in mind that such file is used only on the very first deployment of the container.请记住,此类文件仅在容器的首次部署中使用。 So, in case you previously started the container without it, I suggest you delete both the containers and relative folders (unifi-db and unifi-network-application) and start from scratch.因此,如果您之前在没有它的情况下启动了容器,我建议您删除容器和相关文件夹(unifi-db 和 unifi-network-application)并从头开始。

then, you should follow this instructions in the correct order:然后,您应该按正确的顺序按照以下说明进行操作:

  • if you want, change the default password for mongodb both in the compose and init-mongo.js files如果需要,请在 compose 和 init-mongo.js 文件中更改 MongoDB 的默认密码
  • place the init-mongo.js file in the /DATA/AppData folder将 init-mongo.js 文件放在 /DATA/AppData 文件夹中
  • Deploy as a custom install (press + on the top right corner, then “install a customized app” and then import, at the top of the window).部署为自定义安装(按右上角的 +,然后按窗口顶部的“安装自定义应用”,然后导入)。
  • Wait a few minutes for the unifi-network-application to initialize, dashboard will be available on port 8443.等待几分钟让 unifi-network-application 初始化,仪表板将在端口 8443 上可用。

Keep me posted 😉随时通知我 😉

Thanks, It is working now😄

@GiuseppeGalilei
Copy link
Contributor Author

GiuseppeGalilei commented Dec 29, 2023

Thanks, It is working now😄

Awesome!
If you are considering further testing it now, consider that in the proposed compose file I included just the mandatory ports.
There are other ports which are optional, which I have left out to avoid stupid port conflicts in early testing.
Just add these lines to the compose file to include them:

      - target: 1900 #optional
        published: "1900"
        protocol: udp
      - target: 8843 #optional
        published: "8843"
        protocol: tcp
      - target: 8880 #optional
        published: "8880"
        protocol: tcp
      - target: 6789 #optional
        published: "6789"
        protocol: tcp
      - target: 5514 #optional
        published: "5514"
        protocol: udp`

@GiuseppeGalilei
Copy link
Contributor Author

@CorrectRoadH any news?

@tigerinus
Copy link
Contributor

@CorrectRoadH any news?

In our upcoming release, we've upgraded Docker Compose engine to accomodate inline file. Once it's out, we will need your help to update your compose YAML with the inline file you mentioned, and get it tested.

@GiuseppeGalilei
Copy link
Contributor Author

@CorrectRoadH any news?

In our upcoming release, we've upgraded Docker Compose engine to accomodate inline file. Once it's out, we will need your help to update your compose YAML with the inline file you mentioned, and get it tested.

Cool! I'll work on it in the coming days. Any advice you can give me about the file inline feature?

@GiuseppeGalilei
Copy link
Contributor Author

@CorrectRoadH @tigerinus the new deployment seems to work correctly, can you confirm it?

I guess the last thing to do is to rewrite the app description and decide what to do with the optional ports:

      - target: 1900 #optional
        published: "1900"
        protocol: udp
      - target: 8843 #optional
        published: "8843"
        protocol: tcp
      - target: 8880 #optional
        published: "8880"
        protocol: tcp
      - target: 6789 #optional
        published: "6789"
        protocol: tcp
      - target: 5514 #optional
        published: "5514"
        protocol: udp`

Should I enable them from the compose or just leave that option to the user? I don't want to interfere with other apps that may use those ports.

@CorrectRoadH
Copy link
Member

Should I enable them from the compose or just leave that option to the user? I don't want to interfere with other apps that may use those ports.

if these optional port didn't map to the host. what are the functions of uni network will not work?

@GiuseppeGalilei
Copy link
Contributor Author

GiuseppeGalilei commented Jan 25, 2024

if these optional port didn't map to the host. what are the functions of uni network will not work?

image

I don't use the guest network, so I couldn't test the need of ports 8843 8880
However, given the technical audience for this application, I don't think leaving some configuration for the user would be a big problem

@CorrectRoadH
Copy link
Member

if these optional port didn't map to the host. what are the functions of uni network will not work?

image

I don't use the guest network, so I couldn't test the need of ports 8843 8880 However, given the technical audience for this application, I don't think leaving some configuration for the user would be a big problem

Thank you for your contribution. I'm doing final testing and trying to merge it into our app store. 🤩

@GiuseppeGalilei
Copy link
Contributor Author

GiuseppeGalilei commented Jan 26, 2024

Thank you for your contribution. I'm doing final testing and trying to merge it into our app store. 🤩

Perfect, let me only rewrite the description real quick to remove the instructions to create the file, given that it is not needed anymore. It will be a few minutes

EDIT: @CorrectRoadH done!

@CorrectRoadH CorrectRoadH merged commit ba4ae76 into IceWhaleTech:main Jan 26, 2024
@GiuseppeGalilei
Copy link
Contributor Author

Thanks for the collaboration guys!😊 I remain at your disposal for any issue that might arise.
I just opened a small PR to label the old unifi controller as legacy.

@dragonfire1119
Copy link

dragonfire1119 commented Jan 26, 2024

@CorrectRoadH This has caused the App Store to break.

2024-01-26T15:27:09.614-0600    info    compose app does not have valid title map in its x-casaos extension - might not be a compose app for CasaOS     {"app": "unifi-network-application", "func": "service.(*ComposeApp).SetTitle", "file": "/home/runner/work/CasaOS-AppManagement/CasaOS-AppManagement/service/compose_app.go", "line": 153}
Screenshot 2024-01-26 at 3 19 52 PM Screenshot 2024-01-26 at 3 31 45 PM

This should be changed to handle cases where the title or tagline is NULL.

https://github.com/IceWhaleTech/CasaOS-UI/blob/31ce55e1d97ed3fc43b90f6b91d59be9758d7e36/main/src/components/Apps/AppPanel.vue#L737


How you fix the app store not loading:

casaos-cli app-management register app-store https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip

You might have to wait for this app store to show up:

casaos-cli app-management unregister app-store 0

You can check if it's shown up by running:

casaos-cli app-management list app-stores

Made a script to do this:

https://community.bigbeartechworld.com/t/fix-the-casaos-app-store-not-loading/593?u=dragonfire1119

@riccardobellitto
Copy link

I managed to fix it.
Now the appstore is working:

riccardobellitto@sector5:~$ sudo casaos-cli app-management register app-store https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip
trying to register app store asynchronously - see /var/log/casaos/app-management.log for any errors.

riccardobellitto@sector5:~$ casaos-cli app-management unregister app-store 0
app store is unregistered.

riccardobellitto@sector5:~$ casaos-cli app-management list app-stores
ID   URL                                                                                        STORE ROOT
--   ---                                                                                        ----------
0    https://casaos-appstore.paodayag.dev/linuxserver.zip                                       /var/lib/casaos/appstore/casaos-appstore.paodayag.dev/7818f1953ae42cf69986df0a39e80fbe/CasaOS-LinuxServer-AppStore-main
1    https://paodayag.dev/casaos-appstore-edge.zip                                              /var/lib/casaos/appstore/paodayag.dev/992f549a895d9bea5303950c9f4c6bc3/CasaOS-AppStore-Edge-main
2    https://github.com/mr-manuel/CasaOS-HomeAutomation-AppStore/archive/refs/tags/latest.zip   /var/lib/casaos/appstore/github.com/852797db148b7e7005860b58498f67d0/CasaOS-HomeAutomation-AppStore-latest
3    https://github.com/bigbeartechworld/big-bear-casaos/archive/refs/heads/master.zip          /var/lib/casaos/appstore/github.com/2a1238d53212bfce4e8f861dcb8ef3fe/big-bear-casaos-master
riccardobellitto@sector5:~$ casaos-cli app-management register app-store https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip
appstore is already registered

riccardobellitto@sector5:~$ casaos-cli app-management list app-stores
ID   URL                                                                                                    STORE ROOT
--   ---                                                                                                    ----------
0    https://casaos-appstore.paodayag.dev/linuxserver.zip                                                   /var/lib/casaos/appstore/casaos-appstore.paodayag.dev/7818f1953ae42cf69986df0a39e80fbe/CasaOS-LinuxServer-AppStore-main
1    https://paodayag.dev/casaos-appstore-edge.zip                                                          /var/lib/casaos/appstore/paodayag.dev/992f549a895d9bea5303950c9f4c6bc3/CasaOS-AppStore-Edge-main
2    https://github.com/mr-manuel/CasaOS-HomeAutomation-AppStore/archive/refs/tags/latest.zip               /var/lib/casaos/appstore/github.com/852797db148b7e7005860b58498f67d0/CasaOS-HomeAutomation-AppStore-latest
3    https://github.com/bigbeartechworld/big-bear-casaos/archive/refs/heads/master.zip                      /var/lib/casaos/appstore/github.com/2a1238d53212bfce4e8f861dcb8ef3fe/big-bear-casaos-master
4    https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip   /var/lib/casaos/appstore/github.com/cb44723efc17582291f29d4f1559f24d/CasaOS-AppStore-19b9149ce0bd50ffb8c898e283dc441605a3a369
5    https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip   /var/lib/casaos/appstore/github.com/cb44723efc17582291f29d4f1559f24d/CasaOS-AppStore-19b9149ce0bd50ffb8c898e283dc441605a3a369

riccardobellitto@sector5:~$ casaos-cli app-management unregister app-store 0
app store is unregistered.

riccardobellitto@sector5:~$ casaos-cli app-management unregister app-store 0
app store is unregistered.

riccardobellitto@sector5:~$ casaos-cli app-management list app-stores
ID   URL                                                                                                    STORE ROOT
--   ---                                                                                                    ----------
0    https://github.com/mr-manuel/CasaOS-HomeAutomation-AppStore/archive/refs/tags/latest.zip               /var/lib/casaos/appstore/github.com/852797db148b7e7005860b58498f67d0/CasaOS-HomeAutomation-AppStore-latest
1    https://github.com/bigbeartechworld/big-bear-casaos/archive/refs/heads/master.zip                      /var/lib/casaos/appstore/github.com/2a1238d53212bfce4e8f861dcb8ef3fe/big-bear-casaos-master
2    https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip   /var/lib/casaos/appstore/github.com/cb44723efc17582291f29d4f1559f24d/CasaOS-AppStore-19b9149ce0bd50ffb8c898e283dc441605a3a369
3    https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip   /var/lib/casaos/appstore/github.com/cb44723efc17582291f29d4f1559f24d/CasaOS-AppStore-19b9149ce0bd50ffb8c898e283dc441605a3a369

riccardobellitto@sector5:~$ casaos-cli app-management unregister app-store 2
^[[Aapp store is unregistered.

riccardobellitto@sector5:~$ casaos-cli app-management list app-stores
ID   URL                                                                                                    STORE ROOT
--   ---                                                                                                    ----------
0    https://github.com/mr-manuel/CasaOS-HomeAutomation-AppStore/archive/refs/tags/latest.zip               /var/lib/casaos/appstore/github.com/852797db148b7e7005860b58498f67d0/CasaOS-HomeAutomation-AppStore-latest
1    https://github.com/bigbeartechworld/big-bear-casaos/archive/refs/heads/master.zip                      /var/lib/casaos/appstore/github.com/2a1238d53212bfce4e8f861dcb8ef3fe/big-bear-casaos-master
2    https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip   internal error - store root not found

image

@dragonfire1119
Copy link

@riccardobellitto Glad that it's working now!

@godfodder0901
Copy link

@CorrectRoadH This has caused the App Store to break.

2024-01-26T15:27:09.614-0600    info    compose app does not have valid title map in its x-casaos extension - might not be a compose app for CasaOS     {"app": "unifi-network-application", "func": "service.(*ComposeApp).SetTitle", "file": "/home/runner/work/CasaOS-AppManagement/CasaOS-AppManagement/service/compose_app.go", "line": 153}

Screenshot 2024-01-26 at 3 19 52 PM Screenshot 2024-01-26 at 3 31 45 PM
This should be changed to handle cases where the title or tagline is NULL.

https://github.com/IceWhaleTech/CasaOS-UI/blob/31ce55e1d97ed3fc43b90f6b91d59be9758d7e36/main/src/components/Apps/AppPanel.vue#L737

How you fix the app store not loading:

casaos-cli app-management register app-store https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip

You might have to wait for this app store to show up:

casaos-cli app-management unregister app-store 0

You can check if it's shown up by running:

casaos-cli app-management list app-stores

Made a script to do this:

https://community.bigbeartechworld.com/t/fix-the-casaos-app-store-not-loading/593?u=dragonfire1119

This doesn't fix other app stores...

@LSP0123
Copy link
Contributor

LSP0123 commented Jan 27, 2024

I have not install any container on my machine but appstore could not be open today .

@CorrectRoadH This has caused the App Store to break.这导致 App Store 崩溃。

2024-01-26T15:27:09.614-0600    info    compose app does not have valid title map in its x-casaos extension - might not be a compose app for CasaOS     {"app": "unifi-network-application", "func": "service.(*ComposeApp).SetTitle", "file": "/home/runner/work/CasaOS-AppManagement/CasaOS-AppManagement/service/compose_app.go", "line": 153}

Screenshot 2024-01-26 at 3 19 52 PM Screenshot 2024-01-26 at 3 31 45 PM
This should be changed to handle cases where the title or tagline is NULL.应更改此项以处理标题或标语为 NULL 的情况。

https://github.com/IceWhaleTech/CasaOS-UI/blob/31ce55e1d97ed3fc43b90f6b91d59be9758d7e36/main/src/components/Apps/AppPanel.vue#L737

How you fix the app store not loading:如何修复应用商店无法加载的问题:

casaos-cli app-management register app-store https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip

You might have to wait for this app store to show up:您可能需要等待此应用商店显示:

casaos-cli app-management unregister app-store 0

You can check if it's shown up by running:您可以通过运行以下命令来检查它是否显示:

casaos-cli app-management list app-stores

Made a script to do this:制作了一个脚本来执行此操作:

https://community.bigbeartechworld.com/t/fix-the-casaos-app-store-not-loading/593?u=dragonfire1119

after unregister all app-store and register app-store https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip

casaos-cli app-management list app-storeswill only show one store

ID   URL                                                                                                    STORE ROOT
--   ---                                                                                                    ----------
0    https://github.com/IceWhaleTech/CasaOS-AppStore/archive/19b9149ce0bd50ffb8c898e283dc441605a3a369.zip   /var/lib/casaos/appstore/github.com/cb44723efc17582291f29d4f1559f24d/CasaOS-AppStore-19b9149ce0bd50ffb8c898e283dc441605a3a369

Although the Appstore can also work. But not only when I reboot the system, but also a few minutes after downloaded this file, Casaos app-management will download this zip file again and again.

@angryasianguy
Copy link

So all I did was unregister all Appstore's added

casaos-cli app-management unregister app-store 0

I then re-added all the stores that I wanted per https://awesome.casaos.io/content/3rd-party-app-stores/list.html#_3-casaos-coolstore

However I noticed that 4. CasaOS (Edge) AppStore

  • broke the casaOS appstore again

All other app stores lists add in with 0 problems

@GiuseppeGalilei
Copy link
Contributor Author

This should be changed to handle cases where the title or tagline is NULL.

https://github.com/IceWhaleTech/CasaOS-UI/blob/31ce55e1d97ed3fc43b90f6b91d59be9758d7e36/main/src/components/Apps/AppPanel.vue#L737

Hi guys, I'm the developer behind this app.

As has been pointed out the issue seems to be related to title and taglines being NULL.
In reality, they are not NULL, there is a specified title and tagline if you see the code.
I believe the issue is related to the fact that this compose file deploys not just one, but two containers.
Which may be a first for the appstore and maybe an unaddressed issue, from a AppStore perspective.

@CorrectRoadH has, I guess temporarely, removed this app from the store until this issue gets fixed.
So, if problems continue to arise, I think you should just update your appstore index.

I believe it would be best to report any new issues, unrelated to this app, in the main casaos repo, for example here: IceWhaleTech/CasaOS#1659
And then, if you want, leave a reference to this PR (github is able to link them and display the reference)

This PR should serve as a development space for the App, not to discuss AppStore issues.😉
Sorry guys, I don't mean this to be a rant, just trying to keep the space tidy 😅

@CorrectRoadH
Copy link
Member

This should be changed to handle cases where the title or tagline is NULL.
https://github.com/IceWhaleTech/CasaOS-UI/blob/31ce55e1d97ed3fc43b90f6b91d59be9758d7e36/main/src/components/Apps/AppPanel.vue#L737

Hi guys, I'm the developer behind this app.

As has been pointed out the issue seems to be related to title and taglines being NULL. In reality, they are not NULL, there is a specified title and tagline if you see the code. I believe the issue is related to the fact that this compose file deploys not just one, but two containers. Which may be a first for the appstore and maybe an unaddressed issue, from a AppStore perspective.

@CorrectRoadH has, I guess temporarely, removed this app from the store until this issue gets fixed. So, if problems continue to arise, I think you should just update your appstore index.

I believe it would be best to report any new issues, unrelated to this app, in the main casaos repo, for example here: IceWhaleTech/CasaOS#1659 And then, if you want, leave a reference to this PR (github is able to link them and display the reference)

This PR should serve as a development space for the App, not to discuss AppStore issues.😉 Sorry guys, I don't mean this to be a rant, just trying to keep the space tidy 😅

Yes, it just is a temporarely remove. It is back to App Store right now! 🤩 We've fixed the bug of CasaOS that cause App Store always loading, and we will add more test for new application.

Very Thanks for your contribute. offering a very nice app for every users of CasaOS.

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

Successfully merging this pull request may close these issues.

[App Request] Unifi Network Application
8 participants