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

Help with running in docker #269

Closed
ghost opened this issue Mar 12, 2020 · 25 comments
Closed

Help with running in docker #269

ghost opened this issue Mar 12, 2020 · 25 comments
Labels

Comments

@ghost
Copy link

ghost commented Mar 12, 2020

Hello, so I set this up in docker today but its not working. So if I go to scripts.mydomain.com I can see the webui, but no scripts. If I go to scripts.mydomain.com/admin.html it says 403 no authorization.

Docker Config - https://hastebin.com/focevemota.bash - ignore first five
Traefik Config - https://hastebin.com/epoyugekoc.bash
Contents of Local Folder - https://hastebin.com/hakiwomafo.rb
Script-Server Config - https://hastebin.com/koxigezihu.pl
Runner Config - https://hastebin.com/fobiliweyi.json
Script Contents - https://hastebin.com/afamitexej.coffeescript
Script-Server Logs - https://hastebin.com/pezakeyaqi.cs

@ghost ghost closed this as completed Mar 13, 2020
@ghost ghost reopened this Mar 13, 2020
@bugy
Copy link
Owner

bugy commented Mar 13, 2020 via email

@ghost
Copy link
Author

ghost commented Mar 13, 2020

Hi, the json file of the runner config is incorrect, there are no commas So script server cannot load this particular file (i don't know if you have any other) For the admin page it makes sense, because you made only "user" and "user1" admins. But with google oauth, usernames are email addresses. So you have to add your email to the list kiityman1 notifications@github.com schrieb am Fr., 13. März 2020, 00:08:

Hello, so I set this up in docker today but its not working. So if I go to scripts.mydomain.com I can see the webui, but no scripts. If I go to scripts.mydomain.com/admin.html it says 403 no authorization. Docker Config - https://hastebin.com/focevemota.bash - ignore first five Traefik Config - https://hastebin.com/epoyugekoc.bash Contents of Local Folder - https://hastebin.com/hakiwomafo.rb Script-Server Config - https://hastebin.com/koxigezihu.pl Runner Config - https://hastebin.com/fobiliweyi.json Script Contents - https://hastebin.com/afamitexej.coffeescript — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#269>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXPJLNV3HNEWD755V65BDRHFTNFANCNFSM4LGXAUEA .

Hi, I added the commas and my email but I have the same issue. I also don't see a google auth popup?

@bugy
Copy link
Owner

bugy commented Mar 13, 2020 via email

@ghost
Copy link
Author

ghost commented Mar 13, 2020

Hi, could you share your current configuration files, please? Also, after changing admin users, you have to restart the server kiityman1 notifications@github.com schrieb am Fr., 13. März 2020, 21:09:

Hi, the json file of the runner config is incorrect, there are no commas So script server cannot load this particular file (i don't know if you have any other) For the admin page it makes sense, because you made only "user" and "user1" admins. But with google oauth, usernames are email addresses. So you have to add your email to the list kiityman1 @.*** schrieb am Fr., 13. März 2020, 00:08: … <#m_8651585372839415476_> Hello, so I set this up in docker today but its not working. So if I go to scripts.mydomain.com I can see the webui, but no scripts. If I go to scripts.mydomain.com/admin.html it says 403 no authorization. Docker Config - https://hastebin.com/focevemota.bash - ignore first five Traefik Config - https://hastebin.com/epoyugekoc.bash Contents of Local Folder - https://hastebin.com/hakiwomafo.rb Script-Server Config - https://hastebin.com/koxigezihu.pl Runner Config - https://hastebin.com/fobiliweyi.json Script Contents - https://hastebin.com/afamitexej.coffeescript — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#269 <#269>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXPJLNV3HNEWD755V65BDRHFTNFANCNFSM4LGXAUEA . Hi, I added the commas and my email but I have the same issue. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#269 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXPJJ7SV2GBIZZNDSFZEDRHKHGPANCNFSM4LGXAUEA .

I restarted the docker container.

https://hastebin.com/dopojegexo.pl
https://hastebin.com/axanugevug.json

@bugy
Copy link
Owner

bugy commented Mar 13, 2020 via email

@ghost
Copy link
Author

ghost commented Mar 13, 2020

This is the log https://hastebin.com/hacikonuna.cs

Not sure how to use a validator?

The gauth doesnt work at all

@bugy
Copy link
Owner

bugy commented Mar 13, 2020 via email

@ghost
Copy link
Author

ghost commented Mar 13, 2020

For the editor, just paste your json content there and it will show you formatting errors Regarding google oauth configuration, your client id and secret are not specified in the config Please check the documentation: https://github.com/bugy/script-server/wiki/Authentication#google-oauth Also, I'm not sure if your conf.json file was picked by the server at all. Could you try changing port there and see, if affects anything? By the way, the log, you attached is not from script server kiityman1 notifications@github.com schrieb am Sa., 14. März 2020, 00:04:

This is the log https://hastebin.com/edesahadar.coffeescript Not sure how to use a validator? The gauth doesnt work at all — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#269 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXPJNZFILF7CAQXGA5L7DRHK3YFANCNFSM4LGXAUEA .

I changed the log

I still can't find errors sorry. My oauth info is in there?

I am accessing at scripts.domain.com, not a port

@bugy
Copy link
Owner

bugy commented Mar 14, 2020 via email

@ghost
Copy link
Author

ghost commented Mar 16, 2020

Hi, conf.json file is not picked by the server. Probably some docker mounting path problem Since there are no errors in the log file, i would assume, that runners folder is not mounted either In your docker config file, which you sent, there are double curly braces. I don't know what it is, but does it work properly? kiityman1 notifications@github.com schrieb am Sa., 14. März 2020, 00:28:

For the editor, just paste your json content there and it will show you formatting errors Regarding google oauth configuration, your client id and secret are not specified in the config Please check the documentation: https://github.com/bugy/script-server/wiki/Authentication#google-oauth Also, I'm not sure if your conf.json file was picked by the server at all. Could you try changing port there and see, if affects anything? By the way, the log, you attached is not from script server kiityman1 @.*** schrieb am Sa., 14. März 2020, 00:04: … <#m_-2700909035794941502_> This is the log https://hastebin.com/edesahadar.coffeescript Not sure how to use a validator? The gauth doesnt work at all — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#269 (comment) <#269 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXPJNZFILF7CAQXGA5L7DRHK3YFANCNFSM4LGXAUEA . I changed the log I still can't find errors sorry. My oauth info is in there? I am accessing at scripts.domain.com, not a port — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#269 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJXPJIUYAGAJK4JRLRLV7TRHK6RPANCNFSM4LGXAUEA .

I have fixed all jsons but still not working. I get this error json.decoder.JSONDecodeError: Extra data: line 5 column 4 (char 77)

@bugy
Copy link
Owner

bugy commented Mar 16, 2020

Hi, from this error I can only tell, that some JSON is broken, on the line 5 :)
Could you send me the full error stacktrace?
And could you share the latest versions of the files, please?

@bugy bugy added the question label Mar 16, 2020
@ghost
Copy link
Author

ghost commented Mar 16, 2020

@ghost
Copy link
Author

ghost commented Mar 16, 2020

Hi, from this error I can only tell, that some JSON is broken, on the line 5 :)
Could you send me the full error stacktrace?
And could you share the latest versions of the files, please?

Runner config https://hastebin.com/azovelomeg.json
server config https://hastebin.com/ereqavekox.json
log https://hastebin.com/zecenabaji.sql

@bugy
Copy link
Owner

bugy commented Mar 16, 2020

Hi, @kiityman1 these files are completely fine, there is something wrong with how you attach them. It looks like you are attaching another version of these files

Also, I would recommend not copy-pasting conf.json from example. It has a lot of example values, which do not work. And you don't need most of them
The easiest would be to set content of the json file to

{
}

And later add only those fields, which you need

The docker command, which I used for running the container:

docker run -p 5000:5000 --env EMAIL_PWD=123            -v /path/to/conf.json:/app/conf/conf.json            -v /path/to/runners/:/app/conf/runners            --name script-server            bugy/script-server:latest

(I had to remove "address": "localhost", from the conf.json file, since you cannot listen on this address inside docker)

@ghost
Copy link
Author

ghost commented Mar 17, 2020

Hi, @kiityman1 these files are completely fine, there is something wrong with how you attach them. It looks like you are attaching another version of these files

Also, I would recommend not copy-pasting conf.json from example. It has a lot of example values, which do not work. And you don't need most of them
The easiest would be to set content of the json file to

{
}

And later add only those fields, which you need

The docker command, which I used for running the container:

docker run -p 5000:5000 --env EMAIL_PWD=123            -v /path/to/conf.json:/app/conf/conf.json            -v /path/to/runners/:/app/conf/runners            --name script-server            bugy/script-server:latest

(I had to remove "address": "localhost", from the conf.json file, since you cannot listen on this address inside docker)

Hi, I got it working with google but when I click login I get this message https://imgur.com/a/ZvqSaV0
This is my api config in google https://imgur.com/a/w03JrUL

@ghost
Copy link
Author

ghost commented Mar 17, 2020

Hi, @kiityman1 these files are completely fine, there is something wrong with how you attach them. It looks like you are attaching another version of these files

Also, I would recommend not copy-pasting conf.json from example. It has a lot of example values, which do not work. And you don't need most of them
The easiest would be to set content of the json file to

{
}

And later add only those fields, which you need

The docker command, which I used for running the container:

docker run -p 5000:5000 --env EMAIL_PWD=123            -v /path/to/conf.json:/app/conf/conf.json            -v /path/to/runners/:/app/conf/runners            --name script-server            bugy/script-server:latest

(I had to remove "address": "localhost", from the conf.json file, since you cannot listen on this address inside docker)

I also fixed my config https://hastebin.com/exadopucog.json and runner https://hastebin.com/dasafuqive.json

@bugy
Copy link
Owner

bugy commented Mar 17, 2020

Hi @kiityman1 unfortunately, I cannot see on the screenshot, if "authorized redirect URI" in google config matches the redirect_uri on the error page
Could you double-check it, please?

Or may be, it was some temporal problem

@ghost
Copy link
Author

ghost commented Mar 17, 2020

Hi @kiityman1 unfortunately, I cannot see on the screenshot, if "authorized redirect URI" in google config matches the redirect_uri on the error page
Could you double-check it, please?

Or may be, it was some temporal problem

Same redirect url. Same problem now

@bugy
Copy link
Owner

bugy commented Mar 17, 2020

Hi @kiityman1, I tried to reproduce the problem and check this error in internet, nothing useful found
Usually, it's some misconfigurations, e.g.:

  • different protocols (http vs https)
  • whitespaces
  • extra characters
  • different clients are used

Also, you can try enabling additional redirect uri with an explicit port (i.e. https://...:443/login.html)
Could it also be, that you are configuring a different client/project in the google console? Please double-check that client id and secret matches (in your conf.json file, on the google error page and in the google console)
And I also saw some people were suggesting to try incognito mode, sometimes it could fail because of a cache.

Unfortunately, I cannot give any other tips here. If you reach google page, with all the keys are redirect_uri being correct, then it's out of the scope of Script server.

By the way, during my testing now, all the configurations were active immediately after save.

@ghost
Copy link
Author

ghost commented Mar 17, 2020

Hi @kiityman1, I tried to reproduce the problem and check this error in internet, nothing useful found
Usually, it's some misconfigurations, e.g.:

  • different protocols (http vs https)
  • whitespaces
  • extra characters
  • different clients are used

Also, you can try enabling additional redirect uri with an explicit port (i.e. https://...:443/login.html)
Could it also be, that you are configuring a different client/project in the google console? Please double-check that client id and secret matches (in your conf.json file, on the google error page and in the google console)
And I also saw some people were suggesting to try incognito mode, sometimes it could fail because of a cache.

Unfortunately, I cannot give any other tips here. If you reach google page, with all the keys are redirect_uri being correct, then it's out of the scope of Script server.

By the way, during my testing now, all the configurations were active immediately after save.

Hey, you were right! It was the wrong id. Everything working great now! Do you have a place to donate?

@ghost ghost closed this as completed Mar 17, 2020
@ghost ghost reopened this Mar 17, 2020
@ghost
Copy link
Author

ghost commented Mar 17, 2020

Sorry to reopen, but I still can't access the admin page? I don't really need to but...

@bugy
Copy link
Owner

bugy commented Mar 17, 2020 via email

@bugy
Copy link
Owner

bugy commented Mar 17, 2020 via email

@ghost
Copy link
Author

ghost commented Mar 17, 2020

I would highly recommend using admin page, because there you would be able to configure scripts without digging into jsons For the donation, i only have PayPal: https://paypal.me/IaroslavShepilov? Yaroslav Shepilov buggygm@gmail.com schrieb am Mi., 18. März 2020, 00:03:

Hi, did you add your email to the admin list? In the conf.json file kiityman1 @.***> schrieb am Di., 17. März 2020, 23:59: > Sorry to reopen, but I still can't access the admin page? I don't really > need to but... > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <#269 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AAJXPJMZ4HGSLRFHSJJCPKDRH76DJANCNFSM4LGXAUEA > . >

I forgot to add to admin, thanks :) Donated

@ghost ghost closed this as completed Mar 17, 2020
@bugy
Copy link
Owner

bugy commented Mar 18, 2020

Hi @kiityman1 thanks :) Unfortunately, I don't see the transfer and I really hope you didn't lose the money

@bugy bugy changed the title Not working at all with docker (info inside) Help with running in docker Mar 24, 2020
This issue was closed.
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

1 participant