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

Can`t start container #153

Open
bbonia opened this issue Apr 1, 2024 · 25 comments
Open

Can`t start container #153

bbonia opened this issue Apr 1, 2024 · 25 comments

Comments

@bbonia
Copy link

bbonia commented Apr 1, 2024

Hi. I try to start container like it`s written here but it goes to error.
Help me please.

err1
err2

There is the same error with memory usage settings.
That works interactively only

@xtrime-ru
Copy link
Owner

xtrime-ru commented Apr 1, 2024

Please authorise in interactive mode. It is one time operation.

@bbonia
Copy link
Author

bbonia commented Apr 2, 2024

Please authorise in interactive mode. It is one time operation.

I wanna do it in multi session mode.
I can`t get access to the container remotely. It works only in interactive mode.
err3

@xtrime-ru
Copy link
Owner

After you successfully login you need to stop temporary container and start it in background with "up -d" command.

If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in command.

You can autorize sessions remotely, but i do not support this function anymore, use it at your own risk: https://github.com/xtrime-ru/TelegramApiServer?tab=readme-ov-file#multiple-sessions-support

To enable multi session mode and skip session creation during start use -s=* instead of session name here: https://github.com/xtrime-ru/TelegramApiServer/blob/master/docker-compose.yml#L24

@bbonia
Copy link
Author

bbonia commented Apr 2, 2024

After you successfully login you need to stop temporary container and start it in background with "up -d" command.

If you need to start multiple sessions, create docker-compose.override.yml. Add additional containers there. Use unique ports and session names in command.

You can autorize sessions remotely, but i do not support this function anymore, use it at your own risk: https://github.com/xtrime-ru/TelegramApiServer?tab=readme-ov-file#multiple-sessions-support

To enable multi session mode and skip session creation during start use -s=* instead of session name here: https://github.com/xtrime-ru/TelegramApiServer/blob/master/docker-compose.yml#L24

Have I just to create file docker-compose.override.yml and just start container like docker compose up -d? Is there anything else?

@bbonia
Copy link
Author

bbonia commented Apr 2, 2024

I lost session after reload container. Why are sessions not saved?
I need session files required for start. It needs for multiple sessions

@bbonia
Copy link
Author

bbonia commented Apr 3, 2024

I did that you said but I`ve get an error when I try to connect remotely. But session is created.
help please
errNew4

@xtrime-ru
Copy link
Owner

create file docker-compose.override.yml and just start container like docker compose up -d

Yes. Override port and command, or add new container.

@xtrime-ru
Copy link
Owner

I lost session after reload container.

How you created the session?

@bbonia
Copy link
Author

bbonia commented Apr 3, 2024

remotely. with link http://IP:9503/system/addSession?session=users/xtrime

@xtrime-ru
Copy link
Owner

have done all requests to authorize it? https://github.com/xtrime-ru/TelegramApiServer?tab=readme-ov-file#authorizing-session-remotely

You could try to call http://127.0.0.1:9503/api/%session%/serialize after authorisation.

But as i said, i provide no support for this feature...

@bbonia
Copy link
Author

bbonia commented Apr 3, 2024

ok. thanks a lot

@bbonia
Copy link
Author

bbonia commented Apr 3, 2024

I solved the problem with session. But It doesn`t write session correctly after restart container.
errNew5

@xtrime-ru
Copy link
Owner

You need to authorise this session, and make sure its serialized before restarting (call serialize method, or wait 10 minutes before automatic serialization happens)

@bbonia
Copy link
Author

bbonia commented Apr 3, 2024

Do you mean my session didn't have time to save at vps? But there is file with session on vps. I just stop and start again the container

@bbonia
Copy link
Author

bbonia commented Apr 3, 2024

and I`ve get this mistake all time but chats download well. Can you explain this one please?
errNew6

@bbonia
Copy link
Author

bbonia commented Apr 3, 2024

http://IP:9521/api/users/number/serialize gives me that error
errNew7

@xtrime-ru
Copy link
Owner

Serialization method was moved in other place, probably this is why your session not saved after manual login via http. I pushed fix: 6a045fd

Please update to latest master and try to call serizalize again after manual login.

@xtrime-ru
Copy link
Owner

Dont know anything about Undefined array key "user"
What method you calling? Also i suggest to ask in madelineProto support group.

@bbonia
Copy link
Author

bbonia commented Apr 3, 2024

Dont know anything about Undefined array key "user" What method you calling? Also i suggest to ask in madelineProto support group.

Everything is from https://github.com/xtrime-ru/TelegramApiServer/tree/master#session-management

@bbonia
Copy link
Author

bbonia commented Apr 3, 2024

Serialization method was moved in other place, probably this is why your session not saved after manual login via http. I pushed fix: 6a045fd

Please update to latest master and try to call serizalize again after manual login.

thanks. It works well

@bbonia
Copy link
Author

bbonia commented Apr 4, 2024

hi. help me one else please
After successful logging I have good working app but I can`t delete the session. I deleted container and session files from server, reboot the OS but it says me error when I try to log in again with the same number
errNew8

@bbonia
Copy link
Author

bbonia commented Apr 4, 2024

that error goes when I add new session.
It is copied to each container.

@xtrime-ru
Copy link
Owner

Is you use -s=* it means to load all sessions in container. Please use globe syntax to select sessions for each container: https://en.wikipedia.org/wiki/Glob_(programming)

@xtrime-ru
Copy link
Owner

Deleting session is complicated. You need to stop container, then remove session folder, then remove session tables from mysql database.

@bbonia
Copy link
Author

bbonia commented Apr 10, 2024

hi. thanks a lot. But how can I do that (deleting from table)? Is it real only by modifying table with another program or something docker command?
And one else question/ What is the different to use session in mysql or memory?

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

3 participants
@xtrime-ru @bbonia and others