Ir para conteúdo
  • Cadastre-se

Gandalf

Membro Pro Verificado
  • Total de ítens

    275
  • Registro em

  • Última visita

Tudo que Gandalf postou

  1. Gandalf

    ACBrLib linux

    Eu também fiquei um tempão tentando funcionar usando o docker e acabei desistindo por enquanto. Mas no azure web app ele vai. Se no arquivo de configuração não vai, digira os comandos direto no ssh no portal do azure e vê se funciona.
  2. Gandalf

    ACBrLib linux

    Experimenta setar o usuário como root
  3. Gandalf

    ACBrLib linux

    Marcos, eu subi uma api no azure web apps. Vou coloca o link do post que eu peguei aqui pra fazer funcionar lá
  4. Gandalf

    ACBrLib linux

    Olá Marcos, esse erro eu ainda não tive. Mas eu estou executando tudo no web app linux, então pode ser que seja algo do windows mesmo.
  5. Gandalf

    ACBrLib linux

    Pelo menos já temos uma luz de onde está a dificuldade.
  6. Gandalf

    ACBrLib linux

    Bom dia Daniel, No docker não vi jeito de subir o Xvfb. Acabei utilizando o serviço de Web App do azure, onde eu posso executar direto o ssh. Será que não tem ninguém que tenha conseguido fazer rodar o acbrlibnef com dotnet e docker? Usando o serviço do Azure Container App?
  7. Gandalf

    ACBrLib linux

    Sim, se executar no terminal o comando Xvfb :1 -screen 0 1280x1024x16 & export DISPLAY=:1 funciona normal. Por algum motivo ele não consegue executar pelo dockerfile. Eu consegui dar um jeito de fazer funcionar, mas sem container, usando o serviço do azure para app linux (Azure Web App). Eu crio um .sh e configura para executar. Não é conteiner. Ficou assim #!/bin/bash set -e export PORT=8080 export ASPNETCORE_URLS=http://*:$PORT if [ ! -z "$PORT2" ]; then export Kestrel__Endpoints__Http2__Url=http://*:$PORT2 export Kestrel__Endpoints__Http2__Protocols=Http2 export Kestrel__Endpoints__Http1__Url=http://*:$PORT export Kestrel__Endpoints__Http1__Protocols=Http1 fi echo *** Atualiza a lista de pacotes apt-get update echo *** Instala as dependências faltantes da lib ACBrBoleto apt-get install -y xauth openssh-server libgtk2.0-0 openssl libxml2 libxslt1.1 libcurl4 libssl-dev uuid-dev libudev-dev #echo "deb http://deb.debian.org/debian bookworm contrib non-free" > /etc/apt/sources.list.d/contrib.list #apt-get install -y ttf-mscorefonts-installer fontconfig echo *** Instala emulador de interface gráfica. A lib precisa pra funcionar. apt-get install -y xvfb echo *** Remove lista de pacotes rm -rf /var/lib/apt/lists/* echo *** Cria uma screen virtual identificada pelo nº 1 Xvfb :1 -screen 0 1280x1024x16 & export DISPLAY=:1 echo Trying to find the startup DLL name... echo Found the startup D name: NFEsAPI.dll echo 'Running the command: dotnet "NFEsAPI.dll"' cd "/home/site/wwwroot" dotnet "NFEsAPI.dll" Mas desse jeito eu não consigo usar o Azure Container App. Ainda não é o ideal. Alguma outra ideia?
  8. Gandalf

    ACBrLib linux

    Ele congela e não sobe a api. Não dá erro na hora da compilação. A api roda na porta 8080. Mas ele não inicia a api, se executar o run.sh
  9. Gandalf

    ACBrLib linux

    Executando o run.sh no terminal, produz o mesmo erro. Pelo jeito o erro está no arquivo sh mesmo
  10. Gandalf

    ACBrLib linux

    Executando pelo terminal funciona perfeitamente
  11. Gandalf

    ACBrLib linux

    A princípio sim, ele vai reclamar se não encontrar a API pra adicionar, mas se tiver algum erro tu já vais poder ver. Dockerfile run.sh
  12. Gandalf

    ACBrLib linux

    Mesma coisa, ele não está reconhecendo o comando 1>#32 0.534 /app/run.sh: 1: xvfb: not found 1>#32 1.469 warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60] 1>#32 1.469 Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning 1>#32 1.493 warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35] 1>#32 1.493 No XML encryptor configured. Key {ee25cc1b-a5dc-4fb3-b777-a4e24ad16055} may be persisted to storage in unencrypted form. 1>#32 1.596 info: Microsoft.Hosting.Lifetime[14] 1>#32 1.596 Now listening on: http://[::]:8080 1>#32 1.606 info: Microsoft.Hosting.Lifetime[0] 1>#32 1.606 Application started. Press Ctrl+C to shut down. 1>#32 1.607 info: Microsoft.Hosting.Lifetime[0] 1>#32 1.607 Hosting environment: Production 1>#32 1.607 info: Microsoft.Hosting.Lifetime[0] 1>#32 1.607 Content root path: /app
  13. Gandalf

    ACBrLib linux

    Está retornando 1>#30 [final 8/10] COPY run.sh /app/run.sh 1>#30 DONE 0.0s 1> 1>#31 [final 9/10] RUN chmod +x /app/run.sh 1>#31 DONE 0.4s 1> 1>#32 [final 10/10] RUN /app/run.sh 1>#32 0.437 /app/run.sh: 1: xvfb: not found Meu run.sh está assim xvfb :1 -screen 0 1280x1024x16 & export DISPLAY=:1 dotnet NFEsAPI.dll
  14. Gandalf

    ACBrLib linux

    Bom dia Daniel, deu alguns erros, com comandos não reconhecidos. Vou colar aqui os logs, à partir de onde começam os erros: O primeiro erro já é no run.sh 1>#17 [final 11/11] RUN /app/run.sh 1>#17 0.522 Unrecognized option: +render 1>#17 0.522 use: X [:<display>] [option] 1>#17 0.522 -a # default pointer acceleration (factor) 1>#17 0.522 -ac disable access control restrictions 1>#17 0.522 -audit int set audit trail level 1>#17 0.522 -auth file select authorization file 1>#17 0.522 -br create root window with black background 1>#17 0.522 +bs enable any backing store support 1>#17 0.522 -bs disable any backing store support 1>#17 0.522 -c turns off key-click 1>#17 0.522 c # key-click volume (0-100) 1>#17 0.522 -cc int default color visual class 1>#17 0.522 -nocursor disable the cursor 1>#17 0.522 -core generate core dump on fatal error 1>#17 0.522 -displayfd fd file descriptor to write display number to when ready to connect 1>#17 0.522 -dpi int screen resolution in dots per inch 1>#17 0.522 -dpms disables VESA DPMS monitor control 1>#17 0.522 -deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs 1>#17 0.522 -f # bell base (0-100) 1>#17 0.522 -fakescreenfps # fake screen default fps (1-600) 1>#17 0.522 -fp string default font path 1>#17 0.522 -help prints message with these options 1>#17 0.522 +iglx Allow creating indirect GLX contexts 1>#17 0.522 -iglx Prohibit creating indirect GLX contexts (default) 1>#17 0.522 -I ignore all remaining arguments 1>#17 0.522 -ld int limit data space to N Kb 1>#17 0.522 -lf int limit number of open files to N 1>#17 0.522 -ls int limit stack space to N Kb 1>#17 0.522 -nolock disable the locking mechanism 1>#17 0.522 -maxclients n set maximum number of clients (power of two) 1>#17 0.522 -nolisten string don't listen on protocol 1>#17 0.522 -listen string listen on protocol 1>#17 0.522 -noreset don't reset after last client exists 1>#17 0.522 -background [none] create root window with no background 1>#17 0.522 -reset reset after last client exists 1>#17 0.522 -p # screen-saver pattern duration (minutes) 1>#17 0.522 -pn accept failure to listen on all ports 1>#17 0.522 -nopn reject failure to listen on all ports 1>#17 0.522 -r turns off auto-repeat 1>#17 0.522 r turns on auto-repeat 1>#17 0.522 -render [default|mono|gray|color] set render color alloc policy 1>#17 0.522 -retro start with classic stipple and cursor 1>#17 0.522 -s # screen-saver timeout (minutes) 1>#17 0.522 -seat string seat to run on 1>#17 0.522 -t # default pointer threshold (pixels/t) 1>#17 0.522 -terminate [delay] terminate at server reset (optional delay in sec) 1>#17 0.522 -tst disable testing extensions 1>#17 0.522 ttyxx server started from init on /dev/ttyxx 1>#17 0.522 v video blanking for screen-saver 1>#17 0.522 -v screen-saver without video blanking 1>#17 0.522 -wr create root window with white background 1>#17 0.522 -maxbigreqsize set maximal bigrequest size 1>#17 0.522 +xinerama Enable XINERAMA extension 1>#17 0.522 -xinerama Disable XINERAMA extension 1>#17 0.522 -dumbSched Disable smart scheduling and threaded input, enable old behavior 1>#17 0.522 -schedInterval int Set scheduler interval in msec 1>#17 0.522 -sigstop Enable SIGSTOP based startup 1>#17 0.522 +extension name Enable extension 1>#17 0.522 -extension name Disable extension 1>#17 0.522 Only the following extensions can be run-time enabled/disabled: 1>#17 0.522 Generic Event Extension 1>#17 0.522 MIT-SHM 1>#17 0.522 XTEST 1>#17 0.522 SECURITY 1>#17 0.522 XINERAMA 1>#17 0.522 XFIXES 1>#17 0.522 RENDER 1>#17 0.522 RANDR 1>#17 0.522 COMPOSITE 1>#17 0.522 DAMAGE 1>#17 0.522 MIT-SCREEN-SAVER 1>#17 0.522 DOUBLE-BUFFER 1>#17 0.522 RECORD 1>#17 0.522 DPMS 1>#17 0.522 X-Resource 1>#17 0.522 XVideo 1>#17 0.522 XVideo-MotionCompensation 1>#17 0.522 SELinux 1>#17 0.522 GLX 1>#17 0.522 -query host-name contact named host for XDMCP 1>#17 0.522 -broadcast broadcast for XDMCP 1>#17 0.522 -multicast [addr [hops]] IPv6 multicast for XDMCP 1>#17 0.522 -indirect host-name contact named host for indirect XDMCP 1>#17 0.522 -port port-num UDP port number to send messages to 1>#17 0.522 -from local-address specify the local address to connect from 1>#17 0.522 -once Terminate server after one session 1>#17 0.522 -class display-class specify display class to send in manage 1>#17 0.522 -cookie xdm-auth-bits specify the magic cookie for XDMCP 1>#17 0.522 -displayID display-id manufacturer display ID for request 1>#17 0.522 [+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ] 1>#17 0.522 enable/disable accessx key sequences 1>#17 0.522 -ardelay set XKB autorepeat delay 1>#17 0.522 -arinterval set XKB autorepeat interval 1>#17 0.522 -screen scrn WxHxD set screen's width, height, depth 1>#17 0.522 -pixdepths list-of-int support given pixmap depths 1>#17 0.522 +/-render turn on/off RENDER extension support(default on) 1>#17 0.522 -linebias n adjust thin line pixelization 1>#17 0.522 -blackpixel n pixel value for black 1>#17 0.522 -whitepixel n pixel value for white 1>#17 0.522 -fbdir directory put framebuffers in mmap'ed files in directory 1>#17 0.522 -shmem put framebuffers in shared memory 1>#17 0.522 (EE) 1>#17 0.522 Fatal server error: 1>#17 0.522 (EE) Unrecognized option: +render 1>#17 0.522 (EE) 1>#17 1.110 warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60] 1>#17 1.110 Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning 1>#17 1.124 warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35] 1>#17 1.124 No XML encryptor configured. Key {dc52543d-1bd2-416d-b376-b3deb7762ab9} may be persisted to storage in unencrypted form. 1>#17 1.154 info: Microsoft.Hosting.Lifetime[14] 1>#17 1.154 Now listening on: http://[::]:8080 1>#17 1.155 info: Microsoft.Hosting.Lifetime[0] 1>#17 1.155 Application started. Press Ctrl+C to shut down. 1>#17 1.156 info: Microsoft.Hosting.Lifetime[0] 1>#17 1.156 Hosting environment: Production 1>#17 1.156 info: Microsoft.Hosting.Lifetime[0] 1>#17 1.156 Content root path: /app
  15. Gandalf

    ACBrLib linux

    /app/run.shscript.sh isso ele não encontrou
  16. Gandalf

    ACBrLib linux

    Não é necessário mais usar o arquivo sh também
  17. Gandalf

    ACBrLib linux

    Sim, se executar o comando no terminal, até aqui, tudo funciona. O único comando que eu preciso rodar no terminal é Xvfb :1 -screen 0 1280x1024x24
  18. Gandalf

    ACBrLib linux

    Não tem jeito, o sudo Xvfb :1 ele não executa. Somente se eu for no terminal e mandar rodar.
  19. Gandalf

    ACBrLib linux

    Outra coisa, no ["bash", "/app/run.sh"] a que se refere o parâmetro bash?
  20. Gandalf

    ACBrLib linux

    Em qual pasta ele cria o acbrlib.ini ?
  21. Gandalf

    ACBrLib linux

    Olha que estranho, mesmo com o dockerfile do jeito que está (eu não cheguei a colocar essa última alteração), se eu for no container e executar o comando: Xvfb :1 eu consigo carregar a biblioteca normalmente. Mas parece que executando pelo dockerfile não funciona. Aliás, se eu colocar esse comando sozinho no dockerfile, ele não dá erro, mas também não sobe a api. O que pode ser isso? Como eu posso executar esse comando pelo dockerfile ou pelo arquivo sh:?
  22. Gandalf

    ACBrLib linux

    Aí vai! Dockerfile
  23. Gandalf

    ACBrLib linux

    Se eu dou um echo $DISPLAY, ele me retorna :1
  24. Gandalf

    ACBrLib linux

    Acrescentando no dockerfile ENV DISPLAY :1, retorna a mensagem Gtk-WARNING **: 17:57:58.738: cannot open display: :1 Se não acrescentar ENV DISPLAY :1, retorna somente a mensagem Gtk-WARNING **: 17:57:58.738: cannot open display: run.sh = Xvfb :1 -screen 0 1280x1024x16 & export DISPLAY=:1 dotnet NFEsAPI.dll Se colocar os comandos em uma linha somente, o resultado é o mesmo.
  25. Gandalf

    ACBrLib linux

    Acrescentei essas linhas no meu dockerfile: ENV DISPLAY :99 COPY run.sh /app/run.sh RUN chmod 0755 /app/run.sh ENTRYPOINT ["bash", "/app/run.sh"] E o meu run.sh está assim Xvfb :99 -screen 0 1280x1024x24 -ac +extension GLX +render -noreset & php-fpm & dotnet NFEsAPI.dll E agora a mensagem é: Gtk-WARNING **: 14:34:59.216: cannot open display: :99
×
×
  • Criar Novo...

Informação Importante

Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.

The popup will be closed in 10 segundos...
The popup will be closed in 10 segundos...