Jetty versions before version 9.1 have an OPTIONS argument.
Jetty versions from version 9.1 have a module system.
What is the Jetty 9.1 module equivalent to OPTIONS=All?
This cannot be answered as-is, as you haven't specified what "OPTIONS=All" means to you.
Here's what it means from Jetty 8.1.13.v20130916
$ java -jar start.jar OPTIONS=All --version
Active Options: [All, Server, annotations, ext, jmx, jsp, plus, resources, websocket]
Version Information on 39 entries in the classpath.
Note: order presented here is how they would appear on the classpath.
changes to the OPTIONS=[option,option,...] command line option will be reflected here.
0: (dir) | ${jetty.home}/resources
1: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-xml-8.1.13.v20130916.jar
2: 3.0.0.v201112011016 | ${jetty.home}/lib/servlet-api-3.0.jar
3: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-http-8.1.13.v20130916.jar
4: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-continuation-8.1.13.v20130916.jar
5: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-server-8.1.13.v20130916.jar
6: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-security-8.1.13.v20130916.jar
7: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-servlet-8.1.13.v20130916.jar
8: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-webapp-8.1.13.v20130916.jar
9: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-deploy-8.1.13.v20130916.jar
10: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-servlets-8.1.13.v20130916.jar
11: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-rewrite-8.1.13.v20130916.jar
12: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-jmx-8.1.13.v20130916.jar
13: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-ajp-8.1.13.v20130916.jar
14: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-jndi-8.1.13.v20130916.jar
15: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-plus-8.1.13.v20130916.jar
16: 1.1.0.v201105071233 | ${jetty.home}/lib/jndi/javax.activation-1.1.0.v201105071233.jar
17: 1.4.1.v201005082020 | ${jetty.home}/lib/jndi/javax.mail.glassfish-1.4.1.v201005082020.jar
18: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-annotations-8.1.13.v20130916.jar
19: 1.1.0.v201108011116 | ${jetty.home}/lib/annotations/javax.annotation-1.1.0.v201108011116.jar
20: 3.1.0.v200803061910 | ${jetty.home}/lib/annotations/org.objectweb.asm-3.1.0.v200803061910.jar
21: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-policy-8.1.13.v20130916.jar
22: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-client-8.1.13.v20130916.jar
23: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-websocket-8.1.13.v20130916.jar
24: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-overlay-deployer-8.1.13.v20130916.jar
25: 1.1.1 | ${jetty.home}/lib/jta/javax.transaction-1.1.1.v201105210645.jar
26: 8.1.13.v20130916 | ${jetty.home}/lib/spdy/spdy-core-8.1.13.v20130916.jar
27: 8.1.13.v20130916 | ${jetty.home}/lib/spdy/spdy-jetty-8.1.13.v20130916.jar
28: 8.1.13.v20130916 | ${jetty.home}/lib/spdy/spdy-jetty-http-8.1.13.v20130916.jar
29: 2.2.0.v201108011116 | ${jetty.home}/lib/jsp/com.sun.el-2.2.0.v201108011116.jar
30: 2.2.0.v201108011116 | ${jetty.home}/lib/jsp/javax.el-2.2.0.v201108011116.jar
31: 1.2.0.v201105211821 | ${jetty.home}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
32: 2.2.0.v201112011158 | ${jetty.home}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar
33: 2.2.2.v201112011158 | ${jetty.home}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar
34: 1.2.0.v201112081803 | ${jetty.home}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
35: 3.7.0.M20110909-1335 | ${jetty.home}/lib/jsp/org.eclipse.jdt.core-3.7.1.jar
36: 8.1.13.v20130916 | ${jetty.home}/lib/monitor/jetty-monitor-8.1.13.v20130916.jar
37: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-util-8.1.13.v20130916.jar
38: 8.1.13.v20130916 | ${jetty.home}/lib/jetty-io-8.1.13.v20130916.jar
That just enables the classpath for all other options declared in Jetty's embeddded start.config (a concept since removed in Jetty 9.1). The use of OPTIONS=All does not enable the use of those classes, that requires XML declarations and properties to also be defined, in the correct order (no less).
The use of OPTIONS=All also does not represent all of the jars and classes that ships with Jetty. Some Jetty distributions also have jdbc, xa, jta, cdi, jms, and cometd that are not picked up by OPTIONS=All but rather specific entries like OPTIONS=All,jms. Then you also have specific configuration for SSL, and NPN+SPDY that are not simply picked up with a simple OPTIONS=All
With Jetty 9.1 and the module system you have classpath + xml configuration + properties all in one. Enable a module and you get the rest.
With Jetty 9.1 you also have many more features than Jetty 8, so saying "I want it all" is also irrelevant. However, if you are saying "I want the same feature set in Jetty 9.1 that I had in Jetty 8.1 if I enabled all classpath entries with manually defined XML entries in my start.ini" then this is the equivalent.
Presented in the form of a ${jetty.base}.
Make an empty directory for your ${jetty.base}
[joakim]$ cd jetty-distribution-9.1.0.v20131115
[jetty-distribution-9.1.0.v20131115]$ mkdir my-base
[jetty-distribution-9.1.0.v20131115]$ cd my-base/
Initialize it:
This quickstart step will:
build out a start.ini suitable for you
creating any directories that the module might need
download any artifacts that you might need (such as the sample keystore, and the npn jar)
This is not a required step, you can create / edit / manage the start.ini and base directory completely manually and totally on your own if you want.
This command is equivalent to most of the same features that you had in Jetty 8.
[my-base]$ java -jar ../start.jar --add-to-start=ext,resources,jsp,continuation,rewrite,proxy,monitor,stats,ipaccess,jmx,requestlog,logging,https,http,webapp,annotations,websocket,spdy
WARNING: ext initialised in ${jetty.base}/start.ini (appended)
WARNING: ext enabled in ${jetty.base}/start.ini
MKDIR: ${jetty.base}/lib
MKDIR: ${jetty.base}/lib/ext
WARNING: resources initialised in ${jetty.base}/start.ini (appended)
WARNING: resources enabled in ${jetty.base}/start.ini
MKDIR: ${jetty.base}/resources
WARNING: jsp initialised in ${jetty.base}/start.ini (appended)
WARNING: jsp enabled in ${jetty.base}/start.ini
WARNING: server initialised in ${jetty.base}/start.ini (appended)
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: continuation initialised in ${jetty.base}/start.ini (appended)
WARNING: continuation enabled in ${jetty.base}/start.ini
WARNING: rewrite initialised in ${jetty.base}/start.ini (appended)
WARNING: rewrite enabled in ${jetty.base}/start.ini
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: proxy initialised in ${jetty.base}/start.ini (appended)
WARNING: proxy enabled in ${jetty.base}/start.ini
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: monitor initialised in ${jetty.base}/start.ini (appended)
WARNING: monitor enabled in ${jetty.base}/start.ini
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: stats initialised in ${jetty.base}/start.ini (appended)
WARNING: stats enabled in ${jetty.base}/start.ini
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: ipaccess initialised in ${jetty.base}/start.ini (appended)
WARNING: ipaccess enabled in ${jetty.base}/start.ini
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: jmx initialised in ${jetty.base}/start.ini (appended)
WARNING: jmx enabled in ${jetty.base}/start.ini
WARNING: requestlog initialised in ${jetty.base}/start.ini (appended)
WARNING: requestlog enabled in ${jetty.base}/start.ini
MKDIR: ${jetty.base}/logs
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: logging initialised in ${jetty.base}/start.ini (appended)
WARNING: logging enabled in ${jetty.base}/start.ini
WARNING: https initialised in ${jetty.base}/start.ini (appended)
WARNING: https enabled in ${jetty.base}/start.ini
WARNING: ssl initialised in ${jetty.base}/start.ini (appended)
WARNING: ssl enabled in ${jetty.base}/start.ini
DOWNLOAD: http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/plain/jetty-server/src/main/config/etc/keystore to etc/keystore
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: http initialised in ${jetty.base}/start.ini (appended)
WARNING: http enabled in ${jetty.base}/start.ini
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: webapp initialised in ${jetty.base}/start.ini (appended)
WARNING: webapp enabled in ${jetty.base}/start.ini
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: annotations initialised in ${jetty.base}/start.ini (appended)
WARNING: annotations enabled in ${jetty.base}/start.ini
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: websocket initialised in ${jetty.base}/start.ini (appended)
WARNING: websocket enabled in ${jetty.base}/start.ini
WARNING: annotations enabled in ${jetty.base}/start.ini
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: spdy initialised in ${jetty.base}/start.ini (appended)
WARNING: spdy enabled in ${jetty.base}/start.ini
WARNING: ssl enabled in ${jetty.base}/start.ini
WARNING: server enabled in ${jetty.base}/start.ini
WARNING: npn initialised in ${jetty.base}/start.ini (appended)
WARNING: npn enabled in ${jetty.base}/start.ini
DOWNLOAD: http://repo1.maven.org/maven2/org/mortbay/jetty/npn/npn-boot/1.1.6.v20130911/npn-boot-1.1.6.v20130911.jar to lib/npn/npn-boot-1.1.6.v20130911.jar
You can see what this configuration looks like by viewing the start.ini or simply by asking Jetty to --list-config
[my-base]$ java -jar ../start.jar --list-config
Java Environment:
-----------------
java.home=/opt/java/jdk-7u45-x64/jre
java.vm.vendor=Oracle Corporation
java.vm.version=24.45-b08
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.vm.info=mixed mode
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=1.7.0_45-b18
java.io.tmpdir=/tmp
Jetty Environment:
-----------------
jetty.home=/home/joakim/jetty-distribution-9.1.0.v20131115
jetty.base=/home/joakim/jetty-distribution-9.1.0.v20131115/my-base
jetty.version=9.1.0.v20131115
JVM Arguments:
--------------
-Xbootclasspath/p:lib/npn/npn-boot-1.1.6.v20130911.jar
System Properties:
------------------
jetty.base = /home/joakim/jetty-distribution-9.1.0.v20131115/my-base
jetty.home = /home/joakim/jetty-distribution-9.1.0.v20131115
Properties:
-----------
http.timeout = 30000
https.port = 8443
https.timeout = 30000
jetty.dump.start = false
jetty.dump.stop = false
jetty.keymanager.password = OBF:1u2u1wml1z7s1z7a1wnl1u2g
jetty.keystore = etc/keystore
jetty.keystore.password = OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4
jetty.port = 8080
jetty.secure.port = 8443
jetty.truststore = etc/keystore
jetty.truststore.password = OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4
spdy.port = 8443
spdy.timeout = 30000
threads.max = 200
threads.min = 10
threads.timeout = 60000
Jetty Server Classpath:
-----------------------
Version Information on 45 entries in the classpath.
Note: order presented here is how they would appear on the classpath.
changes to the --module=name command line options will be reflected here.
0: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-client-9.1.0.v20131115.jar
1: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-continuation-9.1.0.v20131115.jar
2: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-jmx-9.1.0.v20131115.jar
3: (dir) | ${jetty.base}/resources
4: 3.1.0 | ${jetty.home}/lib/servlet-api-3.1.jar
5: 3.1.RC0 | ${jetty.home}/lib/jetty-schemas-3.1.jar
6: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-http-9.1.0.v20131115.jar
7: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-server-9.1.0.v20131115.jar
8: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-xml-9.1.0.v20131115.jar
9: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-util-9.1.0.v20131115.jar
10: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-io-9.1.0.v20131115.jar
11: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-jndi-9.1.0.v20131115.jar
12: 1.1.0.v201105071233 | ${jetty.home}/lib/jndi/javax.activation-1.1.0.v201105071233.jar
13: 1.4.1.v201005082020 | ${jetty.home}/lib/jndi/javax.mail.glassfish-1.4.1.v201005082020.jar
14: 1.2 | ${jetty.home}/lib/jndi/javax.transaction-api-1.2.jar
15: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-rewrite-9.1.0.v20131115.jar
16: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-security-9.1.0.v20131115.jar
17: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-servlet-9.1.0.v20131115.jar
18: 3.0.0 | ${jetty.home}/lib/jsp/javax.el-3.0.0.jar
19: 1.2.0.v201105211821 | ${jetty.home}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
20: 2.3.2 | ${jetty.home}/lib/jsp/javax.servlet.jsp-2.3.2.jar
21: 2.3.1 | ${jetty.home}/lib/jsp/javax.servlet.jsp-api-2.3.1.jar
22: 2.3.3 | ${jetty.home}/lib/jsp/jetty-jsp-jdt-2.3.3.jar
23: 1.2.0.v201112081803 | ${jetty.home}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
24: 3.8.2.v20130121-145325 | ${jetty.home}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar
25: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-plus-9.1.0.v20131115.jar
26: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-proxy-9.1.0.v20131115.jar
27: 9.1.0.v20131115 | ${jetty.home}/lib/spdy/spdy-client-9.1.0.v20131115.jar
28: 9.1.0.v20131115 | ${jetty.home}/lib/spdy/spdy-core-9.1.0.v20131115.jar
29: 9.1.0.v20131115 | ${jetty.home}/lib/spdy/spdy-http-common-9.1.0.v20131115.jar
30: 9.1.0.v20131115 | ${jetty.home}/lib/spdy/spdy-http-server-9.1.0.v20131115.jar
31: 9.1.0.v20131115 | ${jetty.home}/lib/spdy/spdy-server-9.1.0.v20131115.jar
32: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-webapp-9.1.0.v20131115.jar
33: 9.1.0.v20131115 | ${jetty.home}/lib/jetty-annotations-9.1.0.v20131115.jar
34: 4.1 | ${jetty.home}/lib/annotations/asm-4.1.jar
35: 4.1 | ${jetty.home}/lib/annotations/asm-commons-4.1.jar
36: 1.2 | ${jetty.home}/lib/annotations/javax.annotation-api-1.2.jar
37: 1.0 | ${jetty.home}/lib/websocket/javax.websocket-api-1.0.jar
38: 9.1.0.v20131115 | ${jetty.home}/lib/websocket/javax-websocket-client-impl-9.1.0.v20131115.jar
39: 9.1.0.v20131115 | ${jetty.home}/lib/websocket/javax-websocket-server-impl-9.1.0.v20131115.jar
40: 9.1.0.v20131115 | ${jetty.home}/lib/websocket/websocket-api-9.1.0.v20131115.jar
41: 9.1.0.v20131115 | ${jetty.home}/lib/websocket/websocket-client-9.1.0.v20131115.jar
42: 9.1.0.v20131115 | ${jetty.home}/lib/websocket/websocket-common-9.1.0.v20131115.jar
43: 9.1.0.v20131115 | ${jetty.home}/lib/websocket/websocket-server-9.1.0.v20131115.jar
44: 9.1.0.v20131115 | ${jetty.home}/lib/websocket/websocket-servlet-9.1.0.v20131115.jar
Jetty Active XMLs:
------------------
${jetty.home}/etc/jetty-jmx.xml
${jetty.home}/etc/jetty-logging.xml
${jetty.home}/etc/jetty.xml
${jetty.home}/etc/jetty-http.xml
${jetty.home}/etc/jetty-ipaccess.xml
${jetty.home}/etc/jetty-monitor.xml
${jetty.home}/etc/jetty-requestlog.xml
${jetty.home}/etc/jetty-rewrite.xml
${jetty.home}/etc/jetty-ssl.xml
${jetty.home}/etc/jetty-stats.xml
${jetty.home}/etc/jetty-https.xml
${jetty.home}/etc/jetty-plus.xml
${jetty.home}/etc/jetty-proxy.xml
${jetty.home}/etc/jetty-spdy.xml
${jetty.home}/etc/jetty-annotations.xml
Related
I get this error message when building an IOS app on an expo managed worfklow for SDK 46. The error appears at the end of the log, at line 716: 'Logger' initializer is inaccessible due to 'internal' protection level. The expo-updates package is installed with the latest version (0.15.6).
The expo doctor command shows nothing wrong with the project.
Compiling expo-eas-client Pods/EASClient » EASClient-dummy.m
› Packaging expo-eas-client Pods/EASClient » libEASClient.a
› Executing expo-eas-client Pods/EASClient » Copy generated compatibility header
› Executing expo-updates Pods/EXUpdates » [CP-User] Generate app.manifest for expo-updates
❌ (node_modules/expo-updates/ios/EXUpdates/Logging/UpdatesLogger.swift:15:24)
13 | public static let EXPO_UPDATES_LOG_CATEGORY = "expo-updates"
14 |
> 15 | private let logger = Logger(category: UpdatesLogger.EXPO_UPDATES_LOG_CATEGORY, options: [.logToOS, .logToFile])
| ^ 'Logger' initializer is inaccessible due to 'internal' protection level
16 |
17 | // MARK: - Public logging functions
18 |
❌ (node_modules/expo-updates/ios/EXUpdates/Logging/UpdatesLogger.swift:15:91)
13 | public static let EXPO_UPDATES_LOG_CATEGORY = "expo-updates"
14 |
> 15 | private let logger = Logger(category: UpdatesLogger.EXPO_UPDATES_LOG_CATEGORY, options: [.logToOS, .logToFile])
| ^ extra argument 'options' in call
16 |
17 | // MARK: - Public logging functions
18 |
❌ (node_modules/expo-updates/ios/EXUpdates/Logging/UpdatesLogger.swift:15:93)
13 | public static let EXPO_UPDATES_LOG_CATEGORY = "expo-updates"
14 |
> 15 | private let logger = Logger(category: UpdatesLogger.EXPO_UPDATES_LOG_CATEGORY, options: [.logToOS, .logToFile])
| ^ reference to member 'logToOS' cannot be resolved without a contextual type
16 |
17 | // MARK: - Public logging functions
18 |
❌ (node_modules/expo-updates/ios/EXUpdates/Logging/UpdatesLogger.swift:15:103)
13 | public static let EXPO_UPDATES_LOG_CATEGORY = "expo-updates"
14 |
> 15 | private let logger = Logger(category: UpdatesLogger.EXPO_UPDATES_LOG_CATEGORY, options: [.logToOS, .logToFile])
| ^ reference to member 'logToFile' cannot be resolved without a contextual type
16 |
17 | // MARK: - Public logging functions
18 |
❌ (node_modules/expo-updates/ios/EXUpdates/Logging/UpdatesLogReader.swift:15:32)
13 | public class UpdatesLogReader: NSObject {
14 | private let serialQueue = DispatchQueue(label: "dev.expo.updates.logging.reader")
> 15 | private let logPersistence = PersistentFileLog(category: UpdatesLogger.EXPO_UPDATES_LOG_CATEGORY)
| ^ cannot find 'PersistentFileLog' in scope
16 |
17 | /**
18 | Get expo-updates logs newer than the given date
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ CompileSwift normal arm64 (in target 'EXUpdates' from project 'Pods')
▸ CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'EXUpdates' from project 'Pods')
▸ (2 failures)
2023-01-06 08:55:22.238 xcodebuild[4410:14072] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2023-01-06 08:55:22.238 xcodebuild[4410:14072] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2023-01-06 08:55:22.327 xcodebuild[4410:14072] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}
2023-01-06 08:55:22.328 xcodebuild[4410:14072] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts
2023-01-06 08:55:22.328 xcodebuild[4410:14072] XType: unable to make a connection to the font daemon!
2023-01-06 08:55:22.328 xcodebuild[4410:14072] XType: XTFontStaticRegistry is enabled as fontd is not available.
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal arm64 (in target 'EXUpdates' from project 'Pods')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'EXUpdates' from project 'Pods')
(2 failures)
Exit status: 65
+-------------+-------------------------+
| Build environment |
+-------------+-------------------------+
| xcode_path | /Applications/Xcode.app |
| gym_version | 2.206.1 |
| sdk | iPhoneOS15.5.sdk |
+-------------+-------------------------+
The issue was solved by upgrading to Expo SDK 47.
I am having an issue connecting to the server using the shotgun GEM in ruby. Here is the error I get.
Can someone identify the issue here? Is it with the command I typed, or possibly something else? I have previously had issues with attempting to install the Ruby Bundle to run this lab. I had had assistance in troubleshooting that issue, but there still seems to be a possible issue with the GEM.
Antonio#MacBook-Pro sinatra-shotgun-server % rackup app.rb
Traceback (most recent call last):
22: from /Users/Antonio/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in <main>' 21: from /Users/Antonio/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in eval'
20: from /Users/Antonio/.rvm/gems/ruby-2.6.1/bin/rackup:23:in <main>' 19: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems.rb:297:in activate_bin_path'
18: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems.rb:297:in synchronize' 17: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems.rb:299:in block in activate_bin_path'
16: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems.rb:236:in finish_resolve' 15: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/request_set.rb:435:in resolve_current'
14: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/request_set.rb:423:in resolve' 13: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver.rb:192:in resolve'
12: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolver.rb:42:in resolve' 11: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:64:in resolve'
10: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:106:in start_resolution' 9: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:165:in initial_state'
8: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:51:in sort_dependencies' 7: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:69:in with_no_such_dependency_error_handling'
6: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb:52:in block in sort_dependencies' 5: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver.rb:279:in sort_dependencies'
4: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver.rb:279:in with_index' 3: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver.rb:279:in sort_by'
2: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver.rb:279:in each' 1: from /Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver.rb:285:in block in sort_dependencies'
/Users/Antonio/.rvm/rubies/ruby-2.6.1/lib/ruby/site_ruby/2.6.0/rubygems/resolver.rb:235:in `search_for': Unable to resolve dependency: user requested 'did_you_mean (= 1.3.0)' (Gem::UnsatisfiableDependencyError)
Antonio#MacBook-Pro sinatra-shotgun-server %
I am trying to install omniauth for sorcery. When I run:
rails g sorcery:install external --migrations
gsub config/initializers/sorcery.rb
Traceback (most recent call last):
24: from bin/rails:4:in <main>'
23: from bin/rails:4:inrequire'
22: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in <top (required)>'
21: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:inrun_command!'
20: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:50:in generate'
19: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:130:ingenerate_or_destroy'
18: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:123:in require_command!'
17: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:inrequire'
16: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in load_dependency'
15: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:inblock in require'
14: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in require'
13: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/commands/generate.rb:13:in'
12: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/generators.rb:157:in invoke'
11: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/base.rb:466:instart'
10: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/group.rb:232:in dispatch'
9: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:ininvoke_all'
8: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in map'
7: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:ineach'
6: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in block in invoke_all'
5: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:ininvoke_command'
4: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
3: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/sorcery-0.8.6/lib/generators/sorcery/install_generator.rb:31:inconfigure_initializer_file'
2: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:265:in gsub_file'
1: from /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:265:inopen'
/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:265:in `initialize': Permission denied # rb_sysopen - /home/david/geofly/config/initializers/sorcery.rb (Errno::EACCES)
I rolled back all migrations and deleted files in db/migrate.
Started fresh with sorcery install guide on wiki.
When migrating, I tried to overwrite files, which resulted in (Errno::EACCES), so I simply manualually deleted these files.
i ran rake db:drop, rake: db:create rake db:migrate.
The production database failed to drop, so I dropped it from termianl with mysql. So far the migrations are working and I successfully migrated SorceryExternal.
I'm writing an AWS CloudFormation script to build an EC2 instance. I'd like to provision the instance by installing some packages, downloading some repos and running some scripts. Amazon tells me I can do this in CloudFormation with the UserData field. However, it just doesn't seem to work at all.
Here is what i'm working with currently:
DWHServer:
Type: "AWS::EC2::Instance"
Properties:
DisableApiTermination: false # no termination protection
EbsOptimized: false # optimize for elastic block store
IamInstanceProfile: !Ref DWHServerIAMIP
ImageId: "ami-5189a661" # ubunty-trusty-14.04-amd64-server-20150325
InstanceInitiatedShutdownBehavior: "terminate"
InstanceType: "t2.medium"
KeyName: !FindInMap [EnvMap, KeyPair, !Ref EnvType]
Monitoring: true
SecurityGroupIds:
- !Ref DWHServerSG
SourceDestCheck: true # ??
SubnetId: "subnet-aed2ecf6" # Stage-etl-2c
UserData: !Base64
"Fn::Join": ["", ["#!/bin/bash -xe\n", "touch ~/confirm_work.txt\n"]]
This is the most simple example. I just want it to make a file to prove that it's running. But it doesn't even do that. The docs say to look at something called /var/log/cloud-init-output.log. I looked there, but don't see anything about UserData. There does seem to be some sort of network error, but I'm not sure how to interpret it or what to do about it.
Here are the contents of the cloud-init-output.log file on the instance:
Cloud-init v. 0.7.5 running 'init-local' at Sat, 04 Mar 2017 02:40:07 +0000. Up 3.85 seconds.
Cloud-init v. 0.7.5 running 'init' at Sat, 04 Mar 2017 02:40:09 +0000. Up 6.01 seconds.
ci-info: +++++++++++++++++++++++++Net device info+++++++++++++++++++++++++
ci-info: +--------+------+-----------+---------------+-------------------+
ci-info: | Device | Up | Address | Mask | Hw-Address |
ci-info: +--------+------+-----------+---------------+-------------------+
ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | . |
ci-info: | eth0 | True | 10.0.7.84 | 255.255.255.0 | 0a:3a:b0:a4:96:5d |
ci-info: +--------+------+-----------+---------------+-------------------+
ci-info: ++++++++++++++++++++++++++++++Route info++++++++++++++++++++++++++++++
ci-info: +-------+-------------+----------+---------------+-----------+-------+
ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
ci-info: +-------+-------------+----------+---------------+-----------+-------+
ci-info: | 0 | 0.0.0.0 | 10.0.7.1 | 0.0.0.0 | eth0 | UG |
ci-info: | 1 | 10.0.7.0 | 0.0.0.0 | 255.255.255.0 | eth0 | U |
ci-info: +-------+-------------+----------+---------------+-----------+-------+
Mar 4 02:40:11 ubuntu pollinate[723]: ERROR: Network communication failed [60]\n02:40:10.394529 * Hostname was NOT found in DNS cache
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 002:40:10.407240 * Trying 91.189.94.24...
02:40:10.550022 * Connected to entropy.ubuntu.com (91.189.94.24) port 443 (#0)
02:40:10.551661 * successfully set certificate verify locations:
02:40:10.551698 * CAfile: /etc/pollinate/entropy.ubuntu.com.pem
CApath: /dev/null
02:40:10.551804 * SSLv3, TLS handshake, Client hello (1):
02:40:10.551832 } [data not shown]
02:40:10.711080 * SSLv3, TLS handshake, Server hello (2):
02:40:10.711129 { [data not shown]
02:40:10.711191 * SSLv3, TLS handshake, CERT (11):
02:40:10.711216 { [data not shown]
02:40:10.711490 * SSLv3, TLS alert, Server hello (2):
02:40:10.711520 } [data not shown]
02:40:10.711602 * SSL certificate problem: unable to get local issuer certificate
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
02:40:10.711732 * Closing connection 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
2017-03-04 02:40:11,144 - util.py[WARNING]: Running seed_random (<module 'cloudinit.config.cc_seed_random' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_seed_random.pyc'>) failed
Generating public/private rsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
The key fingerprint is:
0c:54:09:ab:bc:b8:63:b5:6c:d2:d5:47:21:4a:38:6f root#ip-10-0-7-84
The key's randomart image is:
+--[ RSA 2048]----+
| .oo.. |
| o...o . |
| +o. . . |
| . .Eo . |
| o. .S. |
| .... . . |
| .+.o . |
| +.= |
| ..+ |
+-----------------+
Generating public/private dsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
89:26:94:17:79:6d:45:15:fc:5f:37:95:31:2e:e9:f7 root#ip-10-0-7-84
The key's randomart image is:
+--[ DSA 1024]----+
| .. . oooo+o|
| .... o +.o|
| o .. . o o.|
| . . . . . ..+|
| . o S . .=|
| o . o|
| E|
| |
| |
+-----------------+
Generating public/private ecdsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
The key fingerprint is:
af:a2:c7:b3:95:5c:17:2e:ce:69:b3:f6:39:c7:67:91 root#ip-10-0-7-84
The key's randomart image is:
+--[ECDSA 256]---+
| |
| |
| . |
| . . |
| S o o .|
| . * + E |
| . + B . .|
| =. o.o..o o|
| .o.+....oo o |
+-----------------+
Cloud-init v. 0.7.5 running 'modules:config' at Sat, 04 Mar 2017 02:40:14 +0000. Up 11.53 seconds.
Generating locales... en_US.UTF-8... up-to-date
Generation complete.
Cloud-init v. 0.7.5 running 'modules:final' at Sat, 04 Mar 2017 02:40:17 +0000. Up 13.61 seconds.
+ touch /root/confirm_work.txt
Cloud-init v. 0.7.5 finished at Sat, 04 Mar 2017 02:40:17 +0000. Datasource DataSourceEc2. Up 13.83 seconds
Any tips would be greatly appreciated. Thanks!
Look at the second to last entry in the log:
+ touch /root/confirm_work.txt
The command is indeed invoked. Note that all commands in your EC2 user data will show up in that log file (/var/log/cloud-init-output.log) with a PLUS sign prepended to it (like above). Is it possible that the touch command is not there? That would be surprising. But add an "echo" command before the touch, you should see the output and that would confirm that it's all working fine. Maybe you're trying to touch in a directory you don't have access. Maybe try to touch a file in /tmp to narrow things down...
Protip: Always use fully qualified paths in scripts. Try this for your userdata. Does it help?
UserData: !Base64
"Fn::Join": ["\n", ["#!/bin/bash -xe", "/bin/touch /tmp/confirm_work.txt"]]
I want to use the environment_variables of an App to set some properties, but my instance keep failing at setup, reading the documentation (http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-events.html) I found this:
"Setup includes Deploy; it runs the Deploy recipes after setup is complete.".
This is part of my Deploy script
if node['deploy']['ws']['application'] && node['deploy']['ws']['environment_variables']['is_root_app'] == 'true'
web_app node['deploy']['ws']['application'] do
server_name node['fqdn']
server_aliases node['deploy']['ws']['domains']
template 'web_app.conf.erb'
docroot node.default['apache']['docroot_dir']
ssl_enabled node['deploy']['ws']['ssl_support']
enable true
end
end
This is the Setup log
NoMethodError
-------------
undefined method `[]' for nil:NilClass
Cookbook Trace:
---------------
/var/chef/runs/254b8caa-cd70-4525-a2fd-71044afdf62d/local-mode-cache/cache/cookbooks/WebService/recipes/deploy_app.rb:8:in `from_file'
Relevant File Content:
----------------------
/var/chef/runs/254b8caa-cd70-4525-a2fd-71044afdf62d/local-mode-cache/cache/cookbooks/WebService/recipes/deploy_app.rb:
1: #
2: # Cookbook Name:: WebService
3: # Recipe:: default
4: #
5: # Copyright (c) 2016 The Authors, All Rights Reserved.
6:
7:
8>> if node['deploy']['ws']['application'] && node['deploy']['ws']['environment_variables']['is_root_app'] == 'true'
9: web_app node['deploy']['ws']['application'] do
10: server_name node['fqdn']
11: server_aliases node['deploy']['ws']['domains']
12: template 'web_app.conf.erb'
13: docroot node.default['apache']['docroot_dir']
14: ssl_enabled node['deploy']['ws']['ssl_support']
15: enable true
16: end
17: else
Whats the purpose of running the Deploy recipes after Setup, if I didnt deployed any App yet??? Where the environment_variables can be used if not on the Deploy recipes???
Imagine you have everything set up and you just start a new machine. It will run setup, configure then deploy otherwise you would end up with an instance that's not ready for production.
deployment fails when you're trying to access attributes that aren't set
You can use http://ruby-doc.org/core-1.9.3/Hash.html#method-i-has_key-3F to check this
e.g.
if node[:deploy].has_key?("ws")
end
Same for your env variables