seqeralabs / nf-tower

Nextflow Tower system
https://tower.nf
Mozilla Public License 2.0
144 stars 51 forks source link

Unauthorized Tower access #289

Closed PedroRaposo closed 3 years ago

PedroRaposo commented 3 years ago

Hello,

After I set up my TOWER_ACCESS_TOKEN and NXF_VER variables according to the instructions, I run the code:

nextflow run hello -with-tower

And I got the following error:

Unauthorized Tower access -- Make sure you have specified the correct access token

I confirm that I created a token (here: https://tower.nf/tokens) and I set up correctly on the TOWER_ACCESS_TOKEN variable.

I was wondering what could be the problem. Thank you for your assistance.

abhi18av commented 3 years ago

Hi @PedroRaposo,

Thanks for highlighting this to us.

Just to confirm one tiny thing, after you completed the setup instructions - you reloaded the terminal session via exec $SHELL or source ~/.bashrc right?

PedroRaposo commented 3 years ago

I did not. Once I set the variable I did not know I needed. However, I reloaded now with exec $SHELL, and I get the same error.

Thank you for your time @abhi18av

abhi18av commented 3 years ago

@PedroRaposo , I see. You're right, if you followed the instructions over at Tower setup then you should need to do it, but I wanted to confirm that it's not a factor.

Could you please share the nextflow.log file

PedroRaposo commented 3 years ago

Here it is. Do you think this might be a internet connectivity issue?

Feb-11 12:08:35.447 [main] DEBUG nextflow.cli.Launcher - Setting http proxy: [wwwcache.XXXX.ac.uk, 3128]
Feb-11 12:08:35.541 [main] DEBUG nextflow.cli.Launcher - Setting https proxy: [wwwcache.XXXX.ac.uk, 3128]
Feb-11 12:08:35.541 [main] DEBUG nextflow.cli.Launcher - $> nextflow run hello -with-tower
Feb-11 12:08:35.635 [main] INFO  nextflow.cli.CmdRun - N E X T F L O W  ~  version 20.01.0
Feb-11 12:08:35.677 [main] DEBUG nextflow.scm.AssetManager - Listing projects in folder: /home/AD/praposo/.nextflow/assets
Feb-11 12:08:36.392 [main] DEBUG nextflow.scm.AssetManager - Git config: /home/AD/praposo/.nextflow/assets/nextflow-io/hello/.git/config; branch: master; remote: origin; url: https://github.com/nextflow-io/hello.git
Feb-11 12:08:36.407 [main] DEBUG nextflow.scm.AssetManager - Git config: /home/AD/praposo/.nextflow/assets/nextflow-io/hello/.git/config; branch: master; remote: origin; url: https://github.com/nextflow-io/hello.git
Feb-11 12:08:36.562 [main] DEBUG nextflow.scm.AssetManager - Git config: /home/AD/praposo/.nextflow/assets/nextflow-io/hello/.git/config; branch: master; remote: origin; url: https://github.com/nextflow-io/hello.git
Feb-11 12:08:36.562 [main] INFO  nextflow.cli.CmdRun - Launching `nextflow-io/hello` [elated_wescoff] - revision: e6d9427e5b [master]
Feb-11 12:08:37.368 [main] DEBUG nextflow.config.ConfigBuilder - Found config base: /home/AD/praposo/.nextflow/assets/nextflow-io/hello/nextflow.config
Feb-11 12:08:37.370 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /home/AD/praposo/.nextflow/assets/nextflow-io/hello/nextflow.config
Feb-11 12:08:37.380 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Feb-11 12:08:37.496 [main] DEBUG nextflow.Session - Session uuid: c00a7ff2-f9ff-4852-ac76-b6320cb5dda9
Feb-11 12:08:37.497 [main] DEBUG nextflow.Session - Run name: elated_wescoff
Feb-11 12:08:37.497 [main] DEBUG nextflow.Session - Executor pool size: 32
Feb-11 12:08:37.510 [main] DEBUG nextflow.config.ConfigBuilder - Found config base: /home/AD/praposo/.nextflow/assets/nextflow-io/hello/nextflow.config
Feb-11 12:08:37.511 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /home/AD/praposo/.nextflow/assets/nextflow-io/hello/nextflow.config
Feb-11 12:08:37.511 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Feb-11 12:08:37.608 [main] DEBUG nextflow.cli.CmdRun - 
  Version: 20.01.0 build 5264
  Created: 12-02-2020 10:14 UTC (10:14 BST)
  System: Linux 3.10.0-957.21.3.el7.x86_64
  Runtime: Groovy 2.5.8 on OpenJDK 64-Bit Server VM 1.8.0_152-release-1056-b12
  Encoding: UTF-8 (UTF-8)
  Process: 27067@b1s4 [172.25.16.157]
  CPUs: 32 - Mem: 251.7 GB (18.5 GB) - Swap: 4 GB (2.6 GB)
Feb-11 12:08:37.685 [main] DEBUG nextflow.Session - Work-dir: /home/AD/praposo/work [nfs]
Feb-11 12:08:37.686 [main] DEBUG nextflow.Session - Script base path does not exist or is not a directory: /home/AD/praposo/.nextflow/assets/nextflow-io/hello/bin
Feb-11 12:08:37.723 [main] DEBUG nextflow.Session - Observer factory: TowerFactory
Feb-11 12:08:37.750 [main] DEBUG nextflow.Session - Observer factory: DefaultObserverFactory
Feb-11 12:08:38.465 [main] DEBUG nextflow.Session - Session start invoked
Feb-11 12:08:38.476 [main] DEBUG io.seqera.tower.plugin.TowerClient - Creating Tower observer -- endpoint=https://api.tower.nf; requestInterval=1s; aliveInterval=1m; maxRetries=5; backOffBase=3; backOffDelay=250
Feb-11 12:08:38.599 [main] DEBUG nextflow.cli.Launcher - Operation aborted
nextflow.exception.AbortOperationException: Unauthorized Tower access -- Make sure you have specified the correct access token
    at io.seqera.tower.plugin.TowerClient.onFlowCreate(TowerClient.groovy:228)
    at nextflow.Session$_notifyFlowCreate_closure21.doCall(Session.groovy:1002)
    at nextflow.Session$_notifyFlowCreate_closure21.call(Session.groovy)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2330)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2315)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2356)
    at nextflow.Session.notifyFlowCreate(Session.groovy:1002)
    at nextflow.Session.start(Session.groovy:481)
    at nextflow.script.ScriptRunner.execute(ScriptRunner.groovy:121)
    at nextflow.cli.CmdRun.run(CmdRun.groovy:273)
    at nextflow.cli.Launcher.run(Launcher.groovy:460)
    at nextflow.cli.Launcher.main(Launcher.groovy:642)
pditommaso commented 3 years ago

If you are using the bearer token, update NF to version 20.10.0 or later.

PedroRaposo commented 3 years ago

Thank you @pditommaso. I just needed to update my nextflow version!